diff options
author | nicm <nicm> | 2017-01-10 18:10:24 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-01-10 18:10:24 +0000 |
commit | aa4de2d4b29fc7bdb15a207d44682a173ab874b6 (patch) | |
tree | 7924d65fccbb1c7f27c9dee9f192bafc8187f704 /cmd.c | |
parent | 5ea7a00ebac6d6d6423667a3637bc575515b3be0 (diff) | |
download | rtmux-aa4de2d4b29fc7bdb15a207d44682a173ab874b6.tar.gz rtmux-aa4de2d4b29fc7bdb15a207d44682a173ab874b6.tar.bz2 rtmux-aa4de2d4b29fc7bdb15a207d44682a173ab874b6.zip |
Need to escape ; twice because the command list parser will eat one,
reported by Theo Buehler.
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -690,10 +690,14 @@ cmd_template_replace(const char *template, const char *s, int idx) if (quoted) ptr++; - buf = xrealloc(buf, len + (strlen(s) * 2) + 1); + buf = xrealloc(buf, len + (strlen(s) * 3) + 1); for (cp = s; *cp != '\0'; cp++) { if (quoted && strchr(quote, *cp) != NULL) buf[len++] = '\\'; + if (quoted && *cp == ';') { + buf[len++] = '\\'; + buf[len++] = '\\'; + } buf[len++] = *cp; } buf[len] = '\0'; |