aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-10-09 13:43:32 -0500
committerRob Landley <rob@landley.net>2014-10-09 13:43:32 -0500
commit3d56716d362d6a827c5f81029ac64c71b56a2f5c (patch)
tree93377ffa6621214916c82b0985483e4d13822336 /toys/lsb
parent7196d758a0728bd43451f869eb85528b6cd20bea (diff)
downloadtoybox-3d56716d362d6a827c5f81029ac64c71b56a2f5c.tar.gz
Various bugfixes (mostly resource leaks) from Ashwini Sharma's static analysis, plus occasional tweak by me while reviewing them.
Diffstat (limited to 'toys/lsb')
-rw-r--r--toys/lsb/killall.c2
1 files changed, 1 insertions, 1 deletions
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;
}