[Expat-checkins] expat/lib xmltok.c,1.21,1.22
kwaclaw@users.sourceforge.net
kwaclaw@users.sourceforge.net
Sun Jul 28 18:06:02 2002
Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv1580
Modified Files:
xmltok.c
Log Message:
Applied patch for bug #434664: utf8_toutf16 infinite loop.
Index: xmltok.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmltok.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- xmltok.c 25 Jul 2002 14:51:19 -0000 1.21
+++ xmltok.c 29 Jul 2002 01:05:11 -0000 1.22
@@ -343,7 +343,7 @@
{
unsigned long n;
if (to + 1 == toLim)
- break;
+ goto after;
n = ((from[0] & 0x7) << 18) | ((from[1] & 0x3f) << 12)
| ((from[2] & 0x3f) << 6) | (from[3] & 0x3f);
n -= 0x10000;
@@ -358,6 +358,7 @@
break;
}
}
+after:
*fromP = from;
*toP = to;
}