Message ID | 1407850402-11193-3-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDYNJBOFRECBBNVPVCPQKGQE32C7SSA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 396BE20540 for <linaro@patches.linaro.org>; Tue, 12 Aug 2014 13:33:43 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id m1sf45218507oag.11 for <linaro@patches.linaro.org>; Tue, 12 Aug 2014 06:33:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=pToL+oX1axCnswYIodiRn5flG1sLMEC6e0ED3Y/buug=; b=m49O6mlG/IHDTseICkBHN98WseKsY5zXgOM2IUJjpONoXvy42OcOnNM/hm9OObgdMX DSAwAwDeaefhckh2QButkO57g7TtC+DMTU8qvlgqnRA8R76eNNoPpn4eZnUPDV4Kl18k YYTuHjQJR0rC+GpbxyfX51oKpc+vo8av4/rKPFBiS08VUn4G9hP9rGSy/JTZWIVbYMm4 QDANm0YP2WATwZytvDwHaQGM7lhYVtAIHdSCy4jJg6ZFHeBTEprv6foEvRs+HAYPUnqW eYMHslOTLc+TP6ziJUODu9ZHgUzn7EBSdP6QMZseDgWR3Vr5ujrKAws17IVSo5mCT4vO X5ZA== X-Gm-Message-State: ALoCoQmoxQyhc7utcCDUiEANaP7Yid9oREM48BRIMdOmL+jnAeZT0yea2Mg03wX3oeF1SDlUvd4m X-Received: by 10.42.119.82 with SMTP id a18mr17340600icr.19.1407850422828; Tue, 12 Aug 2014 06:33:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.47 with SMTP id w44ls125987qgw.95.gmail; Tue, 12 Aug 2014 06:33:42 -0700 (PDT) X-Received: by 10.221.68.135 with SMTP id xy7mr595137vcb.65.1407850422695; Tue, 12 Aug 2014 06:33:42 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id 3si2644230vct.27.2014.08.12.06.33.42 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:33:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so13276311vcb.31 for <patchwork-forward@linaro.org>; Tue, 12 Aug 2014 06:33:42 -0700 (PDT) X-Received: by 10.52.120.51 with SMTP id kz19mr459195vdb.95.1407850422615; Tue, 12 Aug 2014 06:33:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp249183vcb; Tue, 12 Aug 2014 06:33:41 -0700 (PDT) X-Received: by 10.180.73.235 with SMTP id o11mr33036137wiv.41.1407850421235; Tue, 12 Aug 2014 06:33:41 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id ib3si30846197wjb.175.2014.08.12.06.33.40 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:33:41 -0700 (PDT) Received-SPF: pass (google.com: domain of ard.biesheuvel@linaro.org designates 209.85.212.172 as permitted sender) client-ip=209.85.212.172; Received: by mail-wi0-f172.google.com with SMTP id n3so5859133wiv.5 for <patches@linaro.org>; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) X-Received: by 10.180.84.66 with SMTP id w2mr32223177wiy.27.1407850420812; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) Received: from ards-macbook-pro.local ([109.227.30.102]) by mx.google.com with ESMTPSA id kw1sm9347231wjb.19.2014.08.12.06.33.38 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:33:40 -0700 (PDT) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: matthew.garrett@nebula.com, pjones@redhat.com Cc: leif.lindholm@linaro.org, ilias.biris@linaro.org, patches@linaro.org, Ard Biesheuvel <ard.biesheuvel@linaro.org> Subject: [PATCH 2/5] unhook_system_services: bail on systab == NULL Date: Tue, 12 Aug 2014 15:33:19 +0200 Message-Id: <1407850402-11193-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1407850402-11193-1-git-send-email-ard.biesheuvel@linaro.org> References: <1407850402-11193-1-git-send-email-ard.biesheuvel@linaro.org> 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.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/replacements.c b/replacements.c index 48dc43785e2d..5dfa35567184 100644 --- a/replacements.c +++ b/replacements.c @@ -70,6 +70,9 @@ static EFI_HANDLE last_loaded_image; void unhook_system_services(void) { + if (!systab) + return; + systab->BootServices->Exit = system_exit; systab->BootServices->LoadImage = system_load_image; systab->BootServices->StartImage = system_start_image;
Prevent unhook_system_services() from dereferencing a NULL systab, which may occur if hook_system_services() has never been called. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- replacements.c | 3 +++ 1 file changed, 3 insertions(+)