From e02baeedb478ffcddcbc8c148c54a672c8d0c1ce Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 19 May 2008 22:11:37 +0000 Subject: [PATCH] don't pass NULL to atoi. Found by Klockwork (www.klocwork.com) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8479 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_dptools/mod_dptools.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index d860108c6c..88f755ab51 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -750,16 +750,16 @@ SWITCH_STANDARD_APP(set_profile_var_function) if (!strcasecmp(name, "caller_id_number")) { caller_profile->caller_id_number = val; } - if (!strcasecmp(name, "caller_ton")) { + if (val && !strcasecmp(name, "caller_ton")) { caller_profile->caller_ton = (uint8_t)atoi(val); } - if (!strcasecmp(name, "caller_numplan")) { + if (val && !strcasecmp(name, "caller_numplan")) { caller_profile->caller_numplan = (uint8_t)atoi(val); } - if (!strcasecmp(name, "destination_number_ton")) { + if (val && !strcasecmp(name, "destination_number_ton")) { caller_profile->destination_number_ton = (uint8_t)atoi(val); } - if (!strcasecmp(name, "destination_number_numplan")) { + if (val && !strcasecmp(name, "destination_number_numplan")) { caller_profile->destination_number_numplan = (uint8_t)atoi(val); } if (!strcasecmp(name, "ani")) {