]> git.99rst.org Git - git.git/commit
reftable/block: fix use of uninitialized memory when binsearch fails
authorPatrick Steinhardt <redacted>
Fri, 3 Jul 2026 12:58:52 +0000 (14:58 +0200)
committerJunio C Hamano <redacted>
Fri, 3 Jul 2026 18:08:03 +0000 (11:08 -0700)
commit986590f1f7e9aa2771175e01cba5e2680ff62c1f
tree03657301aa766ebed3c82ff361c6285cad9b255b
parent0d77a818546c2120c4bd8b29fc16908038b78f89
reftable/block: fix use of uninitialized memory when binsearch fails

When doing the binary search through our restart offsets we may hit an
error in case `restart_needle_less()` fails to decode the record at the
given offset. While we correctly detect this case and error out, it will
cause us to call `reftable_record_release()` on the yet-uninitialized
record.

Fix this by initializing the record earlier.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
reftable/block.c
git clone https://git.99rst.org/PROJECT