FS-5449: apply correct quoting, got older version of patch accidentally
This commit is contained in:
parent
634a507546
commit
fc39b77520
|
@ -2371,8 +2371,8 @@ SWITCH_DECLARE(char *) switch_util_quote_shell_arg_pool(const char *string, swit
|
||||||
switch (string[i]) {
|
switch (string[i]) {
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
case '\'':
|
case '\'':
|
||||||
/* We replace ' by sq dq sq dq sq, so need 4 additional bytes */
|
/* We replace ' by sq backslace sq sq, so need 3 additional bytes */
|
||||||
dest_len += 4;
|
dest_len += 3;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -2380,7 +2380,7 @@ SWITCH_DECLARE(char *) switch_util_quote_shell_arg_pool(const char *string, swit
|
||||||
dest_len += 1; /* closing quote */
|
dest_len += 1; /* closing quote */
|
||||||
|
|
||||||
/* if we're given a pool, allocate from it, otherwise use malloc */
|
/* if we're given a pool, allocate from it, otherwise use malloc */
|
||||||
if ( pool ) {
|
if (pool) {
|
||||||
dest = switch_core_alloc(pool, sizeof(char) * dest_len);
|
dest = switch_core_alloc(pool, sizeof(char) * dest_len);
|
||||||
} else {
|
} else {
|
||||||
dest = (char *) malloc(sizeof(char) * dest_len);
|
dest = (char *) malloc(sizeof(char) * dest_len);
|
||||||
|
@ -2402,11 +2402,10 @@ SWITCH_DECLARE(char *) switch_util_quote_shell_arg_pool(const char *string, swit
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
case '\'':
|
case '\'':
|
||||||
/* We replace ' by sq dq sq dq sq */
|
/* We replace ' by sq backslash sq sq */
|
||||||
dest[n++] = '\'';
|
dest[n++] = '\'';
|
||||||
dest[n++] = '"';
|
dest[n++] = '\\';
|
||||||
dest[n++] = '\'';
|
dest[n++] = '\'';
|
||||||
dest[n++] = '"';
|
|
||||||
dest[n++] = '\'';
|
dest[n++] = '\'';
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue