From: Jouni Malinen Date: Tue, 18 Jul 2023 13:11:08 +0000 (+0300) Subject: FILS: Fix HE MCS field initialization X-Git-Tag: hostap_2_11~1084 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb2b7858a728eb1ad32b49e9e129f2fc1d3ea880;p=thirdparty%2Fhostap.git FILS: Fix HE MCS field initialization The second argument to memset() is only eight bits, so there is no point in trying to set 0xffff values for an array of 16-bit fields. 0xff will do the exact same thing without causing static analyzes warnings about truncated value. Fixes: 903e3a1e6259 ("FILS: Fix maximum NSS calculation for FD frame") Signed-off-by: Jouni Malinen --- diff --git a/src/ap/beacon.c b/src/ap/beacon.c index 32c143a2b..772825d88 100644 --- a/src/ap/beacon.c +++ b/src/ap/beacon.c @@ -1450,7 +1450,7 @@ static u16 hostapd_fils_discovery_cap(struct hostapd_data *hapd) int i; u16 nss = 0, mcs[6]; - os_memset(mcs, 0xffff, 6 * sizeof(u16)); + os_memset(mcs, 0xff, 6 * sizeof(u16)); if (mcs_nss_size == 4) { mcs[0] = WPA_GET_LE16(&he_mcs[0]);