]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10896: [freeswitch-core] Parse error on originate syntax with nested square bracke...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 12 Jan 2018 06:37:35 +0000 (00:37 -0600)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:39 +0000 (07:21 +0000)
src/switch_ivr_originate.c

index 3794ba73b45df34c9564dd94345024a340f19b8c..872ed4ff573366d2992d5314964c4d2837ced446 100644 (file)
@@ -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++;