From 9c969af8d6d79965aeb59020532722153168408f Mon Sep 17 00:00:00 2001 From: Peddolla Harshavardhan Reddy Date: Tue, 28 Oct 2025 16:17:31 +0530 Subject: [PATCH] PR: Fix population of 'Number of channel entries' field The 'Number of channel entries' field used in multiple attributes of the Proximity Ranging element was incorrectly populated with an empty buffer. Ensure the size of field is limited to one byte and correctly reflects the count of channel entries that follow. Fixes: 619cc871ba0f ("PR: Add EDCA capabilities in USD PR element") Signed-off-by: Peddolla Harshavardhan Reddy --- src/common/proximity_ranging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/proximity_ranging.c b/src/common/proximity_ranging.c index 1cb337713..39ee03210 100644 --- a/src/common/proximity_ranging.c +++ b/src/common/proximity_ranging.c @@ -559,7 +559,7 @@ static void pr_buf_add_channel_list(struct wpabuf *buf, const char *country, size_t i; wpabuf_put_data(buf, country, 3); /* Country String */ - wpabuf_put(buf, chan->op_classes); /* Number of Channel Entries */ + wpabuf_put_u8(buf, chan->op_classes); /* Number of Channel Entries */ /* Channel Entry List */ for (i = 0; i < chan->op_classes; i++) { -- 2.47.3