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
53f2c6b1
Commit
53f2c6b1
authored
Dec 15, 2017
by
lhchavez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified overflow condition
parent
e7fac2af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
+1
-3
src/pack.c
+1
-3
No files found.
src/pack.c
View file @
53f2c6b1
...
@@ -944,11 +944,9 @@ git_off_t get_delta_base(
...
@@ -944,11 +944,9 @@ git_off_t get_delta_base(
c
=
base_info
[
used
++
];
c
=
base_info
[
used
++
];
unsigned_base_offset
=
(
unsigned_base_offset
<<
7
)
+
(
c
&
127
);
unsigned_base_offset
=
(
unsigned_base_offset
<<
7
)
+
(
c
&
127
);
}
}
if
((
size_t
)
delta_obj_offset
<=
unsigned_base_offset
)
if
(
unsigned_base_offset
==
0
||
(
size_t
)
delta_obj_offset
<=
unsigned_base_offset
)
return
0
;
/* out of bound */
return
0
;
/* out of bound */
base_offset
=
delta_obj_offset
-
unsigned_base_offset
;
base_offset
=
delta_obj_offset
-
unsigned_base_offset
;
if
(
base_offset
>=
delta_obj_offset
)
return
0
;
/* out of bound */
*
curpos
+=
used
;
*
curpos
+=
used
;
}
else
if
(
type
==
GIT_OBJ_REF_DELTA
)
{
}
else
if
(
type
==
GIT_OBJ_REF_DELTA
)
{
/* If we have the cooperative cache, search in it first */
/* If we have the cooperative cache, search in it first */
...
...
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