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:
Sebastian Chlad 2014-01-10 18:31:01 +02:00 committed by Luiz Augusto von Dentz
parent 28429dcd1e
commit 1d7c6a807d

View File

@ -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;