Skip to content

Commit 00e6da9

Browse files
janosgbalint
authored andcommitted
swarm/bmt: ignore data longer then 4096 bytes in Hasher.Write (#17338)
1 parent 9df16f3 commit 00e6da9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎swarm/bmt/bmt.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func (h *Hasher) Sum(b []byte) (s []byte) {
318318
// with every full segment calls writeSection in a go routine
319319
func (h *Hasher) Write(b []byte) (int, error) {
320320
l := len(b)
321-
if l == 0 {
321+
if l == 0 || l > 4096 {
322322
return 0, nil
323323
}
324324
t := h.getTree()

0 commit comments

Comments
 (0)