diff options
| author | Taylor Blau <me@ttaylorr.com> | 2023-07-12 19:37:46 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-14 09:32:03 -0700 |
| commit | 2bc764c1d4d1bc12ba7d95ceebb0da54ba381be5 (patch) | |
| tree | 78cb5bf2c8453b7cf6ec3cc0e43f2aa5d69ccb2d /commit-graph.c | |
| parent | midx.c: store `nr`, `alloc` variables as `size_t`'s (diff) | |
| download | git-2bc764c1d4d1bc12ba7d95ceebb0da54ba381be5.tar.gz git-2bc764c1d4d1bc12ba7d95ceebb0da54ba381be5.zip | |
midx.c: prevent overflow in `write_midx_internal()`
When writing a MIDX, we use the chunk-format API to write out each
individual chunk of the MIDX. Each chunk of the MIDX is tracked via a
call to `add_chunk()`, along with the expected size of that chunk.
Guard against overflow when dealing with a MIDX with a large number of
entries (and consequently, large chunks within the MIDX file itself) to
avoid corrupting the contents of the MIDX itself.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions
