Unverified Commit e6cdd17c by Patrick Steinhardt Committed by GitHub

Merge pull request #4695 from nelhage/git_pkt-type-confusion

Fix type confusion in git_smart__connect
parents 983f72c5 0098d746
......@@ -266,7 +266,12 @@ static int git_smart__connect(
/* We now have loaded the refs. */
t->have_refs = 1;
first = (git_pkt_ref *)git_vector_get(&t->refs, 0);
pkt = (git_pkt *)git_vector_get(&t->refs, 0);
if (pkt && GIT_PKT_REF != pkt->type) {
giterr_set(GITERR_NET, "invalid response");
return -1;
}
first = (git_pkt_ref *)pkt;
if ((error = git_vector_init(&symrefs, 1, NULL)) < 0)
return error;
......
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