forked from cerc-io/plugeth
swarm/bmt: ignore data longer then 4096 bytes in Hasher.Write (#17338)
This commit is contained in:
parent
9df16f3468
commit
00e6da9704
@ -318,7 +318,7 @@ func (h *Hasher) Sum(b []byte) (s []byte) {
|
|||||||
// with every full segment calls writeSection in a go routine
|
// with every full segment calls writeSection in a go routine
|
||||||
func (h *Hasher) Write(b []byte) (int, error) {
|
func (h *Hasher) Write(b []byte) (int, error) {
|
||||||
l := len(b)
|
l := len(b)
|
||||||
if l == 0 {
|
if l == 0 || l > 4096 {
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
t := h.getTree()
|
t := h.getTree()
|
||||||
|
Loading…
Reference in New Issue
Block a user