]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't pass NULL to atoi. Found by Klockwork (www.klocwork.com)
authorMichael Jerris <mike@jerris.com>
Mon, 19 May 2008 22:11:37 +0000 (22:11 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 19 May 2008 22:11:37 +0000 (22:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8479 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index d860108c6cc9998420b8f65b5a3224da149b652d..88f755ab51f81031db585d522758c012b69abd27 100644 (file)
@@ -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")) {