Merge branch 'obsd-master'

pull/1891/head
Thomas Adam 2019-08-29 18:02:29 +01:00
commit 648471ecee
1 changed files with 1 additions and 5 deletions

6
cmd.c
View File

@ -660,7 +660,7 @@ char *
cmd_template_replace(const char *template, const char *s, int idx)
{
char ch, *buf;
const char *ptr, *cp, quote[] = "\"\\$";
const char *ptr, *cp, quote[] = "\"\\$;";
int replaced, quoted;
size_t len;
@ -691,10 +691,6 @@ cmd_template_replace(const char *template, const char *s, int idx)
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';