From: DoHyun Pyun Date: Mon, 25 Feb 2019 00:50:54 +0000 (+0900) Subject: Add the type check logic to avoid crash X-Git-Tag: accepted/tizen/4.0/unified/20190226.044243^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git;a=commitdiff_plain;h=011c972bd2f307bdde759e55bb4ed7e114634cad Add the type check logic to avoid crash Change-Id: I6a29c351bb52ab39df60ebe8812166e808c08745 Signed-off-by: DoHyun Pyun --- diff --git a/bt-service/bt-service-event-receiver.c b/bt-service/bt-service-event-receiver.c index f3d50f3..563b8f6 100644 --- a/bt-service/bt-service-event-receiver.c +++ b/bt-service/bt-service-event-receiver.c @@ -2890,6 +2890,11 @@ static void __bt_manager_event_filter(GDBusConnection *connection, char *previous = NULL; char *current = NULL; + if (g_strcmp0(g_variant_get_type_string(parameters), "(sss)") != 0) { + BT_ERR("Invalid variant format"); + return; + } + if (__bt_get_owner_info(parameters, &name, &previous, ¤t)) { BT_ERR("Fail to get the owner info"); return;