From 295ec99499c9061b0b9c1cbfc834b1cc7d7b1290 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 28 Apr 2025 11:38:36 -0400 Subject: [PATCH] main: Fix comparison of narrow type with wide type in loop condition 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 6a682e9b9..3c51a0092 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.47.3