diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_pcre_compat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 509a8ea..0d19769 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c | |||
| @@ -34,6 +34,9 @@ bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str, | |||
| 34 | #ifdef SP_HAS_PCRE2 | 34 | #ifdef SP_HAS_PCRE2 |
| 35 | pcre2_match_data* match_data = | 35 | pcre2_match_data* match_data = |
| 36 | pcre2_match_data_create_from_pattern(regexp, NULL); | 36 | pcre2_match_data_create_from_pattern(regexp, NULL); |
| 37 | if (NULL == match_data) { | ||
| 38 | sp_log_err("regexp", "Unable to get memory for a regxp."); | ||
| 39 | } | ||
| 37 | ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); | 40 | ret = pcre2_match(regexp, (PCRE2_SPTR)str, len, 0, 0, match_data, NULL); |
| 38 | #else | 41 | #else |
| 39 | int vec[30]; | 42 | int vec[30]; |
