summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-10-09 19:37:26 +0000
committerru <ru@FreeBSD.org>2006-10-09 19:37:26 +0000
commit36b138121c81c15150f13d1b58cb83479a0e2b5c (patch)
tree24176dfe4565edf21182926851beec99d3c279a1 /usr.bin/make
parentce49ada06f13373fb76d0f8a5693e867f059f594 (diff)
downloadFreeBSD-src-36b138121c81c15150f13d1b58cb83479a0e2b5c.zip
FreeBSD-src-36b138121c81c15150f13d1b58cb83479a0e2b5c.tar.gz
Don't go beyond the provided string when parsing the `\' character.
PR: bin/99985 Submitted by: Nate Eldredge MFC after: 3 days
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/str.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c
index 288df8c..81bb7a3 100644
--- a/usr.bin/make/str.c
+++ b/usr.bin/make/str.c
@@ -260,8 +260,10 @@ brk_string(ArgArray *aa, const char str[], Boolean expand)
}
} else {
*arg++ = str[0];
- ++str;
- *arg++ = str[0];
+ if (str[1] != '\0') {
+ ++str;
+ *arg++ = str[0];
+ }
}
break;
default:
OpenPOWER on IntegriCloud