summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2019-08-12 10:52:18 +0800
committerLiming Gao <liming.gao@intel.com>2019-08-13 17:05:31 +0800
commita7b54d1821ad2a7c88ddc1a8dba257c51aac86b8 (patch)
tree84b93cb140204990aa812b1e244ed2dab9d8365a /MdeModulePkg/Universal
parentb26691c47188ce255b8a4d920bf07ddf1431e2cd (diff)
downloadedk2-a7b54d1821ad2a7c88ddc1a8dba257c51aac86b8.tar.gz
edk2-a7b54d1821ad2a7c88ddc1a8dba257c51aac86b8.tar.bz2
edk2-a7b54d1821ad2a7c88ddc1a8dba257c51aac86b8.zip
MdeModulePkg/RegularExpressionDxe: Add two missing null pointer checks
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 <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r--MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c2
1 files changed, 2 insertions, 0 deletions
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++)