From 1d7c6a807d1d81e43110bae466f8e34cbffb088c Mon Sep 17 00:00:00 2001 From: Sebastian Chlad Date: Fri, 10 Jan 2014 18:31:01 +0200 Subject: [PATCH] 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. --- tools/bluetooth-player.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.47.3