From da3a4c54a8ce8a7dc442c70bda9b7eda22d43e57 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 31 Jul 2020 17:20:31 +0900 Subject: [PATCH] agent: Fix coercion for pinentry_pid handling. * agent/call-pinentry.c (start_pinentry): Don't use pid_t. -- When pid_t is 64-bit integer and unsigned long is 32-bit, it never matches, because left hand side does not fill upper 32-bit. Signed-off-by: NIIBE Yutaka --- agent/call-pinentry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 89249b6e8..a2ac14ab2 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -682,7 +682,7 @@ start_pinentry (ctrl_t ctrl) log_info ("You may want to update to a newer pinentry\n"); rc = 0; } - else if (!rc && (pid_t)pinentry_pid == (pid_t)(-1)) + else if (!rc && pinentry_pid == (unsigned long)(-1L)) log_error ("pinentry did not return a PID\n"); else {