summaryrefslogtreecommitdiff
path: root/pcre_newline.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-08-06 09:32:14 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-08-06 09:32:14 +0000
commitc686e88e16cd4dfec241981367ab8c35c9a148f6 (patch)
tree557d839e35a434ae879522b770205d68289f6c32 /pcre_newline.c
parentd755a987ab20e1ef57b78ca053ef41ce4e502e42 (diff)
downloadpcre-c686e88e16cd4dfec241981367ab8c35c9a148f6.tar.gz
Fix backtrack past start of subject bugs caused by the use of \X, \p, or \P in
non-UTF-8 mode and the presence of top-bit-set characters. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@207 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_newline.c')
-rw-r--r--pcre_newline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pcre_newline.c b/pcre_newline.c
index a1666ea..9a8998c 100644
--- a/pcre_newline.c
+++ b/pcre_newline.c
@@ -128,12 +128,16 @@ _pcre_was_newline(const uschar *ptr, int type, const uschar *startptr,
{
int c;
ptr--;
+#ifdef SUPPORT_UTF8
if (utf8)
{
BACKCHAR(ptr);
GETCHAR(c, ptr);
}
else c = *ptr;
+#else /* no UTF-8 support */
+c = *ptr;
+#endif /* SUPPORT_UTF8 */
if (type == NLTYPE_ANYCRLF) switch(c)
{