Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] monitor: Fix Conn Interval rsp group decode
@ 2026-10-31 14:28 Pauli Virtanen
  2026-10-31 15:36 ` [BlueZ] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Pauli Virtanen @ 2026-10-31 14:28 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

util_iov_pull() returns the advanced base, not the bytes pulled, so
each connection interval group was decoded six bytes past its actual
position. Use util_iov_pull_mem() instead.

Fixes: 79cfd07224ff ("monitor: Add decoding for Short Connection Interval feature")
Assisted-by: opencode:qwen3.8-flash-next
---
 monitor/packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index 8a0e49ff4..fdc02fe01 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -10289,7 +10289,7 @@ static void le_read_conn_interval_rsp(uint16_t index, const void *data,
 	for (i = 0; i < rsp->num_grps; i++) {
 		const struct bt_hci_le_conn_interval_group *grp;
 
-		grp = util_iov_pull(&iov, sizeof(*grp));
+		grp = util_iov_pull_mem(&iov, sizeof(*grp));
 		if (!grp) {
 			print_text(COLOR_ERROR, "  invalid group");
 			break;
-- 
2.56.0


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

end of thread, other threads:[~2026-10-31 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-31 14:28 [PATCH BlueZ] monitor: Fix Conn Interval rsp group decode Pauli Virtanen
2026-10-31 15:36 ` [BlueZ] " 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