Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH v1] obexd/pbap: Fix u128_to_string skipping data[4]
@ 2026-09-23  3:29 Jinwang Li
  2026-09-23  6:11 ` [v1] " bluez.test.bot
  2026-09-23 19:30 ` [PATCH v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Jinwang Li @ 2026-09-23  3:29 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: cheng.jiang, quic_chezhou, wei.deng, shuai.zhang, mengshi.wu,
	jinwang.li, xiuzhuo.shang

u128_to_string uses data[3] twice causing data[4] to be skipped and
DatabaseIdentifier, PrimaryCounter and SecondaryCounter properties to
be printed with wrong values.

Fixes: 5ee26d43c65c ("obexd/client: Add DatabaseIdentifier property")
Assisted-by: opencode:claude-sonnet-5
Signed-off-by: Jinwang Li <jinwang.li@oss.qualcomm.com>
---
 obexd/client/pbap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index ce5e6cd5d..1970d3357 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -1099,7 +1099,7 @@ static int u128_to_string(uint8_t *data, char *str, size_t len)
 	return snprintf(str, len, "%02X%02X%02X%02X%02X%02X%02X%02X"
 					"%02X%02X%02X%02X%02X%02X%02X%02X",
 					data[0], data[1], data[2], data[3],
-					data[3], data[5], data[6], data[7],
+					data[4], data[5], data[6], data[7],
 					data[8], data[9], data[10], data[11],
 					data[12], data[13], data[14], data[15]);
 }
-- 
2.34.1


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

end of thread, other threads:[~2026-09-23 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23  3:29 [PATCH v1] obexd/pbap: Fix u128_to_string skipping data[4] Jinwang Li
2026-09-23  6:11 ` [v1] " bluez.test.bot
2026-09-23 19:30 ` [PATCH v1] " 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