diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h index 2bae18fc33..cce7e5a324 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h @@ -50,9 +50,9 @@ typedef enum { typedef struct _ISCSI_CHAP_AUTH_CONFIG_NVDATA { UINT8 CHAPType; CHAR8 CHAPName[ISCSI_CHAP_NAME_MAX_LEN]; - CHAR8 CHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN]; + CHAR8 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE]; CHAR8 ReverseCHAPName[ISCSI_CHAP_NAME_MAX_LEN]; - CHAR8 ReverseCHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN]; + CHAR8 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE]; } ISCSI_CHAP_AUTH_CONFIG_NVDATA; #pragma pack() diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni index 0c91ce61f1..c9ece91532 100644 Binary files a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni and b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni differ diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h index 7b77a19e78..8f1aaeacb1 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigNVDataStruc.h @@ -66,8 +66,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define KEY_DEVICE_ENTRY_BASE 0x1000 #define ISCSI_LUN_STR_MAX_LEN 21 -#define ISCSI_CHAP_SECRET_MIN_LEN 13 -#define ISCSI_CHAP_SECRET_MAX_LEN 17 +#define ISCSI_CHAP_SECRET_MIN_LEN 12 +#define ISCSI_CHAP_SECRET_MAX_LEN 16 +// +// ISCSI_CHAP_SECRET_STORAGE = ISCSI_CHAP_SECRET_MAX_LEN + sizeof (NULL-Terminator) +// +#define ISCSI_CHAP_SECRET_STORAGE 17 + #define ISCSI_CHAP_NAME_MAX_LEN 126 #pragma pack(1) @@ -89,9 +94,9 @@ typedef struct { UINT8 CHAPType; CHAR16 CHAPName[ISCSI_CHAP_NAME_MAX_LEN]; - CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN]; + CHAR16 CHAPSecret[ISCSI_CHAP_SECRET_STORAGE]; CHAR16 ReverseCHAPName[ISCSI_CHAP_NAME_MAX_LEN]; - CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_MAX_LEN]; + CHAR16 ReverseCHAPSecret[ISCSI_CHAP_SECRET_STORAGE]; } ISCSI_CONFIG_IFR_NVDATA; #pragma pack()