summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-01-08 18:37:34 +0000
committerjkh <jkh@FreeBSD.org>1999-01-08 18:37:34 +0000
commit670683fcb99d8dc6fd235f8111c5c641e149a065 (patch)
treeb72ab1319822ebfa683875784e7a57cfbd6a9d82
parenta8dc66f457be84eefbe16e70c901ceb11137ba65 (diff)
downloadFreeBSD-src-670683fcb99d8dc6fd235f8111c5c641e149a065.zip
FreeBSD-src-670683fcb99d8dc6fd235f8111c5c641e149a065.tar.gz
Don't allow pointer underrun in loop.
Spotted by: John W. DeBoskey <jwd@unx.sas.com>
-rw-r--r--usr.bin/make/parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 388fa07..fda738a 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -41,7 +41,7 @@
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#endif
static const char rcsid[] =
- "$Id: parse.c,v 1.18 1997/07/24 06:58:08 charnier Exp $";
+ "$Id: parse.c,v 1.19 1998/05/25 03:28:37 steve Exp $";
#endif /* not lint */
/*-
@@ -1412,8 +1412,10 @@ Parse_DoVar (line, ctxt)
default:
#ifdef SUNSHCMD
while (*opc != ':')
- if (--opc < line)
+ if (opc == line)
break;
+ else
+ --opc;
if (strncmp(opc, ":sh", 3) == 0) {
type = VAR_SHELL;
OpenPOWER on IntegriCloud