mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
more p2p fuzzing, part 2 (#132)
This commit is contained in:
parent
8ab2970ce1
commit
750239d977
@ -97,7 +97,7 @@ func ParseGetPooledTransactions66(payload []byte, pos int, hashbuf []byte) (requ
|
||||
}
|
||||
hashes = common.EnsureEnoughSize(hashbuf, length.Hash*hashesCount)
|
||||
|
||||
for i := 0; pos < len(payload); i++ {
|
||||
for i := 0; i < hashesCount; i++ {
|
||||
pos, err = rlp.ParseHash(payload, pos, hashes[i*length.Hash:])
|
||||
if err != nil {
|
||||
return 0, hashes, 0, err
|
||||
@ -114,7 +114,7 @@ func ParseGetPooledTransactions65(payload []byte, pos int, hashbuf []byte) (hash
|
||||
}
|
||||
hashes = common.EnsureEnoughSize(hashbuf, length.Hash*hashesCount)
|
||||
|
||||
for i := 0; pos < len(payload); i++ {
|
||||
for i := 0; i < hashesCount; i++ {
|
||||
pos, err = rlp.ParseHash(payload, pos, hashes[i*length.Hash:])
|
||||
if err != nil {
|
||||
return hashes, 0, err
|
||||
|
@ -0,0 +1,2 @@
|
||||
go test fuzz v1
|
||||
[]byte("\xe6\x83\x06\xf8T\xe1\xa0Y^'\xa85\xcdyr\x9f\x00\x80\xac\xec1\x87\xd4S_\xfc\xee\xee\xb6\xed\x14d\xa0N\xc7'\xaa\xca\xe1\xa0Y^'\xa85\xcdyr\x9f\x00\x80\xac\xec1\x87\xd4S_\xfc\xee\xeesN\xad\x96\xd8q\x8d\x03\xab\xc5\xfc\x13(")
|
Loading…
Reference in New Issue
Block a user