diff options
author | ?ukasz Szpakowski <luckboy@vp.pl> | 2014-09-22 08:32:21 -0500 |
---|---|---|
committer | ?ukasz Szpakowski <luckboy@vp.pl> | 2014-09-22 08:32:21 -0500 |
commit | 08ac30d8606934a7bd8107312b0b2f3beeb315f5 (patch) | |
tree | 0d44d12ec16ae7c4ca740db4bac9451b3db15107 | |
parent | 986805cfe85c7e817d8ee5b1d3cc7a8a231359da (diff) | |
download | toybox-08ac30d8606934a7bd8107312b0b2f3beeb315f5.tar.gz |
When killall was invoked without arguments, there appeared segmentation fault
-rw-r--r-- | toys/lsb/killall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/lsb/killall.c b/toys/lsb/killall.c index e01757a0..f3d689b3 100644 --- a/toys/lsb/killall.c +++ b/toys/lsb/killall.c @@ -72,7 +72,7 @@ void killall_main(void) return; } - if (TT.sig || **TT.names == '-') { + if (TT.sig || (*TT.names && **TT.names == '-')) { if (0 > (TT.signum = sig_to_num(TT.sig ? TT.sig : (*TT.names)+1))) { if (toys.optflags & FLAG_q) exit(1); error_exit("Invalid signal"); |