@cryptotaxi247 / kubo / commits / bc38bdf51

limit raw input to 512 kilobytes

Henry committed Oct 19, 2014 at 16:57 UTC bc38bdf512f95f3ddd46de9fd40a5c286c36e653
1 file changed +1 -1
core/commands/object.go
+1 -1
@@ -101,7 +101,7 @@ func ObjectPut(n *core.IpfsNode, args []string, opts map[string]interface{}, out
101 err error
102 )
103
104 - data, err = ioutil.ReadAll(os.Stdin)
104 + data, err = ioutil.ReadAll(io.LimitReader(os.Stdin, 512*1024))
105 if err != nil {
106 return fmt.Errorf("ObjectPut error: %v", err)
107 }