Skip to content

Commit 89ff91d

Browse files
author
Marc Stern
committed
Fixed PCRE2 error message
1 parent 1121ef0 commit 89ff91d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apache2/msc_pcre.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ void *msc_pregcomp_ex(apr_pool_t *pool, const char *pattern, int options,
7777
if (_erroffset != NULL) {
7878
*_erroffset = (int)error_offset;
7979
}
80+
PCRE2_UCHAR buffer[256];
81+
// Get the error message from the error code
82+
pcre2_get_error_message(error_number, buffer, sizeof(buffer));
83+
*_errptr = apr_pstrdup(pool, buffer);
8084
return NULL;
8185
}
8286

0 commit comments

Comments
 (0)