diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index e7f9021596..2d2924e18a 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -544,7 +544,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_eavesdrop_session(switch_core_session if ( (argc = switch_separate_string(data, ',', argv, (sizeof(argv) / sizeof(argv[0])))) ) { for ( i = 0; i < argc; i++ ) { /* If one of the group matches, then ok */ - if ( !strcmp(argv[i], require_group)) { + if (argv[i] && !strcmp(argv[i], require_group)) { ok = 1; } } diff --git a/src/switch_utils.c b/src/switch_utils.c index 498ba67469..3f7d4df720 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -1097,8 +1097,7 @@ SWITCH_DECLARE(int) switch_build_uri(char *uri, } if (getnameinfo(addr, sa->salen, host, sizeof(host), serv, sizeof(serv), - (flags & SWITCH_URI_NUMERIC_HOST) ? NI_NUMERICHOST : 0 | - (flags & SWITCH_URI_NUMERIC_PORT) ? NI_NUMERICSERV : 0) != 0) { + ((flags & SWITCH_URI_NUMERIC_HOST) ? NI_NUMERICHOST : 0) | ((flags & SWITCH_URI_NUMERIC_PORT) ? NI_NUMERICSERV : 0)) != 0) { return 0; }