From ec3ee28e7c3d46e2aa137fac569ec65515286098 Mon Sep 17 00:00:00 2001 From: harti Date: Wed, 25 May 2005 16:06:14 +0000 Subject: Under certain conditions the condition parser would go one past end of the string. Until now this caused no harm, because the buffer code used to tack two NULs onto buffers. With the new, soon to come, parsing code this isn't the case anymore in all cases, so fix this. --- usr.bin/make/cond.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c index 1066ae4..6e7a094 100644 --- a/usr.bin/make/cond.c +++ b/usr.bin/make/cond.c @@ -628,7 +628,7 @@ CondToken(Boolean doEval) } free(string); if (rhs == condExpr) { - if (!qt && *cp == ')') + if (*cp == '\0' || (!qt && *cp == ')')) condExpr = cp; else condExpr = cp + 1; -- cgit v1.1