/[pcre]/code/trunk/pcre_exec.c
ViewVC logotype

Diff of /code/trunk/pcre_exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 567 by ph10, Sat Nov 6 17:10:00 2010 UTC revision 569 by ph10, Sun Nov 7 16:14:50 2010 UTC
# Line 5801  back the character offset. */ Line 5801  back the character offset. */
5801  #ifdef SUPPORT_UTF8  #ifdef SUPPORT_UTF8
5802  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)  if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0)
5803    {    {
5804    if (_pcre_valid_utf8((USPTR)subject, length) >= 0)    int tb;
5805      return PCRE_ERROR_BADUTF8;    if ((tb = _pcre_valid_utf8((USPTR)subject, length)) >= 0)
5806        return (tb == length && md->partial > 1)?
5807          PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
5808    if (start_offset > 0 && start_offset < length)    if (start_offset > 0 && start_offset < length)
5809      {      {
5810      int tb = ((USPTR)subject)[start_offset] & 0xc0;      tb = ((USPTR)subject)[start_offset] & 0xc0;
5811      if (tb == 0x80) return PCRE_ERROR_BADUTF8_OFFSET;      if (tb == 0x80) return PCRE_ERROR_BADUTF8_OFFSET;
5812      }      }
5813    }    }

Legend:
Removed from v.567  
changed lines
  Added in v.569

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12