]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
arg checking.
authorMichael Jerris <mike@jerris.com>
Sun, 6 Jan 2008 22:18:47 +0000 (22:18 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 6 Jan 2008 22:18:47 +0000 (22:18 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7111 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c

index 1a5df6a109e9c1a0b33b042ad854ce6fb2ce3ab5..dd5ed80a7bcb1a9f45e814ce29f54ab7f2f3159c 100644 (file)
@@ -3952,8 +3952,8 @@ SWITCH_STANDARD_APP(conference_function)
        uint32_t flags = 0;
        conference_member_t member = { 0 };
        conference_obj_t *conference = NULL;
-       switch_channel_t *channel = NULL;
-       char *mydata = switch_core_session_strdup(session, data);
+       switch_channel_t *channel = switch_core_session_get_channel(session);
+       char *mydata = NULL;
        char *conf_name = NULL;
        char *bridge_prefix = "bridge:";
        char *flags_prefix = "+flags{";
@@ -3968,9 +3968,15 @@ SWITCH_STANDARD_APP(conference_function)
        conf_xml_cfg_t xml_cfg = { 0 };
        char *params = NULL;
 
-       channel = switch_core_session_get_channel(session);
        switch_assert(channel != NULL);
 
+       if (switch_strlen_zero(data)) {
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid arguments\n");
+               return;
+       }
+
+       mydata = switch_core_session_strdup(session, data);
+
        if (!mydata) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Pool Failure\n");
                return;