From bb88d74689ccb70d8bf339fc12d0d86b4aa0ae10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 29 May 2017 20:51:16 +0200 Subject: [PATCH] qrexec: fix pending requests cleanup code (cont) There was a second place with exactly the same bug. See dad208a "qrexec: fix pending requests cleanup code" for details. Fixes QubesOS/qubes-issues#2699 (cherry picked from commit 8719e5d74c9a6c181149fde11d9f67cb8b942441) --- qrexec/qrexec-daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qrexec/qrexec-daemon.c b/qrexec/qrexec-daemon.c index 41cb7a4..0cf58a1 100644 --- a/qrexec/qrexec-daemon.c +++ b/qrexec/qrexec-daemon.c @@ -417,7 +417,7 @@ static int handle_cmdline_body_from_client(int fd, struct msg_header *hdr) strncmp(policy_pending[i].params.ident, buf, len) == 0) { policy_pending[i].pid = 0; while (policy_pending_max > 0 && - policy_pending[policy_pending_max].pid > 0) + policy_pending[policy_pending_max].pid == 0) policy_pending_max--; break; }