]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Fix setting frame and data lengths in AP mode PASN response
authorIlan Peer <ilan.peer@intel.com>
Mon, 15 Mar 2021 12:56:59 +0000 (14:56 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 16 Mar 2021 09:38:51 +0000 (11:38 +0200)
Frame length and data length can exceed 256 so need to use size_t
instead of u8.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/ap/ieee802_11.c

index 1c01241bcf3ab9b4b568568bd8fcbf56b1104dcb..2c3832960dce2c6fcc1f7f28acb07fa2ef4ea8b8 100644 (file)
@@ -2881,11 +2881,11 @@ static int handle_auth_pasn_resp(struct hostapd_data *hapd,
 {
        struct wpabuf *buf, *pubkey = NULL, *wrapped_data_buf = NULL;
        u8 mic[WPA_PASN_MAX_MIC_LEN];
-       u8 mic_len, frame_len, data_len;
+       u8 mic_len;
        u8 *ptr;
        const u8 *frame, *data, *rsn_ie, *rsnxe_ie;
        u8 *data_buf = NULL;
-       size_t rsn_ie_len;
+       size_t rsn_ie_len, frame_len, data_len;
        int ret;
 
        wpa_printf(MSG_DEBUG, "PASN: Building frame 2: status=%u", status);