[PATCH BlueZ] mesh: Fix stack overflow in get_element_properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michał 'Khorne' Lowas-Rzechonek <michal@xxxxxxxxxxxxx>

D-Bus type 'q' denotes uint16, not uint8.
---
 mesh/node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mesh/node.c b/mesh/node.c
index c73ba541f..f9be96cbd 100644
--- a/mesh/node.c
+++ b/mesh/node.c
@@ -1200,7 +1200,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);
 
-- 
2.20.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux