Skip to content

Commit b70dbaa

Browse files
authored
Merge pull request libgit2#6347 from libgit2/ethomson/no_pack_v3
pack: don't pretend we support pack files v3
2 parents 53cfad9 + 4597b86 commit b70dbaa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libgit2/pack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ typedef int git_pack_foreach_entry_offset_cb(
3333

3434
#define PACK_SIGNATURE 0x5041434b /* "PACK" */
3535
#define PACK_VERSION 2
36-
#define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3))
36+
#define pack_version_ok(v) ((v) == htonl(2))
3737
struct git_pack_header {
3838
uint32_t hdr_signature;
3939
uint32_t hdr_version;

tests/libgit2/pack/indexer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static const unsigned int corrupt_thin_pack_len = 67;
5959
* Packfile with a missing trailer.
6060
*/
6161
static const unsigned char missing_trailer_pack[] = {
62-
0x50, 0x41, 0x43, 0x4b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x50, 0xf4, 0x3b,
62+
0x50, 0x41, 0x43, 0x4b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x50, 0xf4, 0x3b,
6363
};
6464
static const unsigned int missing_trailer_pack_len = 12;
6565

@@ -68,7 +68,7 @@ static const unsigned int missing_trailer_pack_len = 12;
6868
* the stream reader.
6969
*/
7070
static const unsigned char leaky_pack[] = {
71-
0x50, 0x41, 0x43, 0x4b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03,
71+
0x50, 0x41, 0x43, 0x4b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03,
7272
0xf4, 0xbd, 0x51, 0x51, 0x51, 0x51, 0x51, 0x72, 0x65, 0x41, 0x4b, 0x63,
7373
0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0xbd, 0x41, 0x4b
7474
};

0 commit comments

Comments
 (0)