Merge branch 'mk/diff-delta-avoid-large-offset'

The delta format used in the packfile cannot reference data at
offset larger than what can be expressed in 4-byte, but the
generator for the data failed to make sure the offset does not
overflow.  This has been corrected.

* mk/diff-delta-avoid-large-offset:
  diff-delta: do not allow delta offset truncation
This commit is contained in:
Junio C Hamano 2017-09-28 14:47:56 +09:00
commit fdbe2ac198
1 changed files with 3 additions and 0 deletions

View File

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