diff options
| author | Taylor Blau <me@ttaylorr.com> | 2023-07-12 19:38:05 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-14 09:32:03 -0700 |
| commit | 50a71c2942167654f95d00b450a961cf387547ec (patch) | |
| tree | d2785c30dccea44c682171ec8a64a66779e36142 /builtin/commit-tree.c | |
| parent | commit-graph.c: prevent overflow in `fill_commit_graph_info()` (diff) | |
| download | git-50a71c2942167654f95d00b450a961cf387547ec.tar.gz git-50a71c2942167654f95d00b450a961cf387547ec.zip | |
commit-graph.c: prevent overflow in `fill_commit_in_graph()`
In a similar spirit as previous commits, ensure that we don't overflow
when the lex_index of the commit we are trying to fill out exceeds
2^32-1/(g->hash_len+16).
The other hunk touched in this patch is not susceptible to overflow,
since an explicit cast is made to a 64-bit unsigned value. For clarity
and consistency with the rest of the commits in this series, avoid a
tricky to reason about cast, and use `st_mult()` directly.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-tree.c')
0 files changed, 0 insertions, 0 deletions
