From 0171a64a76fd30b5fd804250b4ccdb16ce600dd3 Mon Sep 17 00:00:00 2001 From: Chris Rienzo Date: Tue, 16 Apr 2019 18:28:42 +0000 Subject: [PATCH] FS-11785 [mod_dptools] fix dead assignment and potential dereference of null pointer --- src/mod/applications/mod_dptools/mod_dptools.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index f0e18b3336..91999f91b3 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -160,7 +160,7 @@ static switch_status_t digit_action_callback(switch_ivr_dmachine_match_t *match) switch_status_t status; int exec = 0; int api = 0; - char *string = act->string; + char *string = NULL; switch_channel_t *channel; switch_core_session_t *use_session = act->session; int x = 0; @@ -3532,7 +3532,6 @@ SWITCH_STANDARD_APP(audio_bridge_function) } if (status == SWITCH_STATUS_SUCCESS) { - camping = 0; break; } else { fail = 1; @@ -3554,7 +3553,6 @@ SWITCH_STANDARD_APP(audio_bridge_function) if (camp_loops++) { if (--campon_retries <= 0 || stake.do_xfer) { - camping = 0; stake.do_xfer = 1; break; } @@ -5824,7 +5822,7 @@ void *SWITCH_THREAD_FUNC call_monitor_thread(switch_thread_t *thread, void *obj) data++; } - while (*data == '<') { + while (data && *data == '<') { char *parsed = NULL; if (switch_event_create_brackets(data, '<', '>', ',', &var_event, &parsed, SWITCH_FALSE) != SWITCH_STATUS_SUCCESS || !parsed) { @@ -6026,7 +6024,7 @@ SWITCH_STANDARD_API(page_api_function) char *oexten = NULL; const char *context = NULL; const char *dp = "inline"; - const char *pdata = data; + const char *pdata = NULL; const char *l; uint32_t chunk_size = 10; const char *path; @@ -6044,7 +6042,7 @@ SWITCH_STANDARD_API(page_api_function) data++; } - while (*data == '(') { + while (data && *data == '(') { char *parsed = NULL; if (switch_event_create_brackets(data, '(', ')', ',', &var_event, &parsed, SWITCH_FALSE) != SWITCH_STATUS_SUCCESS || !parsed) {