audk/MdePkg/Library
Star Zeng d7b96017cc MdePkg DxeServicesLib: Handle potential NULL FvHandle
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=514

The FvHandle input to InternalGetSectionFromFv() may be NULL,
then ASSERT will appear. It is because the LoadedImage->DeviceHandle
returned from InternalImageHandleToFvHandle() may be NULL.
For example for DxeCore, there is LoadedImage protocol installed
for it, but the LoadedImage->DeviceHandle could not be initialized
before the FV2 (contain DxeCore) protocol is installed.

This patch is to update InternalGetSectionFromFv() to return
EFI_NOT_FOUND directly for NULL FvHandle.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-05-08 08:57:03 +08:00
..
BaseCacheMaintenanceLib
BaseCpuLib
BaseDebugLibNull
BaseDebugLibSerialPort
BaseDebugPrintErrorLevelLib
BaseExtractGuidedSectionLib
BaseIoLibIntrinsic
BaseLib
BaseMemoryLib
BaseMemoryLibMmx
BaseMemoryLibOptDxe
BaseMemoryLibOptPei
BaseMemoryLibRepStr
BaseMemoryLibSse2
BaseOrderedCollectionRedBlackTreeLib
BasePalLibNull
BasePcdLibNull
BasePciCf8Lib
BasePciExpressLib
BasePciLibCf8
BasePciLibPciExpress
BasePciSegmentLibPci
BasePeCoffExtraActionLibNull
BasePeCoffGetEntryPointLib
BasePeCoffLib
BasePerformanceLibNull
BasePostCodeLibDebug
BasePostCodeLibPort80
BasePrintLib
BaseReportStatusCodeLibNull
BaseRngLib
BaseS3BootScriptLibNull
BaseS3IoLib
BaseS3PciLib
BaseS3SmbusLib
BaseS3StallLib
BaseSerialPortLibNull
BaseSmbusLibNull
BaseStackCheckLib
BaseSynchronizationLib
BaseTimerLibNullTemplate
BaseUefiDecompressLib
DxeCoreEntryPoint
DxeCoreHobLib
DxeExtendedSalLib
DxeExtractGuidedSectionLib
DxeHobLib
DxeHstiLib
DxeIoLibCpuIo2
DxeIoLibEsal
DxePalLibEsal
DxePcdLib
DxePciLibEsal
DxePciSegmentLibEsal
DxeRuntimeExtendedSalLib
DxeRuntimePciExpressLib
DxeSalLibEsal
DxeServicesLib
DxeServicesTableLib
DxeSmbusLib
DxeTimerLibEsal
PeiCoreEntryPoint
PeiDxePostCodeLibReportStatusCode
PeiExtractGuidedSectionLib
PeiHobLib
PeiIoLibCpuIo
PeiMemoryAllocationLib
PeiMemoryLib
PeiPalLib
PeiPcdLib
PeiPciLibPciCfg2
PeiPciSegmentLibPciCfg2
PeiResourcePublicationLib
PeiServicesLib
PeiServicesTablePointerLib
PeiServicesTablePointerLibIdt
PeiServicesTablePointerLibKr7
PeiSmbusLibSmbus2Ppi
PeimEntryPoint
SecPeiDxeTimerLibCpu
SmiHandlerProfileLibNull
SmmIoLib
SmmIoLibSmmCpuIo2
SmmLibNull
SmmMemLib
SmmMemoryAllocationLib
SmmPciExpressLib
SmmPciLibPciRootBridgeIo
SmmPeriodicSmiLib
SmmServicesTableLib
UefiApplicationEntryPoint
UefiBootServicesTableLib
UefiDebugLibConOut
UefiDebugLibDebugPortProtocol
UefiDebugLibStdErr
UefiDevicePathLib
UefiDevicePathLibDevicePathProtocol
UefiDriverEntryPoint
UefiFileHandleLib
UefiLib
UefiMemoryAllocationLib
UefiMemoryLib
UefiPalLib
UefiPciLibPciRootBridgeIo
UefiPciSegmentLibPciRootBridgeIo
UefiRuntimeLib
UefiRuntimeServicesTableLib
UefiSalLib
UefiScsiLib
UefiUsbLib