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

When merging two commit graphs, ensure that we don't attempt to merge
two graphs which, when combined, have more total commits than the 32-bit
unsigned maximum.

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