linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ] mesh: Fix stack overflow in get_element_properties
@ 2019-07-03 19:08 Michał Lowas-Rzechonek
  2019-07-04  0:16 ` Gix, Brian
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Lowas-Rzechonek @ 2019-07-03 19:08 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Michał 'Khorne' Lowas-Rzechonek

From: Michał 'Khorne' Lowas-Rzechonek <michal@rzechonek.net>

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH BlueZ] mesh: Fix stack overflow in get_element_properties
  2019-07-03 19:08 [PATCH BlueZ] mesh: Fix stack overflow in get_element_properties Michał Lowas-Rzechonek
@ 2019-07-04  0:16 ` Gix, Brian
  0 siblings, 0 replies; 2+ messages in thread
From: Gix, Brian @ 2019-07-04  0:16 UTC (permalink / raw)
  To: michal.lowas-rzechonek@silvair.com,
	linux-bluetooth@vger.kernel.org
  Cc: michal@rzechonek.net

Applied

On Wed, 2019-07-03 at 21:08 +0200, Michał Lowas-Rzechonek wrote:
> From: Michał 'Khorne' Lowas-Rzechonek <michal@rzechonek.net>
> 
> 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);
>  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-04  0:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-03 19:08 [PATCH BlueZ] mesh: Fix stack overflow in get_element_properties Michał Lowas-Rzechonek
2019-07-04  0:16 ` Gix, Brian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).