Unverified Commit b70dbaa2 by Edward Thomson Committed by GitHub

Merge pull request #6347 from libgit2/ethomson/no_pack_v3

pack: don't pretend we support pack files v3
parents 53cfad9e 4597b869
......@@ -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;
......
......@@ -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, 0x03, 0x00, 0x50, 0xf4, 0x3b,
0x50, 0x41, 0x43, 0x4b, 0x00, 0x00, 0x00, 0x02, 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, 0x03, 0x00, 0x00, 0x00, 0x03,
0x50, 0x41, 0x43, 0x4b, 0x00, 0x00, 0x00, 0x02, 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
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment