Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1cba2d4

Browse files
PCRE2 fix: correct length arg in calls to match functions
1 parent 9d4b426 commit 1cba2d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎apache2/msc_pcre.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,15 @@ int msc_regexec_ex(msc_regex_t *regex, const char *s, unsigned int slen,
251251

252252
#ifdef WITH_PCRE_JIT
253253
if (regex->jit_compile_rc == 0) {
254-
pcre2_ret = pcre2_jit_match(regex->re, pcre2_s, (PCRE2_SIZE)strlen(s),
254+
pcre2_ret = pcre2_jit_match(regex->re, pcre2_s, slen,
255255
(PCRE2_SIZE)(startoffset), (uint32_t)options, match_data, regex->match_context);
256256
}
257257
if (regex->jit_compile_rc != 0 || pcre2_ret == PCRE2_ERROR_JIT_STACKLIMIT) {
258-
pcre2_ret = pcre2_match(regex->re, pcre2_s, (PCRE2_SIZE)strlen(s),
258+
pcre2_ret = pcre2_match(regex->re, pcre2_s, slen,
259259
(PCRE2_SIZE)(startoffset), (PCRE2_NO_JIT | (uint32_t)options), match_data, regex->match_context);
260260
}
261261
#else
262-
pcre2_ret = pcre2_match(regex->re, pcre2_s, (PCRE2_SIZE)strlen(s),
262+
pcre2_ret = pcre2_match(regex->re, pcre2_s, slen,
263263
(PCRE2_SIZE)(startoffset), (uint32_t)options, match_data, regex->match_context);
264264
#endif
265265
if (match_data != NULL) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /