mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-29 21:28:30 +00:00
CID:1025850 Dereference before null check
This commit is contained in:
parent
b10c865c25
commit
ecde431730
@ -685,14 +685,14 @@ SWITCH_STANDARD_APP(cidlookup_app_function)
|
|||||||
cid = do_lookup(pool, event, number, skipurl, skipcitystate);
|
cid = do_lookup(pool, event, number, skipurl, skipcitystate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_string_var_check_const(cid->name)) {
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_CRIT, "Invalid CID data {%s} contains a variable\n", cid->name);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cid && channel) {
|
if (cid && channel) {
|
||||||
switch_event_t *event;
|
switch_event_t *event;
|
||||||
|
|
||||||
|
if (switch_string_var_check_const(cid->name)) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_CRIT, "Invalid CID data {%s} contains a variable\n", cid->name);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
switch_channel_set_variable(channel, "original_caller_id_name", switch_core_strdup(pool, profile->caller_id_name));
|
switch_channel_set_variable(channel, "original_caller_id_name", switch_core_strdup(pool, profile->caller_id_name));
|
||||||
if (!zstr(cid->src)) {
|
if (!zstr(cid->src)) {
|
||||||
switch_channel_set_variable(channel, "cidlookup_source", cid->src);
|
switch_channel_set_variable(channel, "cidlookup_source", cid->src);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user