mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 16:24:28 +08:00
tools/bluetooth-player: check path validity
Bluetooth-player change-folder cmd approves any argument however it can be and then should a valid path only. Failing in providing a valid path crashes bluetooth-player thus argument should be checked if it's a valid path.
This commit is contained in:
parent
28429dcd1e
commit
1d7c6a807d
@ -738,6 +738,11 @@ static void cmd_change_folder(int argc, char *argv[])
|
||||
return;
|
||||
}
|
||||
|
||||
if (dbus_validate_path(argv[1], NULL) == FALSE) {
|
||||
rl_printf("Not a valid path\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (check_default_player() == FALSE)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user