mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Merge pull request #3279 from marcstern/v2/PR/PCRE2_error_msg
Fixed PCRE2 error message
This commit is contained in:
commit
dfcf31a41f
@ -77,6 +77,14 @@ void *msc_pregcomp_ex(apr_pool_t *pool, const char *pattern, int options,
|
|||||||
if (_erroffset != NULL) {
|
if (_erroffset != NULL) {
|
||||||
*_erroffset = (int)error_offset;
|
*_erroffset = (int)error_offset;
|
||||||
}
|
}
|
||||||
|
PCRE2_UCHAR buffer[256];
|
||||||
|
// Get the error message from the error code
|
||||||
|
pcre2_get_error_message(error_number, buffer, sizeof(buffer));
|
||||||
|
#ifdef DEBUG_CONF
|
||||||
|
* _errptr = apr_psprintf(pool, "%s - pattern = %s", buffer, pattern);
|
||||||
|
#else
|
||||||
|
* _errptr = apr_pstrdup(pool, buffer);
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user