Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/3] shared/rap: fix use of uninitialized value
@ 2026-05-17 10:30 Pauli Virtanen
  2026-05-17 10:30 ` [PATCH BlueZ 2/3] sdp: Fix integer overflow in sdp_extract_seqtype Pauli Virtanen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pauli Virtanen @ 2026-05-17 10:30 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Fix error handling in send_ras_segment_data
---
 src/shared/rap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/rap.c b/src/shared/rap.c
index b554726b0..145da2060 100644
--- a/src/shared/rap.c
+++ b/src/shared/rap.c
@@ -1096,7 +1096,6 @@ static void send_ras_segment_data(struct bt_rap *rap,
 	uint16_t value_max;
 	const uint16_t header_len = ras_segment_header_size;
 	uint16_t raw_payload_size;
-	bool ok;
 
 	if (!rap || !proc)
 		return;
@@ -1128,6 +1127,7 @@ static void send_ras_segment_data(struct bt_rap *rap,
 		uint16_t seg_len;
 		uint8_t *seg;
 		uint16_t wr = 0;
+		bool ok = true;
 
 		if (index > total_len)
 			index = total_len;
@@ -1180,7 +1180,7 @@ static void send_ras_segment_data(struct bt_rap *rap,
 						wr, bt_rap_get_att(rap));
 
 		/* Try sending to on-demand characteristic */
-		if (ras->ondemand_chrc)
+		if (ras->ondemand_chrc && ok)
 			ok = gatt_db_attribute_notify(ras->ondemand_chrc, seg,
 						wr, bt_rap_get_att(rap));
 
-- 
2.54.0


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

end of thread, other threads:[~2026-05-17 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-17 10:30 [PATCH BlueZ 1/3] shared/rap: fix use of uninitialized value Pauli Virtanen
2026-05-17 10:30 ` [PATCH BlueZ 2/3] sdp: Fix integer overflow in sdp_extract_seqtype Pauli Virtanen
2026-05-17 10:30 ` [PATCH BlueZ 3/3] main.conf: fix unintentionally set value Pauli Virtanen
2026-05-17 11:33 ` [BlueZ,1/3] shared/rap: fix use of uninitialized value 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