From patchwork Tue Oct 3 17:17:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 114705 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2121968qgn; Tue, 3 Oct 2017 10:17:41 -0700 (PDT) X-Received: by 10.84.244.12 with SMTP id g12mr4599701pll.223.1507051061177; Tue, 03 Oct 2017 10:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507051061; cv=none; d=google.com; s=arc-20160816; b=TjPkFWaThB0g01bfZv9F3KqPCWyedQqrkHwAr/8AJDLQJpKqmcJYgvsHGpiwH+ZCn2 nsrP5YoiPoy8EeC4RVQULrPIEZTfBox8FPKcnmFJvQ6GFImowzD5FY/KmknCo+0qvGfQ J+8POCqSOESt/TGVQeKw6W3UAILGa//K+OCBuMCkhY7Fux9EerY1wygZqre+hA9Ohq14 NubsSl7X5TtphlBvKWnGg3rRFoM+KD3UXjPxO/fYpTQfwqQVau3uEOaoynE3yvheCjDY F2w2tGiMELpcGVUyYt1+YW9hTTVakLN+oLE4xHSYbvnQOPpjSuW4V8nqKG3DVfKjcpu5 xj9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=y6AJbOtRn7dHvUJXakb2P5xe634BcrSKmMthhEv6mF4=; b=kmTJp3K5tMRNR9kibbc6+yKp+H2EaGGi+A1XKdGF9Y5QWWehfwz1SoaDhhEeXrxclN fWfj+UaRnTMxh+tfWDe7CA+eC/i7qG1TWB9ZLO61ePezjwP5Xv9LasVvSVmGhif265Sh fqsYV455l3cF0hM91q8ZNR5Iv+OOaSXLe5Us/McdVZFEDvPyFb1msO/GNB9I7CABUD+T neFqqqrvLacR5edTH4gvHVaymnexQXdnF5rsBsXpxpVln6Xs7ZhGFAmK50uQn3PnnAUt uGEFvXYnHTTRhKOrXM41zGAqX00feLqEGdhBWNYbA8ZZl8WgIDEJskfsLNuC8sReHNQ7 t9qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=eZ5iabbo; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id g28si1350826pfd.426.2017.10.03.10.17.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Oct 2017 10:17:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=eZ5iabbo; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BBDB821F2AF84; Tue, 3 Oct 2017 10:14:19 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::233; helo=mail-wm0-x233.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D547921E781F7 for ; Tue, 3 Oct 2017 10:14:17 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id u138so18392155wmu.4 for ; Tue, 03 Oct 2017 10:17:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=p/rUDtfzdW65N3N7UX+wrQsfUmL00nE5w93y1T0h4AY=; b=eZ5iabbol/iUVMNUlwuWnk303uKgFT9v+jx6YWYjHEqS3H+QZyvAMKxXq5fVJR0Ofe Fc6KR0jLQS5gdfoPUtzqBYGf5CXQI6oNj7X6N0aJcSa9xj6wc+lv0sbrvf1sAw+j9iuS gTORRygH6XclvD9zLJ7ap1Ucr6A//T2MrQbp4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=p/rUDtfzdW65N3N7UX+wrQsfUmL00nE5w93y1T0h4AY=; b=Zz351IQItmygInw8X/AZjWdylBL/mYuHckvzaHdP5abB/4YPKSp6iL3K3YKEyE0Z+K 0HJpAvw3B+v+SoInDpPir52Z4YUXnnQALqD0UziveIY7bYoY6EAiDNIuvBDw5O7gNZGm X1XGl9fM3rP/ao/qmv6gCjXPp6gwzUg1laSVk5YQ+l5cLYSGv46MAVqCRhusha6J9yBs orYtmnD1CVBrNRFdIw6G9R9mLiUebsgPaVIu0ne+PKx1/FrzoJsk1P8qkSZ2gPN66U3I 1GltJh2/8WOWu3arIuk1QXfHxMeI1pugQm/HUI0tJc8/sIt2eafsTA/dfyAWF2BZXlgq Z3Bw== X-Gm-Message-State: AMCzsaXULUAPPlBNFe2ab0fz1dt2R5sHsOz1y/ZSxdTwuO24dngt/ZDB QUXRWV3Oire2En2rshTLmWqQhjr3dkQ= X-Google-Smtp-Source: AOwi7QB7N+W6NuGmJgmBqD3fFn95ZbYaiTguEhm+dIM5KN7pL2U8W2Fz4S8fRXiY92DvuH2SWjxzoQ== X-Received: by 10.28.191.215 with SMTP id o84mr15341770wmi.153.1507051056483; Tue, 03 Oct 2017 10:17:36 -0700 (PDT) Received: from localhost.localdomain ([160.90.203.54]) by smtp.gmail.com with ESMTPSA id 31sm4748440wrm.0.2017.10.03.10.17.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Oct 2017 10:17:33 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, star.zeng@intel.com, eric.dong@intel.com Date: Tue, 3 Oct 2017 18:17:27 +0100 Message-Id: <20171003171727.5641-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" When invoking EfiBootManagerIsValidLoadOptionVariableName() with the variable name 'BootNext', we should simply return FALSE, given that it is not an indexed Boot#### load option. However, in DEBUG mode, we will hit an assert in BmCharToUint() and crash. So remove the assert. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 1 - 1 file changed, 1 deletion(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Signed-off-by: Ard Biesheuvel diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c index 11ab86792a52..a3fa25424592 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c @@ -420,7 +420,6 @@ BmCharToUint ( return (Char - L'A' + 0xA); } - ASSERT (FALSE); return (UINTN) -1; }