limit raw input to 512 kilobytes

This commit is contained in:
Henry 2014-10-19 16:57:12 +02:00
parent 2276b55c57
commit bc38bdf512

View File

@ -101,7 +101,7 @@ func ObjectPut(n *core.IpfsNode, args []string, opts map[string]interface{}, out
err error
)
data, err = ioutil.ReadAll(os.Stdin)
data, err = ioutil.ReadAll(io.LimitReader(os.Stdin, 512*1024))
if err != nil {
return fmt.Errorf("ObjectPut error: %v", err)
}