Date: Wed, 20 Mar 2002 13:00:03 -0800 (PST) From: George Reid <greid@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/36141: sh dumps core Message-ID: <200203202100.g2KL03O84404@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/36141; it has been noted by GNATS.
From: George Reid <greid@FreeBSD.org>
To: Jan Willem Knopper <jwk@stack.nl>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/36141: sh dumps core
Date: Wed, 20 Mar 2002 20:56:44 +0000
On Wed, Mar 20, 2002 at 07:52:31PM +0100, Jan Willem Knopper wrote:
> >Description:
> sh coredumps when the builtin function hash is invocated with
> option -v and as an argument a full path (i.e. hash -v /bin/sh)
Please try the included patch. Should apply to CURRENT or STABLE.
Does sh have a MAINTAINER?
Index: exec.c
===================================================================
RCS file: /usr/home/ncvs/src/bin/sh/exec.c,v
retrieving revision 1.16
diff -u -r1.16 exec.c
--- exec.c 2 Feb 2002 06:50:46 -0000 1.16
+++ exec.c 20 Mar 2002 20:53:10 -0000
@@ -350,7 +350,10 @@
if (verbose) {
if (entry.cmdtype != CMDUNKNOWN) { /* if no error msg */
cmdp = cmdlookup(name, 0);
- printentry(cmdp, verbose);
+ if (cmdp != NULL)
+ printentry(cmdp, verbose);
+ else
+ outfmt(&errout, "%s: not found\n", name);
}
flushall();
}
--
George C A Reid Tel: (08701) 200870 Ext. 26654
WWW: http://people.FreeBSD.org/~greid/ Mob: (07740) 197460
FreeBSD Committer/Developer greid@FreeBSD.org
Oriel College, Oxford University george.reid@oriel.ox.ac.uk
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203202100.g2KL03O84404>
