We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7fac2a commit 53f2c6bCopy full SHA for 53f2c6b
src/pack.c
@@ -944,11 +944,9 @@ git_off_t get_delta_base(
944
c = base_info[used++];
945
unsigned_base_offset = (unsigned_base_offset << 7) + (c & 127);
946
}
947
- if ((size_t)delta_obj_offset <= unsigned_base_offset)
+ if (unsigned_base_offset == 0 || (size_t)delta_obj_offset <= unsigned_base_offset)
948
return 0; /* out of bound */
949
base_offset = delta_obj_offset - unsigned_base_offset;
950
- if (base_offset >= delta_obj_offset)
951
- return 0; /* out of bound */
952
*curpos += used;
953
} else if (type == GIT_OBJ_REF_DELTA) {
954
/* If we have the cooperative cache, search in it first */
0 commit comments