Segfault in killall

From: Joe Marcus Clarke <marcus_at_marcuscom.com>
Date: 27 Apr 2003 01:54:26 -0400
I was playing around with jails on -CURRENT, and I noticed typing
"killall -j" causes a segfault in strtol.  I didn't see a PR opened, but
I can open one if need be.  The attached fix is pretty simple.

Joe
-- 
PGP Key : http://www.marcuscom.com/pgp.asc

--- src/usr.bin/killall.c.orig	Sun Apr 27 01:52:18 2003
+++ src/usr.bin/killall.c	Sun Apr 27 01:55:12 2003
_at__at_ -153,6 +153,8 _at__at_
 					++av;
 				--ac;
 				jflag++;
+				if (!*av)
+				    	errx(1, "must specify jid");
 				jid = strtol(*av, &ep, 10);
 				if (!*av || *ep)
 					errx(1, "illegal jid: %s", *av);

Received on Sat Apr 26 2003 - 21:56:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:05 UTC