diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 01:22:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 01:22:31 +0000 |
commit | 02601ee91226d216502307a86d992be9c5e63ed4 (patch) | |
tree | 3806082c5ba14a0d6e3b0e0b0dce967baf34a87f /bin/sh/input.c | |
parent | be5133be93f99257ff553dce82b4027ab1b0c036 (diff) |
update from netbsd, including:
Fix PR/1760, where 'cd -' before any other command could cause a reference
to an uninitialized pointer. Use getcwd() to get the current working directory,
instead of forking /bin/pwd [per Scott's suggestion]
Diffstat (limited to 'bin/sh/input.c')
-rw-r--r-- | bin/sh/input.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/sh/input.c b/bin/sh/input.c index 480082df44c..b4a26794c0a 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.18 1995/10/06 21:38:18 christos Exp $ */ +/* $NetBSD: input.c,v 1.19 1995/10/19 04:14:37 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)input.c 8.3 (Berkeley) 6/9/95"; #else -static char rcsid[] = "$NetBSD: input.c,v 1.18 1995/10/06 21:38:18 christos Exp $"; +static char rcsid[] = "$NetBSD: input.c,v 1.19 1995/10/19 04:14:37 christos Exp $"; #endif #endif /* not lint */ @@ -293,11 +293,13 @@ check: savec = *q; *q = '\0'; +#ifndef NO_HISTORY if (parsefile->fd == 0 && hist && something) { INTOFF; history(hist, whichprompt == 1 ? H_ENTER : H_ADD, parsenextc); INTON; } +#endif if (vflag) { out2str(parsenextc); |