mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 08:44:38 +08:00
Fix potential buffer overflow by using snprintf instead of sprintf
This commit is contained in:
parent
cfea4ccc6f
commit
ece9ea1c2e
@ -192,7 +192,7 @@ static int do_listen(void)
|
||||
}
|
||||
|
||||
ba2str(&sa.rc_bdaddr, ba);
|
||||
sprintf(ch, "%d", channel);
|
||||
snprintf(ch, sizeof(ch), "%d", channel);
|
||||
|
||||
/* Setup environment */
|
||||
setenv("DUN_BDADDR", ba, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user