mirror of https://github.com/acidanthera/audk.git
SignedCapsulePkg IniParsingLib: ASSERT to ensure 'Value' is not NULL
Function GetStringFromDataFile() ensures its fourth (output) parameter will not be NULL when the return status is EFI_SUCCESS. This commit adds ASSERT as warnings for the case that will not happen. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
b4dc05e854
commit
cf2ddcf133
|
@ -1257,6 +1257,7 @@ GetGuidFromDataFile (
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
ASSERT (Value != NULL);
|
||||||
if (!IsValidGuid(Value, AsciiStrLen(Value))) {
|
if (!IsValidGuid(Value, AsciiStrLen(Value))) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
@ -1303,6 +1304,7 @@ GetDecimalUintnFromDataFile (
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
ASSERT (Value != NULL);
|
||||||
if (!IsValidDecimalString(Value, AsciiStrLen(Value))) {
|
if (!IsValidDecimalString(Value, AsciiStrLen(Value))) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
@ -1346,6 +1348,7 @@ GetHexUintnFromDataFile (
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
ASSERT (Value != NULL);
|
||||||
if (!IsValidHexString(Value, AsciiStrLen(Value))) {
|
if (!IsValidHexString(Value, AsciiStrLen(Value))) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
@ -1389,6 +1392,7 @@ GetHexUint64FromDataFile (
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
ASSERT (Value != NULL);
|
||||||
if (!IsValidHexString(Value, AsciiStrLen(Value))) {
|
if (!IsValidHexString(Value, AsciiStrLen(Value))) {
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue