diff options
author | Mike Hommey <glandium@debian.org> | 2009-09-25 22:17:31 +0200 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2009-09-25 22:17:31 +0200 |
commit | 67a17fecb5b5fe2058af6405bc9601875f3e75a1 (patch) | |
tree | 73a7ed49173098b5c59eeb8a33747d3b803d2309 /parser.c | |
parent | c3e4f3c26035bc93a69e5aa2ad435809e8be8a4e (diff) | |
download | libxml2-67a17fecb5b5fe2058af6405bc9601875f3e75a1.tar.gz |
Import upstream version 2.7.5upstream/2.7.5.dfsg
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -10130,8 +10130,12 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { /* * Check for the XMLDecl in the Prolog. * do not GROW here to avoid the detected encoder to decode more - * than just the first line + * than just the first line, unless the amount of data is really + * too small to hold "<?xml version="1.0" encoding="foo" */ + if ((ctxt->input->end - ctxt->input->cur) < 35) { + GROW; + } if ((CMP5(CUR_PTR, '<', '?', 'x', 'm', 'l')) && (IS_BLANK_CH(NXT(5)))) { /* |