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:
commit
fdbe2ac198
@ -454,6 +454,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…
Reference in New Issue
Block a user