]> Sergey Matveev's repositories - btrtrc.git/commit
Fix incorrect EOF when decoding some peer protocol message types
authorMatt Joiner <anacrolix@gmail.com>
Mon, 29 May 2023 09:01:01 +0000 (19:01 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 29 May 2023 09:01:01 +0000 (19:01 +1000)
commitac086bb3bd3b8e31c117362551eb0fe295a0f78d
treea5f47e48fa215ada3aeccd1090b621ed39b31f4c
parent5380337f869ed630e1102036bf6dec48c044152a
Fix incorrect EOF when decoding some peer protocol message types

Hooray for pedantic fuzz tests. This was found through peer_protocol/FuzzDecoder, when I wrote a go-fuzz-all wrapper.

It probably never caused a problem in production, as EOF would be handled as stream termination anyway, but it isn't clean.
peer_protocol/decoder.go
peer_protocol/fuzz_test.go
peer_protocol/msg.go
peer_protocol/testdata/fuzz/FuzzDecoder/18f327bd85f3ab06 [new file with mode: 0644]
peer_protocol/testdata/fuzz/FuzzDecoder/252f96643f6de0fc [new file with mode: 0644]
peer_protocol/testdata/fuzz/FuzzDecoder/44a1b6410e7ce227 [new file with mode: 0644]
peer_protocol/testdata/fuzz/FuzzDecoder/52452abe5ed3cb64 [new file with mode: 0644]
peer_protocol/testdata/fuzz/FuzzDecoder/9d2ec002df4eda28 [new file with mode: 0644]
peer_protocol/testdata/fuzz/FuzzDecoder/aceaaae6cd039fb5 [new file with mode: 0644]
peer_protocol/testdata/fuzz/FuzzDecoder/eb13c84d13ebb034 [new file with mode: 0644]
test/transfer_test.go