mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdeModulePkg/RegularExpressionDxe: Add null pointer check
This is the part of commit 3948c510edad901bb9f8d23f7bf0f4ae91b5fcde. 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:
parent
47f15da160
commit
6d665168b0
@ -1572,6 +1572,7 @@ onig_set_callout_of_name(OnigEncoding enc, OnigCalloutType callout_type,
|
||||
fe->arg_types[i] = arg_types[i];
|
||||
}
|
||||
for (i = arg_num - opt_arg_num, j = 0; i < arg_num; i++, j++) {
|
||||
if(IS_NULL(opt_defaults))return ONIGERR_INVALID_ARGUMENT;
|
||||
if (fe->arg_types[i] == ONIG_TYPE_STRING) {
|
||||
OnigValue* val = opt_defaults + j;
|
||||
UChar* ds = onigenc_strdup(enc, val->s.start, val->s.end);
|
||||
|
Loading…
x
Reference in New Issue
Block a user