1) Remove buffer overflow when the number of Driver Binding Protocols increases in the middle of ConnectController()
2) Remove possibility of getting a CR() macro ASSERT() when DisconnectController() is called during a recursive ConnectController() 3) Make sure the DeviceHandle field of the Loaded Image Protocol is always correct 4) Update Loaded Image Protocol logic to guarantee that the DeviceHandle and FilePath fields are correct the image is loaded from a buffer git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3853 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -30,7 +30,7 @@ CoreOpenImageFile (
|
||||
IN BOOLEAN BootPolicy,
|
||||
IN VOID *SourceBuffer OPTIONAL,
|
||||
IN UINTN SourceSize,
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL *FilePath,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
|
||||
OUT EFI_HANDLE *DeviceHandle,
|
||||
IN IMAGE_FILE_HANDLE *ImageFileHandle,
|
||||
OUT UINT32 *AuthenticationStatus
|
||||
@ -95,6 +95,7 @@ Returns:
|
||||
ImageFileHandle->Source = SourceBuffer;
|
||||
ImageFileHandle->SourceSize = SourceSize;
|
||||
*DeviceHandle = NULL;
|
||||
CoreLocateDevicePath (&gEfiDevicePathProtocolGuid, &FilePath, DeviceHandle);
|
||||
if (SourceSize > 0) {
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user