[libxml2] parser.c: xmlParseCharData peek behavior fixed wrt newlines
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] parser.c: xmlParseCharData peek behavior fixed wrt newlines
- Date: Sun, 25 Oct 2020 19:57:43 +0000 (UTC)
commit c0c26ff201cc35062ae3f219c0ae60bf05a2ff0d
Author: Mike Dalessio <mike dalessio gmail com>
Date: Sun Oct 11 16:33:07 2020 -0400
parser.c: xmlParseCharData peek behavior fixed wrt newlines
Previously, xmlParseCharData and xmlParseComment would consider 0xA to
be unhandleable when seen as the first byte of an input chunk, and
fall back to xmlParseCharDataComplex and xmlParseCommentComplex, which
have different memory and performance characteristics.
Fixes GNOME/libxml2#192
parser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/parser.c b/parser.c
index f779eb6a1..85494df4e 100644
--- a/parser.c
+++ b/parser.c
@@ -4506,7 +4506,7 @@ get_more:
if (ctxt->instate == XML_PARSER_EOF)
return;
in = ctxt->input->cur;
- } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09));
+ } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09) || (*in == 0x0a));
nbchar = 0;
}
ctxt->input->line = line;
@@ -4987,7 +4987,7 @@ get_more:
ctxt->input->col++;
goto get_more;
}
- } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09));
+ } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09) || (*in == 0x0a));
xmlParseCommentComplex(ctxt, buf, len, size);
ctxt->instate = state;
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]