diff --git a/ext/pcre/pcre2lib/pcre2_jit_compile.c b/ext/pcre/pcre2lib/pcre2_jit_compile.c index 1f21bfb6ada..283aeff83c3 100644 --- a/ext/pcre/pcre2lib/pcre2_jit_compile.c +++ b/ext/pcre/pcre2lib/pcre2_jit_compile.c @@ -8538,7 +8538,7 @@ int lgb, rgb, ricount; PCRE2_SPTR bptr; uint32_t c; -GETCHARINC(c, cc); +c = *cc++; #if PCRE2_CODE_UNIT_WIDTH == 32 if (c >= 0x110000) return NULL; diff --git a/ext/pcre/tests/bug78338.phpt b/ext/pcre/tests/bug78338.phpt new file mode 100644 index 00000000000..ec5bf1b946f --- /dev/null +++ b/ext/pcre/tests/bug78338.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #78338 (Array cross-border reading in PCRE) +--FILE-- + +--EXPECT-- +DONE