diff options
author | harti <harti@FreeBSD.org> | 2005-05-25 16:06:14 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-05-25 16:06:14 +0000 |
commit | ec3ee28e7c3d46e2aa137fac569ec65515286098 (patch) | |
tree | b2b1face4ca4493677a90d245f867cc56872dda9 /usr.bin/make/cond.c | |
parent | b1db94ccb3e505b2f910bcffba5eff9e77ea6b30 (diff) | |
download | FreeBSD-src-ec3ee28e7c3d46e2aa137fac569ec65515286098.zip FreeBSD-src-ec3ee28e7c3d46e2aa137fac569ec65515286098.tar.gz |
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.
Diffstat (limited to 'usr.bin/make/cond.c')
-rw-r--r-- | usr.bin/make/cond.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |