Firmware management protocol that does not support GetImageInfo
return Unsupported.
hence FMP Image Information Buffer is NULL.
Freeing NULL buffer results in Exception.

Added NULL check for Image Info buffer
and skip processing FMP protocol handle,
which does not support GetImageInfo.

Signed-off-by: Gaurav Jain <gaurav.j...@nxp.com>
---
 .../Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c         | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c 
b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c
index bdb70bdb32cc..b4438ac6f55a 100644
--- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c
+++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c
@@ -579,7 +579,7 @@ GetFmpImageDescriptors (
                   &PackageVersionName          // PackageVersionName
                   );
   if (Status != EFI_BUFFER_TOO_SMALL) {
-    DEBUG ((DEBUG_ERROR, "SystemFirmwareUpdateDxe: Unexpected Failure.  Status 
= %r\n", Status));
+    DEBUG ((DEBUG_INFO, "SystemFirmwareUpdateDxe: Status = %r\n", Status));
     return NULL;
   }
 
@@ -678,6 +678,9 @@ FindMatchingFmpHandles (
                                 &DescriptorSize
                                 );
 
+    if (OriginalFmpImageInfoBuf == NULL) {
+      continue;
+    }
     //
     // Loop through the set of EFI_FIRMWARE_IMAGE_DESCRIPTORs.
     //
-- 
2.7.4


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#58686): https://edk2.groups.io/g/devel/message/58686
Mute This Topic: https://groups.io/mt/74024929/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to