mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-27 18:50:07 +03:00
malloc-fail: Fix error code in htmlParseChunk
Found with libFuzzer, see #344.
This commit is contained in:
parent
15b0ed0815
commit
53d1cc98cf
@ -6280,9 +6280,8 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
|
||||
res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
|
||||
xmlBufSetInputBaseCur(ctxt->input->buf->buffer, ctxt->input, base, cur);
|
||||
if (res < 0) {
|
||||
ctxt->errNo = XML_PARSER_EOF;
|
||||
ctxt->disableSAX = 1;
|
||||
return (XML_PARSER_EOF);
|
||||
htmlErrMemory(ctxt, NULL);
|
||||
return (ctxt->errNo);
|
||||
}
|
||||
#ifdef DEBUG_PUSH
|
||||
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user