From 3e4c5b49e44c29fb0de20c078014ac7994bc3eda Mon Sep 17 00:00:00 2001 From: klu2 Date: Wed, 25 Nov 2009 06:26:03 +0000 Subject: [PATCH] Add checking for VolumeHandle, if VolumeHandle is NULL, return EFI_INVALID_PARAMETER git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9482 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Core/Pei/FwVol/FwVol.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 7b74edb69a..7af67481f6 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -642,6 +642,10 @@ PeiFfsFindNextVolume ( PEI_CORE_INSTANCE *Private; PEI_CORE_FV_HANDLE *CoreFvHandle; + if (VolumeHandle == NULL) { + return EFI_INVALID_PARAMETER; + } + Private = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices); CoreFvHandle = FindNextCoreFvHandle (Private, Instance); -- 2.39.2