From db494700d6dea25f39d3088459a3aef1a0f97c43 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 22 Aug 2014 11:06:05 -0600 Subject: [PATCH] We write an unsigned char, not an int, to the signal pipe. --- src/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/signal.c b/src/signal.c index 04da0b45e..59b5cdb38 100644 --- a/src/signal.c +++ b/src/signal.c @@ -96,8 +96,10 @@ restore_signals(void) } static void -sudo_handler(int signo) +sudo_handler(int s) { + unsigned char signo = (unsigned char)s; + /* * The pipe is non-blocking, if we overflow the kernel's pipe * buffer we drop the signal. This is not a problem in practice. -- 2.50.1