Skip to contentSkip to conversation

main: Fix scanning alert no. 21

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Apr 28, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 main: Fix scanning alert no. 21

From: Luiz Augusto von Dentz <[email protected]>

Comparison of narrow type with wide type in loop condition Comparison between of type uint16_t and of wider type size_t.

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). This is because the narrower value may overflow. This can lead to an infinite loop.

---
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/main.c +1 -1
index 6a682e9b921f..3c51a0092425 100644
@@ -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;
Signature · 1 line
2.49.0
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=957766

---Test result---

Test Summary:

CheckPatch                    PENDING   0.28 seconds
GitLint                       PENDING   0.28 seconds
BuildEll                      PASS      20.59 seconds
BluezMake                     PASS      2709.25 seconds
MakeCheck                     PASS      20.07 seconds
MakeDistcheck                 PASS      200.73 seconds
CheckValgrind                 PASS      279.74 seconds
CheckSmatch                   PASS      308.95 seconds
bluezmakeextell               PASS      130.42 seconds
IncrementalBuild              PENDING   0.25 seconds
ScanBuild                     PASS      914.39 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 11 lines · On Mon, 28 Apr 2025 11:39:50 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

Comparison of narrow type with wide type in loop condition Comparison between of type uint16_t and of wider type size_t.

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). This is because the narrower value may overflow. This can lead to an infinite loop.

[...]

Here is the summary with links:
- [BlueZ,v1] main: Fix scanning alert no. 21

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=295ec99499c9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html