We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8afdad0 commit 6e8227aCopy full SHA for 6e8227a
src/libgit2/pack.c
@@ -1525,6 +1525,14 @@ static int pack_entry_find_offset(
1525
if (p->index_version > 1) {
1526
level1_ofs += 2;
1527
index += 8;
1528
+
1529
+ if ((int)short_oid->id[0] + 2 >= p->index_map.len) {
1530
+ git_error_set(GIT_ERROR_INTERNAL, "internal error: p->short_oid->[0] out of bounds");
1531
+ goto cleanup;
1532
+ }
1533
+ } else if ((int)short_oid->id[0] >= p->index_map.len) {
1534
1535
1536
}
1537
1538
index += 4 * 256;
0 commit comments