We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ff6c0c commit ff8f271Copy full SHA for ff8f271
ext/pcre/php_pcre.c
@@ -720,6 +720,13 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(zend_string *regex)
720
tables = (uint8_t *)zend_hash_find_ptr(&char_tables, BG(locale_string));
721
if (!tables) {
722
tables = pcre2_maketables(gctx);
723
+ if (UNEXPECTED(!tables)) {
724
+ php_error_docref(NULL,E_WARNING, "Failed to generate locale character tables");
725
+ pcre_handle_exec_error(PCRE2_ERROR_NOMEMORY);
726
+ zend_string_release_ex(key, 0);
727
+ efree(pattern);
728
+ return NULL;
729
+ }
730
zend_hash_add_ptr(&char_tables, BG(locale_string), (void *)tables);
731
}
732
pcre2_set_character_tables(cctx, tables);
0 commit comments