Skip to content

Fix memory leak in xmlSchemaValidateStream

Zhipeng Xie requested to merge haoren3696/libxml2:master into master

When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun alloc a new schema for ctxt->schema and set vctxt->xsiAssemble to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize vctxt->xsiAssemble to 0 again which cause the alloced schema can not be freed anymore.

Found with libFuzzer.

Signed-off-by: Zhipeng Xie xiezhipeng1@huawei.com

Merge request reports