diff options
| author | Taylor Blau <me@ttaylorr.com> | 2023-07-12 19:37:54 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-07-14 09:32:03 -0700 |
| commit | 48f3f8cf37043f69e9834d38e2439abfde280964 (patch) | |
| tree | 167838557111e52835fea13fadbc233d4f85a434 /commit.c | |
| parent | pack-bitmap.c: ensure that eindex lookups don't overflow (diff) | |
| download | git-48f3f8cf37043f69e9834d38e2439abfde280964.tar.gz git-48f3f8cf37043f69e9834d38e2439abfde280964.zip | |
commit-graph.c: prevent overflow in `write_commit_graph_file()`
When writing a commit-graph, we use the chunk-format API to write out
each individual chunk of the commit-graph. Each chunk of the
commit-graph is tracked via a call to `add_chunk()`, along with the
expected size of that chunk.
Similar to an earlier commit which handled the identical issue in the
MIDX machinery, guard against overflow when dealing with a commit-graph
with a large number of entries to avoid corrupting the contents of the
commit-graph itself.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions
