diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-03-18 14:44:28 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2023-03-18 16:51:40 +0100 |
commit | 067986fa674f0811614dab4c4572f5f7ff483400 (patch) | |
tree | 2c3ff458bd9c9a3b8e43636ce42a1717dd1cdff4 /HTMLparser.c | |
parent | 9ef2a9abf357f747c2fb03841b7f479cc0dfd3ef (diff) | |
download | libxml2-067986fa674f0811614dab4c4572f5f7ff483400.tar.gz |
parser: Fix regressions from previous commits
- Fix memory leak in xmlParseNmtoken.
- Fix buffer overread after htmlParseCharDataInternal.
Diffstat (limited to 'HTMLparser.c')
-rw-r--r-- | HTMLparser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/HTMLparser.c b/HTMLparser.c index 0e79dffd..ca3ebc41 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -3203,6 +3203,7 @@ htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) { } else { COPY_BUF(l,buf,nbchar,cur); } + NEXTL(l); if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) { buf[nbchar] = 0; @@ -3228,7 +3229,6 @@ htmlParseCharDataInternal(htmlParserCtxtPtr ctxt, int readahead) { nbchar = 0; SHRINK; } - NEXTL(l); cur = CUR_CHAR(l); } if (ctxt->instate == XML_PARSER_EOF) |