Commit cbfaaf20825023a414d1e834698bc588835f0ccf

Stefan Sperling 2020-01-06T12:15:54

add missing check for errors from imsg_get()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/privsep.c b/lib/privsep.c
index f31cafb..16a5ac4 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -148,6 +148,8 @@ got_privsep_recv_imsg(struct imsg *imsg, struct imsgbuf *ibuf,
 		if (err)
 			return err;
 		n = imsg_get(ibuf, imsg);
+		if (n == -1)
+			return got_error_from_errno("imsg_get");
 	}
 
 	if (imsg->hdr.len < IMSG_HEADER_SIZE + min_datalen)