summaryrefslogtreecommitdiffstats
path: root/SignedCapsulePkg
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-11-16 15:47:55 +0800
committerHao Wu <hao.a.wu@intel.com>2016-11-18 08:46:32 +0800
commitcf2ddcf13369af2aa98231dae5143e8bab06a00c (patch)
treea79d4bb0cb5bcebb4f78c1d3e08badc4389d8842 /SignedCapsulePkg
parentb4dc05e854736c8f353a0f6e18ca85faa4d3785e (diff)
downloadedk2-cf2ddcf13369af2aa98231dae5143e8bab06a00c.tar.gz
edk2-cf2ddcf13369af2aa98231dae5143e8bab06a00c.tar.bz2
edk2-cf2ddcf13369af2aa98231dae5143e8bab06a00c.zip
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>
Diffstat (limited to 'SignedCapsulePkg')
-rw-r--r--SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.c b/SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.c
index a8773c1a80..5c975f7ca4 100644
--- a/SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.c
+++ b/SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.c
@@ -1257,6 +1257,7 @@ GetGuidFromDataFile (
if (EFI_ERROR(Status)) {
return EFI_NOT_FOUND;
}
+ ASSERT (Value != NULL);
if (!IsValidGuid(Value, AsciiStrLen(Value))) {
return EFI_NOT_FOUND;
}
@@ -1303,6 +1304,7 @@ GetDecimalUintnFromDataFile (
if (EFI_ERROR(Status)) {
return EFI_NOT_FOUND;
}
+ ASSERT (Value != NULL);
if (!IsValidDecimalString(Value, AsciiStrLen(Value))) {
return EFI_NOT_FOUND;
}
@@ -1346,6 +1348,7 @@ GetHexUintnFromDataFile (
if (EFI_ERROR(Status)) {
return EFI_NOT_FOUND;
}
+ ASSERT (Value != NULL);
if (!IsValidHexString(Value, AsciiStrLen(Value))) {
return EFI_NOT_FOUND;
}
@@ -1389,6 +1392,7 @@ GetHexUint64FromDataFile (
if (EFI_ERROR(Status)) {
return EFI_NOT_FOUND;
}
+ ASSERT (Value != NULL);
if (!IsValidHexString(Value, AsciiStrLen(Value))) {
return EFI_NOT_FOUND;
}