[Freeswitch-svn] [commit] r8479 - freeswitch/trunk/src/mod/applications/mod_dptools
Freeswitch SVN
mikej at freeswitch.org
Mon May 19 18:11:37 EDT 2008
Author: mikej
Date: Mon May 19 18:11:37 2008
New Revision: 8479
Modified:
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
Log:
don't pass NULL to atoi. Found by Klockwork (www.klocwork.com)
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Mon May 19 18:11:37 2008
@@ -750,16 +750,16 @@
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")) {
More information about the Freeswitch-svn
mailing list