MdePkg: Fix uninitialised access in SafeString

This commit is contained in:
vit9696 2023-04-02 13:21:03 +03:00 committed by Mikhail Krichanov
parent c2aa73cf3d
commit b063a20c61

View File

@ -452,9 +452,14 @@ StrDecimalToUint64 (
IN CONST CHAR16 *String
)
{
UINT64 Result;
UINT64 Result;
RETURN_STATUS Status;
Status = StrDecimalToUint64S (String, (CHAR16 **)NULL, &Result);
if (RETURN_ERROR (Status)) {
return 0;
}
StrDecimalToUint64S (String, (CHAR16 **)NULL, &Result);
return Result;
}
@ -499,9 +504,14 @@ StrHexToUintn (
IN CONST CHAR16 *String
)
{
UINTN Result;
UINTN Result;
RETURN_STATUS Status;
Status = StrHexToUintnS (String, (CHAR16 **)NULL, &Result);
if (RETURN_ERROR (Status)) {
return 0;
}
StrHexToUintnS (String, (CHAR16 **)NULL, &Result);
return Result;
}
@ -546,9 +556,14 @@ StrHexToUint64 (
IN CONST CHAR16 *String
)
{
UINT64 Result;
UINT64 Result;
RETURN_STATUS Status;
Status = StrHexToUint64S (String, (CHAR16 **)NULL, &Result);
if (RETURN_ERROR (Status)) {
return 0;
}
StrHexToUint64S (String, (CHAR16 **)NULL, &Result);
return Result;
}