Merge branch 'jk/chunk-bounds' into next
The codepaths that read "chunk" formatted files have been corrected to pay attention to the chunk size and notice broken files. * jk/chunk-bounds: t5319: make corrupted large-offset test more robust
This commit is contained in:
@ -1129,8 +1129,10 @@ test_expect_success 'reader bounds-checks large offset table' '
|
|||||||
git multi-pack-index --object-dir=../objects64 write &&
|
git multi-pack-index --object-dir=../objects64 write &&
|
||||||
midx=../objects64/pack/multi-pack-index &&
|
midx=../objects64/pack/multi-pack-index &&
|
||||||
corrupt_chunk_file $midx LOFF clear &&
|
corrupt_chunk_file $midx LOFF clear &&
|
||||||
test_must_fail git cat-file \
|
# using only %(objectsize) is important here; see the commit
|
||||||
--batch-check --batch-all-objects 2>err &&
|
# message for more details
|
||||||
|
test_must_fail git cat-file --batch-all-objects \
|
||||||
|
--batch-check="%(objectsize)" 2>err &&
|
||||||
cat >expect <<-\EOF &&
|
cat >expect <<-\EOF &&
|
||||||
fatal: multi-pack-index large offset out of bounds
|
fatal: multi-pack-index large offset out of bounds
|
||||||
EOF
|
EOF
|
||||||
|
Reference in New Issue
Block a user