void-packages/srcpkgs/shadow/patches/fix-su-snprintf.patch

18 lines
595 B
Diff

https://github.com/shadow-maint/shadow/issues/32
Anyway, we use su from util-linux.
--- src/su.c.orig 2016-12-01 20:41:50.000000000 +0100
+++ src/su.c 2017-02-26 17:36:32.291904996 +0100
@@ -373,8 +373,8 @@
stderr);
(void) kill (-pid_child, caught);
- snprintf (kill_msg, _(" ...killed.\n"));
- snprintf (wait_msg, _(" ...waiting for child to terminate.\n"));
+ snprintf (kill_msg, sizeof kill_msg, _(" ...killed.\n"));
+ snprintf (wait_msg, sizeof wait_msg, _(" ...waiting for child to terminate.\n"));
(void) signal (SIGALRM, kill_child);
(void) alarm (2);