Fix incorrect use of atoi in maemo6

Use of atoi is incorrect and unsafe in maemo6 telephony and replaced
by g_ascii_digit_value.
This commit is contained in:
Dmitriy Paliy 2011-10-28 14:41:50 +03:00 committed by Johan Hedberg
parent f8d1636fb0
commit d8e4938352

View File

@ -823,7 +823,10 @@ static int tonegen_startevent(char tone)
event_tone = DTMF_D;
break;
default:
event_tone = atoi(&tone);
ret = g_ascii_digit_value(tone);
if (ret < 0)
return -EINVAL;
event_tone = ret;
}
ret = send_method_call(TONEGEN_BUS_NAME, TONEGEN_PATH,