Fix NULL deference if pcre2_callout_enumerate() is called with a NULL pattern
when Unicode support is available (Bugzilla 2076).
This commit is contained in:
parent
e105a0f83f
commit
a122f42abf
|
@ -73,6 +73,9 @@ or deserialization (the "load" or "save" commands).
|
||||||
|
|
||||||
11. Fix memory leak in pcre2_serialize_decode() when the input is invalid.
|
11. Fix memory leak in pcre2_serialize_decode() when the input is invalid.
|
||||||
|
|
||||||
|
12. Fix potential NULL dereference in pcre2_callout_enumerate() if called with
|
||||||
|
a NULL pattern pointer when Unicode support is available.
|
||||||
|
|
||||||
|
|
||||||
Version 10.23 14-February-2017
|
Version 10.23 14-February-2017
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
|
@ -261,11 +261,15 @@ pcre2_real_code *re = (pcre2_real_code *)code;
|
||||||
pcre2_callout_enumerate_block cb;
|
pcre2_callout_enumerate_block cb;
|
||||||
PCRE2_SPTR cc;
|
PCRE2_SPTR cc;
|
||||||
#ifdef SUPPORT_UNICODE
|
#ifdef SUPPORT_UNICODE
|
||||||
BOOL utf = (re->overall_options & PCRE2_UTF) != 0;
|
BOOL utf;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (re == NULL) return PCRE2_ERROR_NULL;
|
if (re == NULL) return PCRE2_ERROR_NULL;
|
||||||
|
|
||||||
|
#ifdef SUPPORT_UNICODE
|
||||||
|
utf = (re->overall_options & PCRE2_UTF) != 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Check that the first field in the block is the magic number. If it is not,
|
/* Check that the first field in the block is the magic number. If it is not,
|
||||||
return with PCRE2_ERROR_BADMAGIC. */
|
return with PCRE2_ERROR_BADMAGIC. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue