From patchwork Tue May 5 14:48:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 48040 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1364220553 for ; Tue, 5 May 2015 14:49:03 +0000 (UTC) Received: by wixv7 with SMTP id v7sf43850666wix.0 for ; Tue, 05 May 2015 07:49:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=HsPbqcffqzZJhiCSMoKH2LDIqzt18XzQ9W7dM2e5uPs=; b=E1zl0OYxwgXaaMAnpn2Be+h1BfxUfVhNjBRTrFERK1lia0N19FnWV/ZDgunpb1B6QH Omc63P+vNAh6Hu/9pAmZhfpuAuIm9Ms0GM0H+caN7X1KOQRwu8sZU+axq5uCbpE4lBaw yCXtvdHUF/viJT/waeGrGP4dmwUnF+YHEUYDoeGcFtE1o6wkgqFqO4pRIz6XkSO2OYHT HhCjWtdOzhINepX29jxEToCDJZJrX0wo9ltjuos8kXKwonFcXtVVCUMb07jIZ/YkWXBf JfI4n3Plh4nNZMvHJKoepiB4G4kiDhBtsTKMSzxJqgO5kXINQ4b9ONPWtS4dUPfcSF8Y i+AQ== X-Gm-Message-State: ALoCoQkGHqofepO4BMM4wKs2jmdqfP3sssBnRxPY5Gi8CDRpFMGHwSbkCEsfDUFWpxpdyrHjZe9t X-Received: by 10.112.166.137 with SMTP id zg9mr22454412lbb.11.1430837342342; Tue, 05 May 2015 07:49:02 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.211 with SMTP id jq19ls929210lab.69.gmail; Tue, 05 May 2015 07:49:02 -0700 (PDT) X-Received: by 10.112.139.198 with SMTP id ra6mr7916852lbb.15.1430837342192; Tue, 05 May 2015 07:49:02 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id bj8si12620985lbc.93.2015.05.05.07.49.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 May 2015 07:49:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbcga7 with SMTP id ga7so130461807lbc.1 for ; Tue, 05 May 2015 07:49:02 -0700 (PDT) X-Received: by 10.153.8.167 with SMTP id dl7mr24373654lad.86.1430837342042; Tue, 05 May 2015 07:49:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp2294629lbt; Tue, 5 May 2015 07:49:01 -0700 (PDT) X-Received: by 10.107.11.81 with SMTP id v78mr34293527ioi.66.1430837340490; Tue, 05 May 2015 07:49:00 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id n4si7490480ige.19.2015.05.05.07.48.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 May 2015 07:49:00 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ype9T-0003Yl-Vt; Tue, 05 May 2015 14:48:51 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ype9T-0003Ya-1v for edk2-devel@lists.sourceforge.net; Tue, 05 May 2015 14:48:51 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.50 as permitted sender) client-ip=74.125.82.50; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f50.google.com; Received: from mail-wg0-f50.google.com ([74.125.82.50]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Ype9R-0002CU-6e for edk2-devel@lists.sourceforge.net; Tue, 05 May 2015 14:48:51 +0000 Received: by wgyo15 with SMTP id o15so185969334wgy.2 for ; Tue, 05 May 2015 07:48:43 -0700 (PDT) X-Received: by 10.194.172.130 with SMTP id bc2mr53209534wjc.85.1430837323212; Tue, 05 May 2015 07:48:43 -0700 (PDT) Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id fs9sm25926124wjc.34.2015.05.05.07.48.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 May 2015 07:48:42 -0700 (PDT) From: Ard Biesheuvel To: olivier.martin@arm.com, edk2-devel@lists.sourceforge.net, ronald.cron@arm.com Date: Tue, 5 May 2015 16:48:32 +0200 Message-Id: <1430837315-7388-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430837315-7388-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430837315-7388-1-git-send-email-ard.biesheuvel@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1Ype9R-0002CU-6e Subject: [edk2] [PATCH 2/5] ArmPkg: fix pointer indirection bug in BdsFirmwareVolumeLoadImage() X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 --- 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 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,