]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: reject 0 object_id_len
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 21 Feb 2022 18:46:05 +0000 (18:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 21:36:26 +0000 (13:36 -0800)
commiteff5832ba13b81ebbf68b0c28934fe18ba8601fc
tree7b810a616913dc65bc89fd363dcb6755a9d21145
parentfa48de62ac00bdd634ea5bcd5b1a6bccfa4d9117
reftable: reject 0 object_id_len

The spec says 2 <= object_id_len <= 31. We are lenient and allow 1,
but we forbid 0, so we can be sure that we never read a 0-length key.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/reader.c