Commit Diff


commit - f300c925ecb7ebc05b5b65b00e0c845cbd4965d5
commit + 3502917311ef24ed3061bc9e3bdd2512f5519f34
blob - 460b92c34a33a3c21a304ba83a835391f3b6db31
blob + 09220338d83b41d5d49414631079238d7ba78294
--- libexec/got-read-pack/got-read-pack.c
+++ libexec/got-read-pack/got-read-pack.c
@@ -695,7 +695,7 @@ commit_traversal_request(struct imsg *imsg, struct ims
 		}
 
 		if (sizeof(struct got_imsg_traversed_commits) +
-		    ncommits * sizeof(commit_ids[0]) >= max_datalen) {
+		    (ncommits + 1) * sizeof(commit_ids[0]) >= max_datalen) {
 			err = send_traversed_commits(commit_ids, ncommits,
 			    ibuf);
 			if (err)