diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c index 488129801e..d053b6bb69 100644 --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c @@ -4012,7 +4012,7 @@ InternalShellStrHexToUint64 ( UINT64 Result; BOOLEAN LeadingZero; - if ((String == NULL) || (StrSize (String) == 0) || (Value == NULL)) { + if ((String == NULL) || (StrSize (String) == sizeof (*String)) || (Value == NULL)) { return (EFI_INVALID_PARAMETER); } @@ -4116,7 +4116,7 @@ InternalShellStrDecimalToUint64 ( { UINT64 Result; - if ((String == NULL) || (StrSize (String) == 0) || (Value == NULL)) { + if ((String == NULL) || (StrSize (String) == sizeof (*String)) || (Value == NULL)) { return (EFI_INVALID_PARAMETER); }