Linux bluetooth development
 help / color / mirror / Atom feed
* [BlueZ] hci-tester: Work-around possible string overflow
@ 2026-06-16  8:55 Bastien Nocera
  2026-06-16 13:05 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2026-06-16  8:55 UTC (permalink / raw)
  To: linux-bluetooth

Quiet overflow warning by checking for a non-NULL destination.

In function 'memcpy',
    inlined from 'test_pre_setup_lt_address' at tools/hci-tester.c:67:2:
/usr/include/bits/string_fortified.h:29:10: warning: '__builtin_memcpy' writing 6 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ^
---
 tools/hci-tester.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/hci-tester.c b/tools/hci-tester.c
index b8446ee83ccf..c9e7c58d2e95 100644
--- a/tools/hci-tester.c
+++ b/tools/hci-tester.c
@@ -12,6 +12,7 @@
 #include <config.h>
 #endif
 
+#include <assert.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -57,6 +58,7 @@ static void test_pre_setup_lt_address(const void *data, uint8_t size,
 	struct user_data *user = tester_get_data();
 	const struct bt_hci_rsp_read_bd_addr *rsp = data;
 
+	assert(user);
 	if (rsp->status) {
 		tester_warn("Read lower tester address failed (0x%02x)",
 								rsp->status);
-- 
2.54.0


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

* RE: [BlueZ] hci-tester: Work-around possible string overflow
  2026-06-16  8:55 [BlueZ] hci-tester: Work-around possible string overflow Bastien Nocera
@ 2026-06-16 13:05 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-06-16 13:05 UTC (permalink / raw)
  To: linux-bluetooth, hadess

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

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=1112149

---Test result---

Test Summary:
CheckPatch                    PASS      0.45 seconds
GitLint                       FAIL      0.32 seconds
BuildEll                      PASS      20.10 seconds
BluezMake                     PASS      620.61 seconds
CheckSmatch                   PASS      330.69 seconds
bluezmakeextell               PASS      169.87 seconds
IncrementalBuild              PASS      628.29 seconds
ScanBuild                     PASS      945.21 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ] hci-tester: Work-around possible string overflow

7: B1 Line exceeds max length (160>80): "/usr/include/bits/string_fortified.h:29:10: warning: '__builtin_memcpy' writing 6 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]"


https://github.com/bluez/bluez/pull/2236

---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2026-06-16 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-16  8:55 [BlueZ] hci-tester: Work-around possible string overflow Bastien Nocera
2026-06-16 13:05 ` bluez.test.bot

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