mirror of
https://github.com/apache/httpd.git
synced 2025-07-29 12:37:06 +00:00
ap_regex: Follow up to r1897240: Fix issues spotted by Rüdiger (thanks!).
#include "apr_thread_proc.h" is enough/needed by util_pcre.c and main.c. Fix compilation (vector => ovector) for !HAVE_PCRE2 && APR_HAS_THREAD_LOCAL. Check pcre2_match_data_create() return value for HAVE_PCRE2 && !APR_HAS_THREAD_LOCAL. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897250 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include "apr_lib.h"
|
||||
#include "apr_md5.h"
|
||||
#include "apr_time.h"
|
||||
#include "apr_thread_proc.h"
|
||||
#include "apr_version.h"
|
||||
#include "apu_version.h"
|
||||
|
||||
|
@ -53,10 +53,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "httpd.h"
|
||||
#include "apr_version.h"
|
||||
#include "apr_portable.h"
|
||||
#include "apr_strings.h"
|
||||
#include "apr_tables.h"
|
||||
#include "apr_thread_proc.h"
|
||||
|
||||
#ifdef HAVE_PCRE2
|
||||
#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
@ -331,7 +330,7 @@ static match_data_pt get_match_data(apr_size_t size,
|
||||
#ifdef HAVE_PCRE2
|
||||
*ovector = pcre2_get_ovector_pointer(tls->data);
|
||||
#else
|
||||
*vector = tls->data;
|
||||
*ovector = tls->data;
|
||||
#endif
|
||||
return tls->data;
|
||||
}
|
||||
@ -353,7 +352,9 @@ static match_data_pt get_match_data(apr_size_t size,
|
||||
|
||||
#ifdef HAVE_PCRE2
|
||||
data = pcre2_match_data_create(size, NULL);
|
||||
*ovector = pcre2_get_ovector_pointer(data);
|
||||
if (data) {
|
||||
*ovector = pcre2_get_ovector_pointer(data);
|
||||
}
|
||||
#else
|
||||
if (size > POSIX_MALLOC_THRESHOLD) {
|
||||
data = malloc(size * sizeof(int) * 3);
|
||||
|
Reference in New Issue
Block a user