mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-25 21:24:16 +08:00
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:
parent
f8d1636fb0
commit
d8e4938352
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user