]> Sergey Matveev's repositories - btrtrc.git/commit
bencode: Avoid allocating interface string up front
authorMatt Joiner <anacrolix@gmail.com>
Fri, 10 Dec 2021 04:10:26 +0000 (15:10 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 12 Dec 2021 05:56:01 +0000 (16:56 +1100)
commitcd7e6dcd5cfb67734724c6bdda985b6659c2a5c7
tree022f4bb2fb2345e6d9631f6698c970a8e5a90d19
parent79511abe6ca7fd4c8b3710a73e2d5738bcdf590a
bencode: Avoid allocating interface string up front

This should fix crashes during fuzzing. It's not a complete fix, we really want to limit the amount a given Decode can allocate. Maybe Go isn't the right language for this.
bencode/decode.go
bencode/testdata/fuzz/FuzzInterfaceRoundTrip/c73f26cbd996104c4e39ce4998a08e90a5c437df90e68caeea0650ee3c7e7b42 [new file with mode: 0644]
bencode/testdata/fuzz/FuzzInterfaceRoundTrip/eef53fca91deb00d4e30f4f59e17e92d2936cda9f4b260994a830ec27cfb88c3 [new file with mode: 0644]