]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PR: Fix population of 'Number of channel entries' field main pending
authorPeddolla Harshavardhan Reddy <peddolla@qti.qualcomm.com>
Tue, 28 Oct 2025 10:47:31 +0000 (16:17 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 31 Oct 2025 18:09:17 +0000 (20:09 +0200)
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 <peddolla@qti.qualcomm.com>
src/common/proximity_ranging.c

index 1cb337713c443adcd46f43d6e1f1b46c926b2096..39ee0321096d30e51089a1340fa1042b33706d15 100644 (file)
@@ -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++) {