summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/DxeHstiLib/HstiDxe.c
diff options
context:
space:
mode:
authorJayanth Raghuram <Jayanth_Raghuram@Dell.com>2019-08-29 11:17:09 -0500
committerLiming Gao <liming.gao@intel.com>2019-09-02 12:17:56 +0800
commit17f8c9e97d770c74f84194576bcd97322fbed21e (patch)
tree149c19963f9655e7e037a13dd54ff831eb1a1d91 /MdePkg/Library/DxeHstiLib/HstiDxe.c
parent40db176d9d4f214e590488ba836f42382cc02cb4 (diff)
downloadedk2-17f8c9e97d770c74f84194576bcd97322fbed21e.tar.gz
edk2-17f8c9e97d770c74f84194576bcd97322fbed21e.tar.bz2
edk2-17f8c9e97d770c74f84194576bcd97322fbed21e.zip
MdePkg/DxeHstiLib: Added checks to improve error handling.
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2138 Added checks for return parameters of GetSupportedTypes function calls in InternalHstiFindAip to improve error handling. An issue was observed on Dell Poweredge R740, where the Dell PERC H740P controller UEFI driver returned InfoTypesBuffer = NULL, InfoTypesBufferCount = 0 and caused an FreePool assert. Signed-off-by: Jayanth Raghuram <Jayanth.Raghuram@Dell.com> Cc: Wei G Liu <Wei_G_Liu@Dell.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg/Library/DxeHstiLib/HstiDxe.c')
-rw-r--r--MdePkg/Library/DxeHstiLib/HstiDxe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c
index 9466e3dcb3..4e1c67616b 100644
--- a/MdePkg/Library/DxeHstiLib/HstiDxe.c
+++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c
@@ -77,7 +77,7 @@ InternalHstiFindAip (
&InfoTypesBuffer,
&InfoTypesBufferCount
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (InfoTypesBuffer == NULL) || (InfoTypesBufferCount == 0)) {
continue;
}