diff options
author | Sebastian Chlad <sebastianx.chlad@intel.com> | 2014-01-10 18:31:01 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-01-13 12:12:59 +0200 |
commit | 1d7c6a807d1d81e43110bae466f8e34cbffb088c (patch) | |
tree | 51287b5f686895a659044dbdf50cb001c486a2f8 /tools/bluetooth-player.c | |
parent | 28429dcd1eef25e445ea9d9d67dbf171808a9ce1 (diff) | |
download | bluez-1d7c6a807d1d81e43110bae466f8e34cbffb088c.tar.gz |
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.
Diffstat (limited to 'tools/bluetooth-player.c')
-rw-r--r-- | tools/bluetooth-player.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/bluetooth-player.c b/tools/bluetooth-player.c index 2afdd178e..f10d9be57 100644 --- a/tools/bluetooth-player.c +++ b/tools/bluetooth-player.c @@ -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; |