From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C592121A04812 for ; Tue, 4 Apr 2017 19:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491360449; x=1522896449; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ft7tXgNdwb9FY8IoSGmxtzjKMw1ucy4VD+7Oc8Cf+JI=; b=KtOPRpOmKsrTjsuuvHJZajbTspgNlU/J98tN2i6rQLX520NCrtQ4Zit9 HqZ37pLyMBKaRflwNxwpdbjvd2RjkQ==; Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2017 19:47:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,276,1486454400"; d="scan'208";a="951964097" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 04 Apr 2017 19:47:28 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Apr 2017 19:47:28 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 4 Apr 2017 19:47:28 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Wed, 5 Apr 2017 10:47:26 +0800 From: "Dong, Eric" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [patch] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression Thread-Index: AQHSqpLe5qm6+SO48U2cJQ3OUPDMbaG2GEWw Date: Wed, 5 Apr 2017 02:47:26 +0000 Message-ID: References: <1491015068-95352-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1491015068-95352-1-git-send-email-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expression 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: , X-List-Received-Date: Wed, 05 Apr 2017 02:47:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It's better to add StringPtr !=3D NULL check before use *StringPtr. -----Original Message----- From: Bi, Dandan=20 Sent: Saturday, April 1, 2017 10:51 AM To: edk2-devel@lists.01.org Cc: Dong, Eric; Gao, Liming Subject: [patch] MdeModulePkg/UefiHiiLib:Fix incorrect comparison expressio= n Fix the incorrect comparison between pointer and constant zero character. https://bugzilla.tianocore.org/show_bug.cgi?id=3D416 Cc: Eric Dong Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Librar= y/UefiHiiLib/HiiLib.c index a2abf26..166ec18 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c @@ -2200,11 +2200,11 @@ InternalHiiIfrValueAction ( return FALSE; } =20 StringPtr =3D ConfigAltResp; =20 - while (StringPtr !=3D L'\0') { + while (*StringPtr !=3D L'\0') { // // 1. Find GUID=3D...&NAME=3D...&PATH=3D... // StringHdr =3D StringPtr; =20 --=20 1.9.5.msysgit.1