From cfd7761e9f77a42b24349d93215e3b25a0ae01df Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 12 Jan 2018 00:37:35 -0600 Subject: [PATCH] FS-10896: [freeswitch-core] Parse error on originate syntax with nested square brackets #resolve --- src/switch_ivr_originate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++;