]> git.pld-linux.org Git - packages/php.git/blob - bug-60986.patch
Release 41 (by relup.sh)
[packages/php.git] / bug-60986.patch
1 diff -urNp -x '*.orig' php-5.2.17.org/ext/pcre/php_pcre.c php-5.2.17/ext/pcre/php_pcre.c
2 --- php-5.2.17.org/ext/pcre/php_pcre.c  2010-01-03 10:23:27.000000000 +0100
3 +++ php-5.2.17/ext/pcre/php_pcre.c      2021-10-23 19:12:03.406458393 +0200
4 @@ -241,6 +241,7 @@ PHPAPI pcre_cache_entry* pcre_get_compil
5         char                            *pattern;
6         int                                      do_study = 0;
7         int                                      poptions = 0;
8 +       int                             count = 0;
9         unsigned const char *tables = NULL;
10  #if HAVE_SETLOCALE
11         char                            *locale = setlocale(LC_CTYPE, NULL);
12 @@ -253,10 +254,10 @@ PHPAPI pcre_cache_entry* pcre_get_compil
13         regex_len = strlen(regex);
14         if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) {
15                 /*
16 -                * We use a quick pcre_info() check to see whether cache is corrupted, and if it
17 +                * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it
18                  * is, we flush it and compile the pattern from scratch.
19                  */
20 -               if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
21 +               if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
22                         zend_hash_clean(&PCRE_G(pcre_cache));
23                 } else {
24  #if HAVE_SETLOCALE
25 diff -urNp -x '*.orig' php-5.2.17.org/ext/pcre/php_pcre.def php-5.2.17/ext/pcre/php_pcre.def
26 --- php-5.2.17.org/ext/pcre/php_pcre.def        2007-02-26 13:38:34.000000000 +0100
27 +++ php-5.2.17/ext/pcre/php_pcre.def    2021-10-23 19:12:03.406458393 +0200
28 @@ -4,7 +4,6 @@ php_pcre_copy_substring
29  php_pcre_exec
30  php_pcre_get_substring
31  php_pcre_get_substring_list
32 -php_pcre_info
33  php_pcre_maketables
34  php_pcre_study
35  php_pcre_version
This page took 0.182217 seconds and 3 git commands to generate.