Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
6bd024aa
Unverified
Commit
6bd024aa
authored
Jun 11, 2022
by
Edward Thomson
Committed by
GitHub
Jun 11, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6309 from ccstolley/ccs_fix_midx_offset
midx: fix large offset table check.
parents
11b81717
97954ee5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/libgit2/midx.c
+2
-2
No files found.
src/libgit2/midx.c
View file @
6bd024aa
...
@@ -431,8 +431,8 @@ int git_midx_entry_find(
...
@@ -431,8 +431,8 @@ int git_midx_entry_find(
object_offset
=
idx
->
object_offsets
+
pos
*
8
;
object_offset
=
idx
->
object_offsets
+
pos
*
8
;
offset
=
ntohl
(
*
((
uint32_t
*
)(
object_offset
+
4
)));
offset
=
ntohl
(
*
((
uint32_t
*
)(
object_offset
+
4
)));
if
(
offset
&
0x80000000
)
{
if
(
idx
->
object_large_offsets
&&
offset
&
0x80000000
)
{
uint32_t
object_large_offsets_pos
=
offset
&
0x7fffffff
;
uint32_t
object_large_offsets_pos
=
(
uint32_t
)
(
offset
^
0x80000000
)
;
const
unsigned
char
*
object_large_offsets_index
=
idx
->
object_large_offsets
;
const
unsigned
char
*
object_large_offsets_index
=
idx
->
object_large_offsets
;
/* Make sure we're not being sent out of bounds */
/* Make sure we're not being sent out of bounds */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment