Skip site navigation (1)Skip section navigation (2)
Date:      27 Apr 2003 01:54:26 -0400
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        current@freebsd.org
Subject:   Segfault in killall
Message-ID:  <1051422865.61654.2.camel@shumai.marcuscom.com>

next in thread | raw e-mail | index | archive | help

--=-EbhChI0NRJb8Gs1namoU
Content-Type: multipart/mixed; boundary="=-h1i109EZrSNgokcR7Moh"


--=-h1i109EZrSNgokcR7Moh
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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
--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-h1i109EZrSNgokcR7Moh
Content-Disposition: attachment; filename=killall.c.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=killall.c.diff; charset=ISO-8859-1

--- 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
@@ -153,6 +153,8 @@
 					++av;
 				--ac;
 				jflag++;
+				if (!*av)
+				    	errx(1, "must specify jid");
 				jid =3D strtol(*av, &ep, 10);
 				if (!*av || *ep)
 					errx(1, "illegal jid: %s", *av);

--=-h1i109EZrSNgokcR7Moh--

--=-EbhChI0NRJb8Gs1namoU
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQA+q3CRb2iPiv4Uz4cRAi7HAJ4psNjad6vB7+mCd8QLgfl/RFQQtACffOrT
8E90KED/RMomxuCPBLjP18E=
=amIw
-----END PGP SIGNATURE-----

--=-EbhChI0NRJb8Gs1namoU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1051422865.61654.2.camel>