mesh: Fix stack overflow in get_element_properties
authorMichał 'Khorne' Lowas-Rzechonek <michal@rzechonek.net>
Wed, 3 Jul 2019 19:08:33 +0000 (21:08 +0200)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 17 Dec 2019 15:20:58 +0000 (20:50 +0530)
D-Bus type 'q' denotes uint16, not uint8.

Change-Id: Ia9c8f9bb2d6f60f46d180ae583771685593be7f5
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
mesh/node.c

index 580d310..93dccf4 100644 (file)
@@ -1185,7 +1185,7 @@ static bool get_element_properties(struct mesh_node *node, const char *path,
 
        while (l_dbus_message_iter_next_entry(properties, &key, &var)) {
                if (!strcmp(key, "Location")) {
-                       uint8_t loc;
+                       uint16_t loc;
 
                        l_dbus_message_iter_get_variant(&var, "q", &loc);