Autor: ND Data: A: Pcre-dev Assumpte: [pcre-dev] First slot of the offset vector have a wrong value when
PCRE_ERROR_SHORTUTF8 rises
Hi, Philip!
Here is pcretest.exe listing:
PCRE version 8.11 2010-12-10
/(*UTF8)abcdef/
\P\P\x{c2ae}\xc2
Error -25
Documentation about partial matching says:
"If there are at least two slots in the offsets vector when pcre_exec()
returns with a partial match, the first slot is set to the offset of the
earliest character that was inspected when the partial match was found.
For convenience, the second offset points to the end of the subject so
that a substring can easily be identified."
The PCRE_ERROR_SHORTUTF8 needs to be a subcase of PCRE_ERROR_PARTIAL, and
this rule must work in the PCRE_ERROR_SHORTUTF8 case. I don't know how to
see the real offset vector values in pcretest.exe. But it seems that first
slot in the offset vector have a wrong value in this case.