From aeb1ba019ce21ada87fd59613743d0355c3fc85f Mon Sep 17 00:00:00 2001 From: ph10 Date: Wed, 16 Oct 2019 17:12:13 +0000 Subject: Fix error offset bug introduced at 1176. git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1179 6239d852-aaf2-0410-a92c-79f79f948069 --- src/pcre2_match.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/pcre2_match.c b/src/pcre2_match.c index cf3032e..48e7b9d 100644 --- a/src/pcre2_match.c +++ b/src/pcre2_match.c @@ -6184,6 +6184,10 @@ if ((match_data->flags & PCRE2_MD_COPIED_SUBJECT) != 0) } match_data->subject = NULL; +/* Zero the error offset in case the first code unit is invalid UTF. */ + +match_data->startchar = 0; + /* ============================= JIT matching ============================== */ -- cgit v1.2.1