diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2022-12-03 08:54:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 17:54:43 +0100 |
commit | 8d56880699f5befb1185b20be4a26a7fa8eef1bc (patch) | |
tree | b86b2ab671731d8bcaa243db817ebd9ae7c4c1fd | |
parent | 7846880d63cf4b0d0d861659e222cce9c597c914 (diff) | |
download | pcre-8d56880699f5befb1185b20be4a26a7fa8eef1bc.tar.gz |
jit: correctly implement utf_continue() for utf16 (#168)
Resulting in a constant false result.
-rw-r--r-- | src/pcre2_jit_neon_inc.h | 2 | ||||
-rw-r--r-- | src/pcre2_jit_simd_inc.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pcre2_jit_neon_inc.h b/src/pcre2_jit_neon_inc.h index 150da29e..e74adf12 100644 --- a/src/pcre2_jit_neon_inc.h +++ b/src/pcre2_jit_neon_inc.h @@ -327,7 +327,7 @@ match:; return NULL; #if defined(FF_UTF) - if (utf_continue(str_ptr + IN_UCHARS(-offs1))) + if (utf_continue((PCRE2_SPTR)str_ptr - offs1)) { /* Not a match. */ str_ptr += IN_UCHARS(1); diff --git a/src/pcre2_jit_simd_inc.h b/src/pcre2_jit_simd_inc.h index d99cfc5c..1a5ce4ed 100644 --- a/src/pcre2_jit_simd_inc.h +++ b/src/pcre2_jit_simd_inc.h @@ -776,7 +776,7 @@ typedef union { } int_char; #if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 -static SLJIT_INLINE int utf_continue(sljit_u8 *s) +static SLJIT_INLINE int utf_continue(PCRE2_SPTR s) { #if PCRE2_CODE_UNIT_WIDTH == 8 return (*s & 0xc0) == 0x80; |