The libsvgtiny test suite exposes two segfaults in libdom's libxml2
parser. The first I'm somewhat confident in: linking dom/xml nodes
can fail (or never happen), and if we encounter an unlinked node,
something is wrong. Reasonable enough.
The second was easy to fix, but I'm not as sure that the fix is
correct. There's a branch where we jump to parent->children if we
can't find an earlier element node, and in at least one case, there
are no such children. Should there be? Adding a NULL check avoids a
segfault, but maybe we should notice the problem sooner.
Michael Orlitzky (2):
bindings/xml/libxml_xmlparser.c: fix segfault due to unlinked parent
bindings/xml/libxml_xmlparser.c: fix segfault on malformed document
bindings/xml/libxml_xmlparser.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
--
2.41.0
_______________________________________________
netsurf-dev mailing list -- netsurf-dev@netsurf-browser.org
To unsubscribe send an email to netsurf-dev-leave@netsurf-browser.org
No comments:
Post a Comment