Commit Diff


commit - f72ce919dd6d6c15679c5174c47912ac55be1e18
commit + ff08dcd6c83d27f29c7eb78f7b21fee64bebfdd2
blob - 45186fa65020450414f58d1089a1b4ee158eeff9
blob + ed227bda3d7a4ce423d882c19ae47793a302c675
--- lib/privsep.c
+++ lib/privsep.c
@@ -1452,8 +1452,7 @@ send_tree_entries(struct imsgbuf *ibuf, struct got_par
 	i = 0;
 	for (j = 0; j < nentries; j++) {
 		struct got_parsed_tree_entry *pte = &entries[j];
-		size_t len = SHA1_DIGEST_LENGTH + sizeof(pte->mode) +
-		    sizeof(pte->namelen) + pte->namelen;
+		size_t len = sizeof(struct got_imsg_tree_entry) + pte->namelen;
 
 		if (j > 0 &&
 		    entries_len + len > MAX_IMSGSIZE - IMSG_HEADER_SIZE) {