summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.cgi
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-08-12 08:03:13 +0000
committerJunio C Hamano <gitster@pobox.com>2026-08-12 09:05:49 -0700
commite3ddc2e5295d41987fdf59b9f2d9194d15a3f34e (patch)
tree47bdab08038476aa9c1cbb92393cdcf1520e56a9 /gitweb/gitweb.cgi
parentf8121b74798bd52ea6af99f70cb3bace2b44e953 (diff)
reftable tests: check reftable_table_init_ref_iterator() return
test_reftable_table__seek_once() and test_reftable_table__reseek() both call reftable_table_init_ref_iterator() without checking its return value. This function returns an int error code (0 on success, negative on failure). Every other reftable function call in these same tests checks the return via cl_assert_equal_i() or cl_assert(), making this omission inconsistent. If the iterator initialization ever fails (e.g., due to a memory allocation failure in the reftable internals), the test would proceed to seek and read with an uninitialized iterator, producing misleading test results or crashes rather than a clear assertion failure. Check the return value via cl_assert_equal_i(ret, 0), consistent with the surrounding code. Pointed out by Coverity. Assisted-by: Claude Opus 4.6 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.cgi')
0 files changed, 0 insertions, 0 deletions