MdeModulePkg/RegularExpressionDxe: Miss null pointer check

Oniguruma https://github.com/kkos/oniguruma
this change is merged from oniguruma develop branch.
from commit ea36d810f1d9b28f3ef20bd8d453bea2f7fb598b

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Dongao Guo
2018-10-11 14:57:01 +08:00
committed by Liming Gao
parent 16bd7c35df
commit a5def17714
3 changed files with 39 additions and 1 deletions

View File

@@ -758,6 +758,10 @@ onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges)
if (UserDefinedPropertyTable == 0) {
UserDefinedPropertyTable = onig_st_init_strend_table_with_size(10);
if (IS_NULL(UserDefinedPropertyTable)) {
xfree(s);
return ONIGERR_MEMORY;
}
}
e = UserDefinedPropertyRanges + UserDefinedPropertyNum;