From a27fe4c5a5084a5d80808bd0aa0a45c697fea897 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 26 Dec 2013 23:57:10 +0500 Subject: [PATCH] some null checks from coverity --- src/switch_ivr_play_say.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 47451c3ca6..74ed83efb8 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1084,7 +1084,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess arg_recursion_check_start(args); - if (!strcasecmp(read_impl.iananame, "l16")) { + if (!zstr(read_impl.iananame) && !strcasecmp(read_impl.iananame, "l16")) { l16++; } @@ -1997,7 +1997,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session, switch_channel_set_variable(channel, SWITCH_READ_TERMINATOR_USED_VARIABLE, tb); - if ((p = strchr(valid_terminators, tb[0]))) { + if (!zstr(valid_terminators) && (p = strchr(valid_terminators, tb[0]))) { if (p >= (valid_terminators + 1) && (*(p - 1) == '+' || *(p - 1) == 'x')) { switch_snprintf(digit_buffer + strlen(digit_buffer), digit_buffer_length - strlen(digit_buffer), "%s", tb); if (*(p - 1) == 'x') {