From fb0ccc968388b8e172a7ae68336334fb20e40bac Mon Sep 17 00:00:00 2001 From: ERAMOTO Masaya Date: Mon, 25 Sep 2017 13:33:25 +0900 Subject: [PATCH] client: Prevent to pass invalid ad type to D-Bus --- client/advertising.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/advertising.c b/client/advertising.c index bfdebd5c6..76cee3da7 100644 --- a/client/advertising.c +++ b/client/advertising.c @@ -131,7 +131,7 @@ static gboolean get_type(const GDBusPropertyTable *property, { const char *type = "peripheral"; - if (!ad.type || strlen(ad.type) > 0) + if (ad.type && strlen(ad.type) > 0) type = ad.type; dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &type); -- 2.47.3