Commit 5146eb392b43b61472c67037a21b28f18ce99955

Stefan Sperling 2020-03-20T20:23:18

fix allocation size in got_privsep_recv_gitconfig_remotes(); found by free(3)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/privsep.c b/lib/privsep.c
index 62e292d..c03ab3d 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -1992,7 +1992,7 @@ got_privsep_recv_gitconfig_remotes(struct got_remote_repo **remotes,
 
 	imsg_free(&imsg);
 
-	*remotes = recallocarray(NULL, 0, iremotes.nremotes, sizeof(iremote));
+	*remotes = recallocarray(NULL, 0, iremotes.nremotes, sizeof(**remotes));
 	if (*remotes == NULL)
 		return got_error_from_errno("recallocarray");