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
4f7b568d
Unverified
Commit
4f7b568d
authored
Jun 11, 2022
by
Edward Thomson
Committed by
GitHub
Jun 11, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6291 from libgit2/cmn/midx-no-hash
midx: do not verify the checksum on load
parents
4f0ee02f
a3f9617b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
src/libgit2/midx.c
+0
-6
No files found.
src/libgit2/midx.c
View file @
4f7b568d
...
...
@@ -179,7 +179,6 @@ int git_midx_parse(
uint32_t
i
;
off64_t
last_chunk_offset
,
chunk_offset
,
trailer_offset
;
size_t
checksum_size
;
unsigned
char
checksum
[
GIT_HASH_SHA1_SIZE
];
int
error
;
struct
git_midx_chunk
chunk_packfile_names
=
{
0
},
chunk_oid_fanout
=
{
0
},
...
...
@@ -217,11 +216,6 @@ int git_midx_parse(
return
midx_error
(
"wrong index size"
);
memcpy
(
idx
->
checksum
,
data
+
trailer_offset
,
checksum_size
);
if
(
git_hash_buf
(
checksum
,
data
,
(
size_t
)
trailer_offset
,
GIT_HASH_ALGORITHM_SHA1
)
<
0
)
return
midx_error
(
"could not calculate signature"
);
if
(
memcmp
(
checksum
,
idx
->
checksum
,
checksum_size
)
!=
0
)
return
midx_error
(
"index signature mismatch"
);
chunk_hdr
=
data
+
sizeof
(
struct
git_midx_header
);
last_chunk
=
NULL
;
for
(
i
=
0
;
i
<
hdr
->
chunks
;
++
i
,
chunk_hdr
+=
12
)
{
...
...
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