Merge branch 'tokenizer-reset-argv-on-error'

Closes #49.
This commit is contained in:
Daniel Eklöf 2020-07-27 16:42:02 +02:00
commit 3b2492029e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 5 additions and 1 deletions

View file

@ -42,6 +42,9 @@
### Fixed
* Crash in scrollback search
* Crash when a **pipe-visible** or **pipe-scrollback** command
contained an unclosed quote
(https://codeberg.org/dnkl/foot/issues/49).
### Security

View file

@ -44,8 +44,9 @@ tokenize_cmdline(char *cmdline, char ***argv)
char *end = strchr(p, delim);
if (end == NULL) {
if (delim != ' ') {
LOG_ERR("unterminated %s quote\n", delim == '"' ? "double" : "single");
LOG_ERR("unterminated %s quote", delim == '"' ? "double" : "single");
free(*argv);
*argv = NULL;
return false;
}