| 2844 |
(offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL; |
(offsets == NULL && offsetcount > 0)) return PCRE_ERROR_NULL; |
| 2845 |
if (offsetcount < 0) return PCRE_ERROR_BADCOUNT; |
if (offsetcount < 0) return PCRE_ERROR_BADCOUNT; |
| 2846 |
if (wscount < 20) return PCRE_ERROR_DFA_WSSIZE; |
if (wscount < 20) return PCRE_ERROR_DFA_WSSIZE; |
| 2847 |
|
if (start_offset < 0 || start_offset > length) return PCRE_ERROR_BADOFFSET; |
| 2848 |
|
|
| 2849 |
/* We need to find the pointer to any study data before we test for byte |
/* We need to find the pointer to any study data before we test for byte |
| 2850 |
flipping, so we scan the extra_data block first. This may set two fields in the |
flipping, so we scan the extra_data block first. This may set two fields in the |
| 2967 |
return PCRE_ERROR_BADUTF8; |
return PCRE_ERROR_BADUTF8; |
| 2968 |
if (start_offset > 0 && start_offset < length) |
if (start_offset > 0 && start_offset < length) |
| 2969 |
{ |
{ |
| 2970 |
int tb = ((uschar *)subject)[start_offset]; |
int tb = ((USPTR)subject)[start_offset] & 0xc0; |
| 2971 |
if (tb > 127) |
if (tb == 0x80) return PCRE_ERROR_BADUTF8_OFFSET; |
|
{ |
|
|
tb &= 0xc0; |
|
|
if (tb != 0 && tb != 0xc0) return PCRE_ERROR_BADUTF8_OFFSET; |
|
|
} |
|
| 2972 |
} |
} |
| 2973 |
} |
} |
| 2974 |
#endif |
#endif |