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
Родитель 3d09e79b27 fed1ef9550
Коммит fdbe2ac198
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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;