From: Anthony Minessale Date: Thu, 24 Aug 2017 16:17:11 +0000 (-0500) Subject: FS-10609: [mod_verto] Invalid pointer in verto channel #resolve X-Git-Tag: v1.8.0~289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eed17a6079956a3ef404a57a5144a9a96394f57a;p=thirdparty%2Ffreeswitch.git FS-10609: [mod_verto] Invalid pointer in verto channel #resolve --- diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index f7c94afd8b..299f1afe11 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -3383,7 +3383,14 @@ static switch_bool_t verto__info_func(const char *method, cJSON *params, jsock_t if ((dtmf = cJSON_GetObjectCstr(params, "dtmf"))) { verto_pvt_t *tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY); - char *send = switch_mprintf("~%s", dtmf); + char *send; + + if (!tech_pvt) { + cJSON_AddItemToObject(*response, "message", cJSON_CreateString("Invalid channel")); + err = 1; goto cleanup; + } + + send = switch_mprintf("~%s", dtmf); if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MODE)) { switch_core_session_t *other_session = NULL;