From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: liming.gao@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by groups.io with SMTP; Sun, 11 Aug 2019 19:52:30 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Aug 2019 19:52:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,375,1559545200"; d="scan'208";a="177354693" Received: from shwde7172.ccr.corp.intel.com ([10.239.158.22]) by fmsmga007.fm.intel.com with ESMTP; 11 Aug 2019 19:52:28 -0700 From: "Liming Gao" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu Subject: [Patch] MdeModulePkg/RegularExpressionDxe: Add two missing null pointer checks Date: Mon, 12 Aug 2019 10:52:18 +0800 Message-Id: <1565578338-10404-1-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 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. 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(+) 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, ext = onig_get_regex_ext(reg); CHECK_NULL_RETURN_MEMERR(ext); + CHECK_NULL_RETURN_MEMERR(ext->tag_table); r = callout_tag_entry_raw(env, ext->tag_table, name, name_end, entry_val); e = onig_reg_callout_list_at(reg, (int )entry_val); @@ -3277,6 +3278,7 @@ node_new_str_raw_char(UChar c) p[0] = c; node = node_new_str_raw(p, p + 1); + CHECK_NULL_RETURN(node); /* clear buf tail */ for (i = 1; i < NODE_STRING_BUF_SIZE; i++) -- 2.13.0.windows.1