diff options
author | ru <ru@FreeBSD.org> | 2006-10-09 19:37:26 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-10-09 19:37:26 +0000 |
commit | 36b138121c81c15150f13d1b58cb83479a0e2b5c (patch) | |
tree | 24176dfe4565edf21182926851beec99d3c279a1 /usr.bin/make | |
parent | ce49ada06f13373fb76d0f8a5693e867f059f594 (diff) | |
download | FreeBSD-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.c | 6 |
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: |