libxml2: null pointer dereference introduced in version 2.9.9
I discovered bug when trying to build crystal 0.27.2 on edge (and I
think ncopa had issue when he tried to build snapshot) and even stable
3.9 when the libxml2 upgraded to 2.9.9
I discussed this with crystal developers and one of them post issue/bug
to libxml2 and they fixed it.
Mail (below) from libxml2 developer explains everything:
———————————————————————————————————
From 2c8dc7158a3b7b028454abcb6f162c4da28ed80b Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Mon, 25 Feb 2019 12:00:50 +0100
Subject: [PATCH] Fix null pointer dereference in
xmlTextReaderReadOuterXml
Fix a regression caused by commit 39fbfb4f. If
xmlTextReaderReadOuterXml
is called on a pristine xmlReader, the current node is NULL and must
not
be dereferenced. Move the call to xmlTextReaderExpand to the start of
the function to make sure that we have a valid node.
————————— end of mail ——————————————————————
I prepared patch and will send it to close this issue.
(from redmine: issue id 10034, created on 2019-02-25, closed on 2019-03-01)
- Changesets:
- Revision 70b3b188 by Milan P. Stanić on 2019-02-25T13:58:06Z:
main/libxml2: fix null pointer dereference
ref #10034
bump pkgrel
- Revision 36fadf98 by Milan P. Stanić on 2019-02-25T14:30:54Z:
main/libxml2: fix null pointer dereference
fixes #10034
bump pkgrel
(cherry picked from commit 70b3b18877a66cddb26ca51dbae977e677696811)