diff mbox

[edk2,1/4] ArmPkg: fix pointer indirection bug in BdsFirmwareVolumeLoadImage()

Message ID 1430824625-26772-2-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel May 5, 2015, 11:17 a.m. UTC
The EFI_FIRMWARE_VOLUME2_PROTOCOL::EFI_FV_READ_SECTION prototype
takes a pointer to a pointer to an output buffer, so we should
pass the address of the Image pointer and not its value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 ArmPkg/Library/BdsLib/BdsFilePath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/ArmPkg/Library/BdsLib/BdsFilePath.c b/ArmPkg/Library/BdsLib/BdsFilePath.c
index a0a949d0147a..53af9ee76d36 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,