diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-06-10 17:06:16 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-06-10 18:00:55 +0200 |
commit | fb2f518cc61239a4010612c9307a3fd7d13c996c (patch) | |
tree | 944b64e4416229c03e45b8847a0c1e1f06d09593 /parser.c | |
parent | 4ba8cc856bd2d11f3c500a27bca7b56d826a19b6 (diff) | |
download | libxml2-fb2f518cc61239a4010612c9307a3fd7d13c996c.tar.gz |
Fix potential infinite loop in xmlStringLenDecodeEntities
Make sure that xmlParseStringPEReference advances the "str" pointer
even if the parser was stopped. Otherwise xmlStringLenDecodeEntities
can loop infinitely.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -8327,6 +8327,7 @@ xmlParseStringPEReference(xmlParserCtxtPtr ctxt, const xmlChar **str) { entity = ctxt->sax->getParameterEntity(ctxt->userData, name); if (ctxt->instate == XML_PARSER_EOF) { xmlFree(name); + *str = ptr; return(NULL); } if (entity == NULL) { |