diff-delta: do not allow delta offset truncation
Prevent generating delta offsets beyond 4G, as the xdelta used in the pack format cannot represent such large offset. Signed-off-by: Martin Koegler <martin.koegler@chello.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4274c698f4
commit
fed1ef9550
@ -452,6 +452,9 @@ create_delta(const struct delta_index *index,
|
|||||||
moff += msize;
|
moff += msize;
|
||||||
msize = left;
|
msize = left;
|
||||||
|
|
||||||
|
if (moff > 0xffffffff)
|
||||||
|
msize = 0;
|
||||||
|
|
||||||
if (msize < 4096) {
|
if (msize < 4096) {
|
||||||
int j;
|
int j;
|
||||||
val = 0;
|
val = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user