https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c2082ce92aa3cfcc229635779bff68a21f9758df
commit c2082ce92aa3cfcc229635779bff68a21f9758df Author: Vitaly Orekhov <crce2...@mail.ru> AuthorDate: Sat Sep 28 18:28:15 2024 +0300 Commit: GitHub <nore...@github.com> CommitDate: Sat Sep 28 18:28:15 2024 +0300 [PSDK] Define maximum SSID length properly (#7394) Avoid using magic numbers for structures and ease the day for those who do not remember IEEE 802.11 specifications by heart. - Add a #define that matches by name with one used since day one of Visual Studio 2008 (VS2005 does not have Native Wi-Fi SDK) - Remove magic constant from DOT11_SSID.ucSSID size definition Reference: https://learn.microsoft.com/en-us/windows/win32/nativewifi/dot11-ssid CORE-6905 --- sdk/include/psdk/windot11.h | 2 +- sdk/include/psdk/wlantypes.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/include/psdk/windot11.h b/sdk/include/psdk/windot11.h index f509e650f56..5e9a9b61f2d 100644 --- a/sdk/include/psdk/windot11.h +++ b/sdk/include/psdk/windot11.h @@ -64,7 +64,7 @@ typedef DOT11_MAC_ADDRESS* PDOT11_MAC_ADDRESS; typedef struct _DOT11_SSID { ULONG uSSIDLength; - UCHAR ucSSID[32]; + UCHAR ucSSID[DOT11_SSID_MAX_LENGTH]; } DOT11_SSID, *PDOT11_SSID; typedef struct _DOT11_BSSID_LIST { diff --git a/sdk/include/psdk/wlantypes.h b/sdk/include/psdk/wlantypes.h index 310d6ff55ad..96d1e00dc1d 100644 --- a/sdk/include/psdk/wlantypes.h +++ b/sdk/include/psdk/wlantypes.h @@ -7,6 +7,7 @@ typedef enum _DOT11_BSS_TYPE { dot11_BSS_type_any } DOT11_BSS_TYPE; +#define DOT11_SSID_MAX_LENGTH 32 #endif