From 8fdcc4123bfbb48b2ce9018061895a8388ef5827 Mon Sep 17 00:00:00 2001 From: klu2 Date: Mon, 4 Jan 2010 05:20:18 +0000 Subject: [PATCH] check whether FvHandle is NULL for FfsGetVolumeInfo() interface. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9664 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 8bf096a67e..19e3f1df3d 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -813,7 +813,7 @@ PeiFfsGetVolumeInfo ( { PEI_CORE_FV_HANDLE *CoreHandle; - if (VolumeInfo == NULL) { + if ((VolumeInfo == NULL) || (VolumeHandle == NULL)) { return EFI_INVALID_PARAMETER; } @@ -1206,7 +1206,7 @@ PeiFfs2FvPpiGetVolumeInfo ( EFI_FIRMWARE_VOLUME_HEADER FwVolHeader; EFI_FIRMWARE_VOLUME_EXT_HEADER *FwVolExHeaderInfo; - if (VolumeInfo == NULL) { + if ((VolumeInfo == NULL) || (FvHandle == NULL)) { return EFI_INVALID_PARAMETER; } -- 2.39.2