]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: fix pointer indirection bug in BdsFirmwareVolumeLoadImage()
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 7 May 2015 15:37:10 +0000 (15:37 +0000)
committeroliviermartin <oliviermartin@Edk2>
Thu, 7 May 2015 15:37:10 +0000 (15:37 +0000)
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 <olivier.martin@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17357 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Library/BdsLib/BdsFilePath.c

index a0a949d0147a37d4765aa86780d95c620fb104d7..83a483cf8811253262536f9925d10f1cfe4a5ef1 100644 (file)
@@ -697,7 +697,7 @@ BdsFirmwareVolumeLoadImage (
         Status = FwVol->ReadFile (\r
                                 FwVol,\r
                                 FvNameGuid,\r
-                                (VOID*)(UINTN)(*Image),\r
+                                (VOID**)Image,
                                 ImageSize,\r
                                 &FvType,\r
                                 &Attrib,\r