commit-graph.c: prevent overflow in `load_tree_for_commit()`
commit51c31a6408c1eae3ad6c2f78ec136c1b415cad72
authorTaylor Blau <me@ttaylorr.com>
Wed, 12 Jul 2023 23:38:08 +0000 (12 19:38 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 16:32:03 +0000 (14 09:32 -0700)
treefca1d8bca330e3322aa2ed18728222ae2c77f447
parent50a71c2942167654f95d00b450a961cf387547ec
commit-graph.c: prevent overflow in `load_tree_for_commit()`

In a similar spirit as previous commits, ensure that we don't overflow
when computing an offset into the commit_data chunk when the (relative)
graph position exceeds 2^32-1/GRAPH_DATA_WIDTH.

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