diff options
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)))) { /* |