mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
Schematron: Fix null pointer dereference leading to DoS
(CVE-2025-49795) Fixes #932
This commit is contained in:
committed by
Nick Wellnhofer
parent
069bcda17d
commit
499bcb78ab
1
result/schematron/zvon16_0.err
Normal file
1
result/schematron/zvon16_0.err
Normal file
@@ -0,0 +1 @@
|
||||
xmlSchematronParse: could not load './test/schematron/zvon16.sct'
|
||||
@@ -1453,6 +1453,8 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
|
||||
select = xmlGetNoNsProp(child, BAD_CAST "select");
|
||||
comp = xmlXPathCtxtCompile(ctxt->xctxt, select);
|
||||
eval = xmlXPathCompiledEval(comp, ctxt->xctxt);
|
||||
if (eval == NULL)
|
||||
return ret;
|
||||
|
||||
switch (eval->type) {
|
||||
case XPATH_NODESET: {
|
||||
|
||||
7
test/schematron/zvon16.sct
Normal file
7
test/schematron/zvon16.sct
Normal file
@@ -0,0 +1,7 @@
|
||||
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"
|
||||
<sch:pattern id="TestPattern">
|
||||
<sch:rule context="book">
|
||||
<sch:report test="not(@available)">Book <sch:value-of select="falae()"/> test</sch:report>
|
||||
</sch:rule>
|
||||
</sch:pattern>
|
||||
</sch:schema>
|
||||
5
test/schematron/zvon16_0.xml
Normal file
5
test/schematron/zvon16_0.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<library>
|
||||
<book title="Test Book" id="bk101">
|
||||
<author>Test Author</author>
|
||||
</book>
|
||||
</library>
|
||||
Reference in New Issue
Block a user