OSDN Git Service
(root)
/
android-x86
/
external-musl-libc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9bdfd1
)
fix wordexp not to read past end of string ending with lone backslash
author
Rich Felker
<dalias@aerifal.cx>
Mon, 10 Dec 2018 03:20:15 +0000
(22:20 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 10 Dec 2018 03:20:15 +0000
(22:20 -0500)
src/misc/wordexp.c
patch
|
blob
|
history
diff --git
a/src/misc/wordexp.c
b/src/misc/wordexp.c
index
d123cf7
..
db83a69
100644
(file)
--- a/
src/misc/wordexp.c
+++ b/
src/misc/wordexp.c
@@
-42,7
+42,7
@@
static int do_wordexp(const char *s, wordexp_t *we, int flags)
if (flags & WRDE_NOCMD) for (i=0; s[i]; i++) switch (s[i]) {
case '\\':
- if (!sq
) i++
;
+ if (!sq
&& !s[++i]) return WRDE_SYNTAX
;
break;
case '\'':
if (!dq) sq^=1;