expat/lib xmltok.c,1.22,1.23

"Karl Waclawek" <[email protected]>
Newsgroups gmane.text.xml.expat.cvs
Message-ID <[email protected]>
Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv17171

Modified Files:
	xmltok.c 
Log Message:
Fix for bug #600479: error decoding UTF-8 triplet

Index: xmltok.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmltok.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- xmltok.c	29 Jul 2002 01:05:11 -0000	1.22
+++ xmltok.c	27 Aug 2002 00:28:48 -0000	1.23
@@ -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 \
     ? \
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.