diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-10-23 13:56:36 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-10-23 13:56:36 -0700 |
| commit | f32af12ceec1c19d8a8a7874523d3a7ceef6eebf (patch) | |
| tree | 9078d206b9956c89334901fd04f8a884f01379d6 /t/t5328-commit-graph-64bit-time.sh | |
| parent | ceadf0f3cf51550166a387ec8508bb55e7883057 (diff) | |
| parent | 7538f9d89b001be33a1b682b5cf207c4ba8fd8c5 (diff) | |
| download | git-f32af12ceec1c19d8a8a7874523d3a7ceef6eebf.tar.xz | |
Merge branch 'jk/chunk-bounds'
The codepaths that read "chunk" formatted files have been corrected
to pay attention to the chunk size and notice broken files.
* jk/chunk-bounds: (21 commits)
t5319: make corrupted large-offset test more robust
chunk-format: drop pair_chunk_unsafe()
commit-graph: detect out-of-order BIDX offsets
commit-graph: check bounds when accessing BIDX chunk
commit-graph: check bounds when accessing BDAT chunk
commit-graph: bounds-check generation overflow chunk
commit-graph: check size of generations chunk
commit-graph: bounds-check base graphs chunk
commit-graph: detect out-of-bounds extra-edges pointers
commit-graph: check size of commit data chunk
midx: check size of revindex chunk
midx: bounds-check large offset chunk
midx: check size of object offset chunk
midx: enforce chunk alignment on reading
midx: check size of pack names chunk
commit-graph: check consistency of fanout table
midx: check size of oid lookup chunk
commit-graph: check size of oid fanout chunk
midx: stop ignoring malformed oid fanout chunk
t: add library for munging chunk-format files
...
Diffstat (limited to 't/t5328-commit-graph-64bit-time.sh')
| -rwxr-xr-x | t/t5328-commit-graph-64bit-time.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5328-commit-graph-64bit-time.sh b/t/t5328-commit-graph-64bit-time.sh index ca476e80a0..fc6a242b56 100755 --- a/t/t5328-commit-graph-64bit-time.sh +++ b/t/t5328-commit-graph-64bit-time.sh @@ -12,6 +12,7 @@ then fi . "$TEST_DIRECTORY"/lib-commit-graph.sh +. "$TEST_DIRECTORY/lib-chunk.sh" UNIX_EPOCH_ZERO="@0 +0000" FUTURE_DATE="@4147483646 +0000" @@ -74,4 +75,13 @@ test_expect_success 'single commit with generation data exceeding UINT32_MAX' ' git -C repo-uint32-max commit-graph verify ' +test_expect_success 'reader notices out-of-bounds generation overflow' ' + graph=.git/objects/info/commit-graph && + test_when_finished "rm -rf $graph" && + git commit-graph write --reachable && + corrupt_chunk_file $graph GDO2 clear && + test_must_fail git log 2>err && + grep "commit-graph overflow generation data is too small" err +' + test_done |
