mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
ShellPkg/UefiShellLib: Correct check for empty string
StrSize() will never return zero since it counts the terminating NULL character. An empty string will have the storage size of the terminator. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
This commit is contained in:
parent
ef3a1ef397
commit
e11a912aa3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user