From: Todd C. Miller Date: Fri, 22 Aug 2014 17:06:05 +0000 (-0600) Subject: We write an unsigned char, not an int, to the signal pipe. X-Git-Tag: SUDO_1_8_11^2~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db494700d6dea25f39d3088459a3aef1a0f97c43;p=sudo We write an unsigned char, not an int, to the signal pipe. --- 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.