All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez PATCH v1] gatt-db: fix service in range check
@ 2021-07-27 11:51 Howard Chung
  2021-07-27 12:52 ` [Bluez,v1] " bluez.test.bot
  2021-07-27 22:17 ` [Bluez PATCH v1] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 6+ messages in thread
From: Howard Chung @ 2021-07-27 11:51 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Yun-Hao Chung, Archie Pusaka

From: Yun-Hao Chung <howardchung@chromium.org>

If foreach_data->start < svc_start < foreach_data->end < svc_end,
foreach_in_range runs foreach_service_in_range to this service.

This patch fix the above bug.

Reviewed-by: Archie Pusaka <apusaka@chromium.org>
---

 src/shared/gatt-db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/gatt-db.c b/src/shared/gatt-db.c
index 8bff4d37aaa2..38d93f273a9e 100644
--- a/src/shared/gatt-db.c
+++ b/src/shared/gatt-db.c
@@ -1349,7 +1349,7 @@ static void foreach_in_range(void *data, void *user_data)
 
 	if (!foreach_data->attr) {
 		if (svc_start < foreach_data->start ||
-					svc_start > foreach_data->end)
+						svc_end > foreach_data->end)
 			return;
 		return foreach_service_in_range(data, user_data);
 	}
-- 
2.32.0.432.gabb21c7263-goog


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

end of thread, other threads:[~2021-07-28  3:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 11:51 [Bluez PATCH v1] gatt-db: fix service in range check Howard Chung
2021-07-27 12:52 ` [Bluez,v1] " bluez.test.bot
2021-07-27 22:17 ` [Bluez PATCH v1] " Luiz Augusto von Dentz
2021-07-28  2:19   ` Yun-hao Chung
2021-07-28  2:51     ` Yun-hao Chung
2021-07-28  3:53       ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.