Merge branch 'jk/protocol-cap-parse-fix'
The code to parse capability list for v0 on-wire protocol fell into
an infinite loop when a capability appears multiple times, which
has been corrected.
* jk/protocol-cap-parse-fix:
v0 protocol: use size_t for capability length/offset
t5512: test "ls-remote --heads --symref" filtering with v0 and v2
t5512: allow any protocol version for filtered symref test
t5512: add v2 support for "ls-remote --symref" test
v0 protocol: fix sha1/sha256 confusion for capabilities^{}
t5512: stop referring to "v1" protocol
v0 protocol: fix infinite loop when parsing multi-valued capabilities
This commit is contained in:
@ -1100,7 +1100,7 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
|
||||
struct ref *ref = copy_ref_list(orig_ref);
|
||||
struct object_id oid;
|
||||
const char *agent_feature;
|
||||
int agent_len;
|
||||
size_t agent_len;
|
||||
struct fetch_negotiator negotiator_alloc;
|
||||
struct fetch_negotiator *negotiator;
|
||||
|
||||
@ -1118,7 +1118,7 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
|
||||
agent_supported = 1;
|
||||
if (agent_len)
|
||||
print_verbose(args, _("Server version is %.*s"),
|
||||
agent_len, agent_feature);
|
||||
(int)agent_len, agent_feature);
|
||||
}
|
||||
|
||||
if (!server_supports("session-id"))
|
||||
|
||||
Reference in New Issue
Block a user