diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-11-13 07:26:35 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-13 07:26:35 +0100 |
commit | 7b51b77dbc71e83789f59f0cd559489115478f27 (patch) | |
tree | ad480b1a976d0670c0209333134eb1444c5be8b9 /index-pack.c | |
parent | Merge branch 'mk/maint-cg-push' (diff) | |
parent | t5303: fix printf format string for portability (diff) | |
download | git-7b51b77dbc71e83789f59f0cd559489115478f27.tar.xz git-7b51b77dbc71e83789f59f0cd559489115478f27.zip |
Merge branch 'np/pack-safer'
* np/pack-safer:
t5303: fix printf format string for portability
t5303: work around printf breakage in dash
pack-objects: don't leak pack window reference when splitting packs
extend test coverage for latest pack corruption resilience improvements
pack-objects: allow "fixing" a corrupted pack without a full repack
make find_pack_revindex() aware of the nasty world
make check_object() resilient to pack corruptions
make packed_object_info() resilient to pack corruptions
make unpack_object_header() non fatal
better validation on delta base object offsets
close another possibility for propagating pack corruption
Diffstat (limited to 'index-pack.c')
-rw-r--r-- | index-pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/index-pack.c b/index-pack.c index fe75332a9c..60ed41a993 100644 --- a/index-pack.c +++ b/index-pack.c @@ -338,7 +338,7 @@ static void *unpack_raw_entry(struct object_entry *obj, union delta_base *delta_ base_offset = (base_offset << 7) + (c & 127); } delta_base->offset = obj->idx.offset - base_offset; - if (delta_base->offset >= obj->idx.offset) + if (delta_base->offset <= 0 || delta_base->offset >= obj->idx.offset) bad_object(obj->idx.offset, "delta base offset is out of bound"); break; case OBJ_COMMIT: |