From 969d3363fe2ab8c983bb630a7f61d5381a724eff Mon Sep 17 00:00:00 2001 From: Karl Waclawek Date: Tue, 27 Aug 2002 00:28:48 +0000 Subject: [PATCH] Fix for bug #600479: error decoding UTF-8 triplet --- expat/lib/xmltok.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c index 7fc00e89..0e9a18a2 100644 --- a/expat/lib/xmltok.c +++ b/expat/lib/xmltok.c @@ -84,7 +84,11 @@ #define UTF8_INVALID3(p) \ (((p)[2] & 0x80) == 0 \ || \ - ((*p) == 0xEF ? (p)[2] > 0xBD : ((p)[2] & 0xC0) == 0xC0) \ + ((*p) == 0xEF && (p)[1] == 0xBF \ + ? \ + (p)[2] > 0xBD \ + : \ + ((p)[2] & 0xC0) == 0xC0) \ || \ ((*p) == 0xE0 \ ? \