From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: hao.a.wu@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Sun, 11 Aug 2019 22:08:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Aug 2019 22:08:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,376,1559545200"; d="scan'208";a="183456566" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 11 Aug 2019 22:08:13 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 11 Aug 2019 22:08:12 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 11 Aug 2019 22:08:12 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.215]) with mapi id 14.03.0439.000; Mon, 12 Aug 2019 13:08:10 +0800 From: "Wu, Hao A" To: "Gao, Liming" , "devel@edk2.groups.io" CC: "Wang, Jian J" Subject: Re: [Patch] MdeModulePkg/RegularExpressionDxe: Add two missing null pointer checks Thread-Topic: [Patch] MdeModulePkg/RegularExpressionDxe: Add two missing null pointer checks Thread-Index: AQHVULj8wihJgZmqq0i4PnumeuO6Xqb29luQ Date: Mon, 12 Aug 2019 05:08:09 +0000 Message-ID: References: <1565578338-10404-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1565578338-10404-1-git-send-email-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Gao, Liming > Sent: Monday, August 12, 2019 10:52 AM > To: devel@edk2.groups.io > Cc: Wang, Jian J; Wu, Hao A > Subject: [Patch] MdeModulePkg/RegularExpressionDxe: Add two missing > null pointer checks >=20 > After update Oniguruma from v6.9.0 to v6.9.3, two null pointer check > should be added. > This change bases on the patch > https://edk2.groups.io/g/devel/message/45183. >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Signed-off-by: Liming Gao > --- > MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c | > 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git > a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c > b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c > index 4605d40bd1..2b121690e1 100644 > --- > a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c > +++ > b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c > @@ -1955,6 +1955,7 @@ callout_tag_entry(ScanEnv* env, regex_t* reg, > UChar* name, UChar* name_end, >=20 > ext =3D onig_get_regex_ext(reg); > CHECK_NULL_RETURN_MEMERR(ext); > + CHECK_NULL_RETURN_MEMERR(ext->tag_table); > r =3D callout_tag_entry_raw(env, ext->tag_table, name, name_end, > entry_val); >=20 > e =3D onig_reg_callout_list_at(reg, (int )entry_val); > @@ -3277,6 +3278,7 @@ node_new_str_raw_char(UChar c) >=20 > p[0] =3D c; > node =3D node_new_str_raw(p, p + 1); > + CHECK_NULL_RETURN(node); Reviewed-by: Hao A Wu Best Regards, Hao Wu >=20 > /* clear buf tail */ > for (i =3D 1; i < NODE_STRING_BUF_SIZE; i++) > -- > 2.13.0.windows.1