Commit 00e6da97 authored by Janoš Guljaš's avatar Janoš Guljaš Committed by Balint Gabor

swarm/bmt: ignore data longer then 4096 bytes in Hasher.Write (#17338)

parent 9df16f34
......@@ -318,7 +318,7 @@ func (h *Hasher) Sum(b []byte) (s []byte) {
// with every full segment calls writeSection in a go routine
func (h *Hasher) Write(b []byte) (int, error) {
l := len(b)
if l == 0 {
if l == 0 || l > 4096 {
return 0, nil
}
t := h.getTree()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment