From 1f3d21d46f62a3359d6280ba952750cb71ba49dc Mon Sep 17 00:00:00 2001 From: Alexandros Antonopoulos Date: Mon, 21 Jan 2013 14:44:25 +0100 Subject: [PATCH] core: Fix crash when an invalid uuid is passed to Device1.DisconnectProfile If the user calls Device1.DisconnectProfile with an invalid profile uuid disconnect_profile still tries to parse the uuid resulting in a SIGSEGV --- src/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/device.c b/src/device.c index 3675616ce..bb79b3867 100644 --- a/src/device.c +++ b/src/device.c @@ -1269,6 +1269,8 @@ static DBusMessage *disconnect_profile(DBusConnection *conn, DBusMessage *msg, return btd_error_invalid_args(msg); uuid = bt_name2string(pattern); + if (uuid == NULL) + return btd_error_invalid_args(msg); p = find_connectable_profile(dev, uuid); g_free(uuid); -- 2.47.3