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
b70dbaa2
Unverified
Commit
b70dbaa2
authored
Jul 12, 2022
by
Edward Thomson
Committed by
GitHub
Jul 12, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6347 from libgit2/ethomson/no_pack_v3
pack: don't pretend we support pack files v3
parents
53cfad9e
4597b869
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/libgit2/pack.h
+1
-1
tests/libgit2/pack/indexer.c
+2
-2
No files found.
src/libgit2/pack.h
View file @
b70dbaa2
...
...
@@ -33,7 +33,7 @@ typedef int git_pack_foreach_entry_offset_cb(
#define PACK_SIGNATURE 0x5041434b
/* "PACK" */
#define PACK_VERSION 2
#define pack_version_ok(v) ((v) == htonl(2)
|| (v) == htonl(3)
)
#define pack_version_ok(v) ((v) == htonl(2))
struct
git_pack_header
{
uint32_t
hdr_signature
;
uint32_t
hdr_version
;
...
...
tests/libgit2/pack/indexer.c
View file @
b70dbaa2
...
...
@@ -59,7 +59,7 @@ static const unsigned int corrupt_thin_pack_len = 67;
* Packfile with a missing trailer.
*/
static
const
unsigned
char
missing_trailer_pack
[]
=
{
0x50
,
0x41
,
0x43
,
0x4b
,
0x00
,
0x00
,
0x00
,
0x0
3
,
0x00
,
0x50
,
0xf4
,
0x3b
,
0x50
,
0x41
,
0x43
,
0x4b
,
0x00
,
0x00
,
0x00
,
0x0
2
,
0x00
,
0x50
,
0xf4
,
0x3b
,
};
static
const
unsigned
int
missing_trailer_pack_len
=
12
;
...
...
@@ -68,7 +68,7 @@ static const unsigned int missing_trailer_pack_len = 12;
* the stream reader.
*/
static
const
unsigned
char
leaky_pack
[]
=
{
0x50
,
0x41
,
0x43
,
0x4b
,
0x00
,
0x00
,
0x00
,
0x0
3
,
0x00
,
0x00
,
0x00
,
0x03
,
0x50
,
0x41
,
0x43
,
0x4b
,
0x00
,
0x00
,
0x00
,
0x0
2
,
0x00
,
0x00
,
0x00
,
0x03
,
0xf4
,
0xbd
,
0x51
,
0x51
,
0x51
,
0x51
,
0x51
,
0x72
,
0x65
,
0x41
,
0x4b
,
0x63
,
0x5f
,
0x64
,
0x65
,
0x70
,
0x74
,
0x68
,
0xbd
,
0x41
,
0x4b
};
...
...
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