mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ fix: Onigmo RegEx: fixing possible crash
This commit is contained in:
parent
f78cb05d39
commit
cf72b7b8da
@ -5824,6 +5824,12 @@ onig_reg_init(regex_t* reg, OnigOptionType option,
|
||||
if (IS_NULL(reg))
|
||||
return ONIGERR_INVALID_ARGUMENT;
|
||||
|
||||
(reg)->exact = (UChar* )NULL;
|
||||
(reg)->chain = (regex_t* )NULL;
|
||||
(reg)->p = (UChar* )NULL;
|
||||
(reg)->name_table = (void* )NULL;
|
||||
(reg)->repeat_range = (OnigRepeatRange* )NULL;
|
||||
|
||||
if (ONIGENC_IS_UNDEF(enc))
|
||||
return ONIGERR_DEFAULT_ENCODING_IS_NOT_SET;
|
||||
|
||||
@ -5843,13 +5849,9 @@ onig_reg_init(regex_t* reg, OnigOptionType option,
|
||||
(reg)->options = option;
|
||||
(reg)->syntax = syntax;
|
||||
(reg)->optimize = 0;
|
||||
(reg)->exact = (UChar* )NULL;
|
||||
(reg)->chain = (regex_t* )NULL;
|
||||
|
||||
(reg)->p = (UChar* )NULL;
|
||||
(reg)->alloc = 0;
|
||||
(reg)->used = 0;
|
||||
(reg)->name_table = (void* )NULL;
|
||||
|
||||
(reg)->case_fold_flag = case_fold_flag;
|
||||
return 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user