From patchwork Tue May 5 11:17:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 48020 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 735EE2121F for ; Tue, 5 May 2015 11:17:36 +0000 (UTC) Received: by wizk4 with SMTP id k4sf41636318wiz.2 for ; Tue, 05 May 2015 04:17:35 -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=3rfRv8xYaVZ420J4USzAIFk5lJW7iz2bWE40OUJQEcM=; b=RtJLVBnHxLX3h/2sXTPv0sXvyt7QVVldx5+jxAQBXT+nbDVy8KtK0w3QcL14d7bp85 rxDHefGB0iX2wvARhhVGhYZkBNJBPVoWA8WFnEBd2YJsKZ3xE9pVcItxAIzeo/rhMWTy 9dsUtsrPI4fBy+nMWPRl7lHwxSYp975OtnV/2ky+2cXtFQydKzxb3S/Sw8vQgYLMxgvC DyJD5ChDW3fdlNHfST4vj9kgsgOEwkncBYRRb0NJFGffrI125ugPQJKotwugr1vobDGU 2F3alLc8gEQ/fHdfTj585DZB9oglUkdRprivej+GbVeSq6O1JxVPV9E+4njd52kQX9+R Gotg== X-Gm-Message-State: ALoCoQkfNWGeSgiFu2GZsflee9Tg+K0llqavZWB1EEuqJT57YY8U7pnBa5WnRzp/Cy5E4u7HTKey X-Received: by 10.180.88.226 with SMTP id bj2mr1088957wib.7.1430824655791; Tue, 05 May 2015 04:17:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.169 with SMTP id r9ls796222laj.86.gmail; Tue, 05 May 2015 04:17:35 -0700 (PDT) X-Received: by 10.112.57.197 with SMTP id k5mr24183035lbq.102.1430824655609; Tue, 05 May 2015 04:17:35 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id p3si12211526lap.2.2015.05.05.04.17.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 May 2015 04:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laat2 with SMTP id t2so124658609laa.1 for ; Tue, 05 May 2015 04:17:35 -0700 (PDT) X-Received: by 10.112.204.6 with SMTP id ku6mr23237178lbc.73.1430824655473; Tue, 05 May 2015 04:17:35 -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 l1csp2179391lbt; Tue, 5 May 2015 04:17:34 -0700 (PDT) X-Received: by 10.50.30.105 with SMTP id r9mr1202737igh.11.1430824654070; Tue, 05 May 2015 04:17:34 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id k65si711412iok.7.2015.05.05.04.17.33 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 05 May 2015 04:17:34 -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-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ypaqo-0000qZ-EI; Tue, 05 May 2015 11:17:22 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Ypaqm-0000qI-UO for edk2-devel@lists.sourceforge.net; Tue, 05 May 2015 11:17:20 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of linaro.org designates 74.125.82.41 as permitted sender) client-ip=74.125.82.41; envelope-from=ard.biesheuvel@linaro.org; helo=mail-wg0-f41.google.com; Received: from mail-wg0-f41.google.com ([74.125.82.41]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Ypaqm-0007oV-2T for edk2-devel@lists.sourceforge.net; Tue, 05 May 2015 11:17:20 +0000 Received: by wgso17 with SMTP id o17so179136529wgs.1 for ; Tue, 05 May 2015 04:17:14 -0700 (PDT) X-Received: by 10.180.8.34 with SMTP id o2mr3107809wia.18.1430824634086; Tue, 05 May 2015 04:17:14 -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 g8sm17443092wjn.18.2015.05.05.04.17.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 May 2015 04:17:13 -0700 (PDT) From: Ard Biesheuvel To: olivier.martin@arm.com, leif.lindholm@linaro.org, roy.franz@linaro.org, edk2-devel@lists.sourceforge.net Date: Tue, 5 May 2015 13:17:02 +0200 Message-Id: <1430824625-26772-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430824625-26772-1-git-send-email-ard.biesheuvel@linaro.org> References: <1430824625-26772-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 X-Headers-End: 1Ypaqm-0007oV-2T Subject: [edk2] [PATCH 1/4] 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.215.48 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 pass the address of the Image pointer and not its value. Contributed-under: TianoCore Contribution Agreement 1.0 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,