public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 1/5] main: Fix comparison of narrow type with wide type in loop condition
@ 2025-04-28 19:51 Luiz Augusto von Dentz
  2025-04-28 19:51 ` [PATCH BlueZ v2 2/5] client/mgmt: " Luiz Augusto von Dentz
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2025-04-28 19:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

In a loop condition, comparison of a value of a narrow type with a
value of a wide type may result in unexpected behavior if the wider
value is sufficiently large (or small).

Fixes: https://github.com/bluez/bluez/issues/1213
---
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index 6a682e9b921f..3c51a0092425 100644
--- a/src/main.c
+++ b/src/main.c
@@ -501,7 +501,7 @@ static void parse_mode_config(GKeyFile *config, const char *group,
 				const struct config_param *params,
 				size_t params_len)
 {
-	uint16_t i;
+	size_t i;
 
 	if (!config)
 		return;
-- 
2.49.0


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

end of thread, other threads:[~2025-04-28 21:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28 19:51 [PATCH BlueZ v2 1/5] main: Fix comparison of narrow type with wide type in loop condition Luiz Augusto von Dentz
2025-04-28 19:51 ` [PATCH BlueZ v2 2/5] client/mgmt: " Luiz Augusto von Dentz
2025-04-28 19:51 ` [PATCH BlueZ v2 3/5] test-runner: Fix potentially overflowing call to snprintf Luiz Augusto von Dentz
2025-04-28 19:51 ` [PATCH BlueZ v2 4/5] client/mgmt: " Luiz Augusto von Dentz
2025-04-28 19:51 ` [PATCH BlueZ v2 5/5] shared/bap: Too few arguments to formatting function Luiz Augusto von Dentz
2025-04-28 21:14 ` [BlueZ,v2,1/5] main: Fix comparison of narrow type with wide type in loop condition bluez.test.bot
2025-04-28 21:40 ` [PATCH BlueZ v2 1/5] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox