Debian bug report logs - #1764, boring messages


Message sent to debian-devel@pixar.com:


Subject: Bug#1764: /bin/kill segfaults
Reply-To: Herbert Xu <herbert@greathan.apana.org.au>, debian-bugs@pixar.com
Resent-From: Herbert Xu <herbert@greathan.apana.org.au>
Resent-To: debian-devel@pixar.com
Resent-Date: Wed, 25 Oct 1995 11:33:03 GMT
Resent-Message-ID: <debian-bugs-handler.1764.B10251128280@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: bsdutils
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Wed, 25 Oct 1995 11:33:03 GMT
Received: with rfc822 via encapsulated-mail; Wed, 25 Oct 1995 11:28:26 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t83xW-00027fC; Wed, 25 Oct 95 04:25 PDT
Received: from ion.apana.org.au by pixar.com with SMTP id AA19246
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 25 Oct 1995 04:24:54 -0700
Received: (from herbert@localhost) by greathan.apana.org.au (8.6.12/8.6.6) id PAA08510 for debian-bugs@pixar.com; Wed, 25 Oct 1995 15:40:36 +1000
From: Herbert Xu <herbert@greathan.apana.org.au>
Message-Id: <199510250540.PAA08510@greathan.apana.org.au>
To: debian-bugs@pixar.com
Date: Wed, 25 Oct 1995 15:40:09 +1000 (EST)
X-Mailer: ELM [version 2.4 PL24 PGP2]
Content-Type: text
Content-Length: 1960

Package: bsdutils
Version: 1.3-1

It is trivial to make /bin/kill segfault:
$ /bin/kill -l
INT QUIT ILL TRAP ABRT UNUSED FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD
Segmentation fault (core dumped)

The appended patch fixes the bug.  I suspect the person who wrote the code
has had some bad memories about Pascal :)

PS NSIG is the largest valid signal number + 1.

--
A.  B <=> True			B.  A <=> False
Email:  Herbert Xu ~{PmV>HI~} <herbert@greathan.apana.org.au>
PGP Key:  pgp-public-keys@pgp.mit.edu or any other key sites
--
--- kill.c.orig	Wed Mar 22 05:57:31 1995
+++ kill.c	Wed Oct 25 15:33:21 1995
@@ -57,8 +57,8 @@
   "QUIT",			/* 3 */
   "ILL",			/* 4 */
   "TRAP",			/* 5 */
-  "ABRT",			/* 6 */
-  "UNUSED",			/* 7 */
+  "IOT",			/* 6 */
+  "BUS",			/* 7 */
   "FPE",			/* 8 */
   "KILL",			/* 9 */
   "USR1",			/* 10 */
@@ -74,6 +74,15 @@
   "TSTP",			/* 20 */
   "TTIN",			/* 21 */
   "TTOU",			/* 22 */
+  "URG",			/* 23 */
+  "XCPU",			/* 24 */
+  "XFSZ",			/* 25 */
+  "VTALRM",			/* 26 */
+  "PROF",			/* 27 */
+  "WINCH",			/* 28 */
+  "IO",				/* 29 */
+  "PWR",			/* 30 */
+  "UNUSED",			/* 31 */
   NULL
 };
 #endif /* __linux__ */
@@ -105,7 +114,7 @@
 		if (isalpha(**argv)) {
 			if (!strncasecmp(*argv, "sig", 3))
 				*argv += 3;
-			for (numsig = NSIG, p = sys_signame + 1; --numsig; ++p)
+			for (numsig = NSIG, p = sys_signame; --numsig; ++p)
 				if (!strcasecmp(*p, *argv)) {
 					numsig = p - sys_signame;
 					break;
@@ -116,7 +125,7 @@
 			numsig = strtol(*argv, &ep, 10);
 			if (!*argv || *ep)
 				errx(1, "illegal signal number: %s", *argv);
-			if (numsig <= 0 || numsig > NSIG)
+			if (numsig <= 0 || numsig >= NSIG)
 				nosig(*argv);
 		} else
 			nosig(*argv);
@@ -156,7 +165,7 @@
 	const char *const *p;
 	int cnt;

-	for (cnt = NSIG, p = sys_signame + 1; --cnt; ++p) {
+	for (cnt = NSIG, p = sys_signame; --cnt; ++p) {
 		(void)fprintf(fp, "%s ", *p);
 		if (cnt == NSIG / 2)
 			(void)fprintf(fp, "\n");


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Herbert Xu <herbert@greathan.apana.org.au>
Subject: Bug#1764: Acknowledgement (was: /bin/kill segfaults)
In-Reply-To: <199510250540.PAA08510@greathan.apana.org.au>
References: <199510250540.PAA08510@greathan.apana.org.au>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#1764" or "Re: Bug#1764" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov