From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.12668.1582122220440694706 for ; Wed, 19 Feb 2020 06:23:40 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0318c73c9b=nickle.wang@hpe.com) Received: from pps.filterd (m0134420.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01JENeT4010584; Wed, 19 Feb 2020 14:23:40 GMT Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 2y8ub7n8gg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Feb 2020 14:23:40 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id F22216B; Wed, 19 Feb 2020 14:23:01 +0000 (UTC) Received: from WANGNICK4.asiapacific.hpqcorp.net (unknown [16.168.160.55]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id CE7AD4A; Wed, 19 Feb 2020 14:22:59 +0000 (UTC) From: nickle.wang@hpe.com To: devel@edk2.groups.io, nickle.wang@hpe.com Cc: dandan.bi@intel.com Subject: [PATCH] MdeModulePkg/SetupBrowserDxe: Fix IsZeroGuid() ASSERT. Date: Wed, 19 Feb 2020 22:22:40 +0800 Message-Id: <20200219142240.10448-1-nickle.wang@hpe.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-19_03:2020-02-19,2020-02-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=757 impostorscore=0 malwarescore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 adultscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002190111 Content-Transfer-Encoding: 8bit >>From the function description of GetIfrBinaryData(), FormSetGuid can be NULL. However, FormSetGuid is passed to IsZeroGuid(). This causes exception when FormSetGuid is NULL. Signed-off-by: Nickle Wang --- MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 288f1c3197..82067b541c 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -2,6 +2,7 @@ Entry and initialization module for the browser. Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+(C) Copyright 2020 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -5844,7 +5845,7 @@ GetIfrBinaryData ( // // Try to compare against formset GUID // - if (IsZeroGuid (FormSetGuid) || + if (IsZeroGuid (ComparingGuid) || CompareGuid (ComparingGuid, (EFI_GUID *)(OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) { break; } -- 2.20.1.windows.1