Fix for buffer overrun in tokenizer for strings that end with backslash

Fixes https://github.com/fish-shell/fish-shell/issues/389
This commit is contained in:
ridiculousfish 2012-11-20 14:51:30 -08:00
parent e9d216bc84
commit 04b1b83039

View file

@ -295,7 +295,9 @@ static void read_string(tokenizer *tok)
}
else
{
/* Since we are about to increment tok->buff, decrement it first so the increment doesn't go past the end of the buffer. https://github.com/fish-shell/fish-shell/issues/389 */
do_loop = 0;
tok->buff--;
}