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>
pull/411/head
Martin Koegler 5 years ago committed by Junio C Hamano
parent 4274c698f4
commit fed1ef9550
  1. 3
      diff-delta.c

@ -452,6 +452,9 @@ create_delta(const struct delta_index *index,
moff += msize;
msize = left;
if (moff > 0xffffffff)
msize = 0;
if (msize < 4096) {
int j;
val = 0;

Loading…
Cancel
Save