]> git.ipfire.org Git - thirdparty/git.git/commit
commit-graph.c: prevent overflow in `load_oid_from_graph()`
authorTaylor Blau <me@ttaylorr.com>
Wed, 12 Jul 2023 23:38:00 +0000 (19:38 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 16:32:03 +0000 (09:32 -0700)
commit0bd8f30a0e4e474163eb2d8dc3020d51ec3c8a35
tree5b414b493a1945ecf99cd5602a28763668078a3b
parent209250ef38f353f174ee9e90e55f5a4605449f70
commit-graph.c: prevent overflow in `load_oid_from_graph()`

In a similar spirit as previous commits, ensure that we don't overflow
when trying to compute an offset into the `chunk_oid_lookup` table when
the `lex_index` of the item we're trying to look up exceeds
`2^32-1/g->hash_len`.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-graph.c