mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
swarm/bmt: ignore data longer then 4096 bytes in Hasher.Write
This commit is contained in:
parent
042191338d
commit
ead220898a
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue