blob: bb40f0af6c0440283aa3bf1c622dc5e92e01abc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
diff -Naur expat-2.0.1.orig/lib/xmlparse.c expat-2.0.1/lib/xmlparse.c
--- expat-2.0.1.orig/lib/xmlparse.c 2007-05-07 23:25:35.000000000 -0300
+++ expat-2.0.1/lib/xmlparse.c 2009-08-26 16:50:55.000000000 -0300
@@ -2563,6 +2563,8 @@
(int)(dataPtr - (ICHAR *)dataBuf));
if (s == next)
break;
+ if (ps_parsing == XML_FINISHED || ps_parsing == XML_SUSPENDED)
+ break;
*eventPP = s;
}
}
diff -Naur expat-2.0.1.orig/lib/xmltok_impl.c expat-2.0.1/lib/xmltok_impl.c
--- expat-2.0.1.orig/lib/xmltok_impl.c 2006-11-26 15:34:46.000000000 -0200
+++ expat-2.0.1/lib/xmltok_impl.c 2009-08-26 16:50:57.000000000 -0300
@@ -1744,7 +1744,7 @@
const char *end,
POSITION *pos)
{
- while (ptr != end) {
+ while (ptr < end) {
switch (BYTE_TYPE(enc, ptr)) {
#define LEAD_CASE(n) \
case BT_LEAD ## n: \
|