summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 85a45dd..866593f 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -899,7 +899,7 @@ static int is_well_formed_var_name(const char *s, char terminator)
/* Replace each \x with x in place, return ptr past NUL. */
static char *unbackslash(char *src)
{
- char *dst = src;
+ char *dst = src = strchrnul(src, '\\');
while (1) {
if (*src == '\\')
src++;