提交 e02baeed authored 作者: Michael Jerris's avatar Michael Jerris

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
上级 ed0d0e7b
......@@ -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")) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论