diff options
author | blu <none@none> | 2006-05-19 04:57:28 -0700 |
---|---|---|
committer | blu <none@none> | 2006-05-19 04:57:28 -0700 |
commit | fd5e9823d4460a5415f67ed45c1ba18531689ecc (patch) | |
tree | 6f6385e4e1c536aed301c26fd0d5f305ababefc7 /usr/src/cmd/csh | |
parent | 0b46ffbad80838700776674f5dea3ad9b16dd6e4 (diff) | |
download | illumos-gate-fd5e9823d4460a5415f67ed45c1ba18531689ecc.tar.gz |
4635088 *csh* /usr/bin/csh dumps core with incomplete while or if expression
Contributed by Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/cmd/csh')
-rw-r--r-- | usr/src/cmd/csh/sh.exp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/cmd/csh/sh.exp.c b/usr/src/cmd/csh/sh.exp.c index 12eae9e96b..2447692682 100644 --- a/usr/src/cmd/csh/sh.exp.c +++ b/usr/src/cmd/csh/sh.exp.c @@ -1,5 +1,5 @@ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -524,7 +524,7 @@ exp6(tchar ***vp, bool ignore) * an error. Even this check isn't quite right, since * it doesn't take globbing into account. */ - if (isa(**vp, ANYOP) && stat_(**vp, &stb)) + if ((**vp == NULL) || isa(**vp, ANYOP) && stat_(**vp, &stb)) bferr("Missing file name"); dp = *(*vp)++; |