]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/receive-pack.c
Merge branch 'jc/calloc-fix'
[thirdparty/git.git] / builtin / receive-pack.c
index d49d050e6e57c0dd8f795a36d6f1a64aa7c8ddee..17247269d2827cd589ebcfb97dd770efc2b61b56 100644 (file)
@@ -764,7 +764,7 @@ static void prepare_push_cert_sha1(struct child_process *proc)
 
                memset(&sigcheck, '\0', sizeof(sigcheck));
 
-               bogs = parse_signature(push_cert.buf, push_cert.len);
+               bogs = parse_signed_buffer(push_cert.buf, push_cert.len);
                check_signature(push_cert.buf, bogs, push_cert.buf + bogs,
                                push_cert.len - bogs, &sigcheck);
 
@@ -2050,7 +2050,7 @@ static void queue_commands_from_cert(struct command **tail,
                die("malformed push certificate %.*s", 100, push_cert->buf);
        else
                boc += 2;
-       eoc = push_cert->buf + parse_signature(push_cert->buf, push_cert->len);
+       eoc = push_cert->buf + parse_signed_buffer(push_cert->buf, push_cert->len);
 
        while (boc < eoc) {
                const char *eol = memchr(boc, '\n', eoc - boc);
@@ -2275,7 +2275,7 @@ static const char *unpack(int err_fd, struct shallow_info *si)
                status = start_command(&child);
                if (status)
                        return "index-pack fork failed";
-               pack_lockfile = index_pack_lockfile(child.out);
+               pack_lockfile = index_pack_lockfile(child.out, NULL);
                close(child.out);
                status = finish_command(&child);
                if (status)
@@ -2313,11 +2313,9 @@ static void prepare_shallow_update(struct shallow_info *si)
        ALLOC_ARRAY(si->used_shallow, si->shallow->nr);
        assign_shallow_commits_to_refs(si, si->used_shallow, NULL);
 
-       si->need_reachability_test =
-               xcalloc(si->shallow->nr, sizeof(*si->need_reachability_test));
-       si->reachable =
-               xcalloc(si->shallow->nr, sizeof(*si->reachable));
-       si->shallow_ref = xcalloc(si->ref->nr, sizeof(*si->shallow_ref));
+       CALLOC_ARRAY(si->need_reachability_test, si->shallow->nr);
+       CALLOC_ARRAY(si->reachable, si->shallow->nr);
+       CALLOC_ARRAY(si->shallow_ref, si->ref->nr);
 
        for (i = 0; i < si->nr_ours; i++)
                si->need_reachability_test[si->ours[i]] = 1;