Skip to content

Commit

Permalink
Fix escaping bug in parse_command_arg()
Browse files Browse the repository at this point in the history
The position wasn't being advanced properly when parsing unquoted
escapes. It seems to have gone unnoticed because most characters
are unescaped as themselves, but certain special characters aren't
(e.g. '-').
  • Loading branch information
craigbarnes committed Apr 22, 2019
1 parent 59c4dc2 commit 3038220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ char *parse_command_arg(const char *cmd, size_t len, bool tilde)
if (pos == len) {
goto end;
}
ch = cmd[pos];
ch = cmd[pos++];
// Fallthrough
default:
string_add_byte(&buf, ch);
Expand Down

0 comments on commit 3038220

Please sign in to comment.