From: Anthony Minessale Date: Fri, 12 Jan 2018 06:37:35 +0000 (-0600) Subject: FS-10896: [freeswitch-core] Parse error on originate syntax with nested square bracke... X-Git-Tag: v1.8.1~3^2~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfd7761e9f77a42b24349d93215e3b25a0ae01df;p=thirdparty%2Ffreeswitch.git FS-10896: [freeswitch-core] Parse error on originate syntax with nested square brackets #resolve --- diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 3794ba73b4..872ed4ff57 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -2628,7 +2628,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess p = pipe_names[r]; while (p && *p) { - if (*p == '[') { + if (!end && *p == '[') { end = switch_find_end_paren(p, '[', ']'); if (*(p+1) == '^' && *(p + 2) == '^') { alt = 1; @@ -2652,7 +2652,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess } if (p == end) { - end = switch_strchr_strict(p, '[', " "); + end = NULL; } p++;