Commit Diff
--- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -1374,7 +1374,7 @@ enumeration_request(struct imsg *imsg, struct imsgbuf STAILQ_INIT(&commit_ids); - trees = calloc(1, nalloc); + trees = calloc(nalloc, sizeof(*trees)); if (trees == NULL) return got_error_from_errno("calloc");