From 3d56716d362d6a827c5f81029ac64c71b56a2f5c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 9 Oct 2014 13:43:32 -0500 Subject: Various bugfixes (mostly resource leaks) from Ashwini Sharma's static analysis, plus occasional tweak by me while reviewing them. --- toys/lsb/killall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/lsb') diff --git a/toys/lsb/killall.c b/toys/lsb/killall.c index f3d689b3..478f7617 100644 --- a/toys/lsb/killall.c +++ b/toys/lsb/killall.c @@ -40,7 +40,7 @@ static int kill_process(pid_t pid, char *name) if (pid == TT.cur_pid) return 0; if (toys.optflags & FLAG_i) { - sprintf(toybuf, "Signal %4000s(%d) ?", name, (int)pid); + snprintf(toybuf, sizeof(toybuf), "Signal %s(%d) ?", name, (int)pid); if (!yesno(toybuf, 0)) return 0; } -- cgit v1.2.3