]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Fix debug printing of extra STA Info field contents
authorJouni Malinen <quic_jouni@quicinc.com>
Sat, 8 Feb 2025 10:58:49 +0000 (12:58 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 8 Feb 2025 10:58:49 +0000 (12:58 +0200)
Use the correct end pointer to avoid negative length and program
termination due to the hexdump.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
wlantest/rx_mgmt.c

index 50346ec135ab4cbf1cf25b9597f2719e1cce65b4..1c9309488dff149516c18ba634cd21097eb14234 100644 (file)
@@ -370,7 +370,7 @@ static void parse_basic_ml(const u8 *ie, size_t len, bool ap,
                if (info_end > pos) {
                        wpa_hexdump(MSG_INFO,
                                    "Extra information at the end of STA Info",
-                                   pos, ci_end - pos);
+                                   pos, info_end - pos);
                        pos = info_end;
                }
 
@@ -645,7 +645,7 @@ static void parse_reconfig_ml(const u8 *ie, size_t len,
                if (info_end > pos) {
                        wpa_hexdump(MSG_INFO,
                                    "Extra information at the end of STA Info",
-                                   pos, ci_end - pos);
+                                   pos, info_end - pos);
                        pos = info_end;
                }