From ffaa6b46ef42a5044aedbbcf16bf3cfdfd822de0 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 7 May 2015 15:37:10 +0000 Subject: [PATCH] ArmPkg: fix pointer indirection bug in BdsFirmwareVolumeLoadImage() The EFI_FIRMWARE_VOLUME2_PROTOCOL::EFI_FV_READ_SECTION prototype takes a pointer to a pointer to an output buffer, so we should not dereference Image (which is a pointer to pointer type itself) but pass its value directly. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin Signed-off-by: Ard Biesheuvel git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17357 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Library/BdsLib/BdsFilePath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c b/ArmPkg/Library/BdsLib/BdsFilePath.c index a0a949d014..83a483cf88 100644 --- a/ArmPkg/Library/BdsLib/BdsFilePath.c +++ b/ArmPkg/Library/BdsLib/BdsFilePath.c @@ -697,7 +697,7 @@ BdsFirmwareVolumeLoadImage ( Status = FwVol->ReadFile ( FwVol, FvNameGuid, - (VOID*)(UINTN)(*Image), + (VOID**)Image, ImageSize, &FvType, &Attrib, -- 2.39.2