Some fixes worth backporting made after libxml2 2.9.9 release: (https://gitlab.gnome.org/GNOME/libxml2/commits/master) https://gitlab.gnome.org/GNOME/libxml2/commit/efe8c093c408311ddbb6995c92a9e077386a57bf commit efe8c093c408311ddbb6995c92a9e077386a57bf Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Sat Nov 24 11:39:32 2018 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Sun Jan 6 14:05:36 2019 +0100 Memory leak in xmlFreeID (xmlreader.c) Fix a memory leak in xmlReader's private copy of xmlFreeID. Only affects validation with NODICT. Found by OSS-Fuzz. https://gitlab.gnome.org/GNOME/libxml2/commit/57a3af56f4ee4418948dfbff8c02ae1d79de565e commit 57a3af56f4ee4418948dfbff8c02ae1d79de565e Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Sat Nov 24 12:14:55 2018 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Sun Jan 6 14:05:36 2019 +0100 Memory leak in xmlFreeTextReader In error cases, there might still be elements in the vstate table. Since vstateVPop in valid.c is private, we have to pop the elements with xmlValidatePopElement. This inspects nodes of the document, so the reader doc must be freed after the clearing the vstate table. Found by OSS-Fuzz. https://gitlab.gnome.org/GNOME/libxml2/commit/157cd3aed70845564e2ecc9754f3f826a3c9c65e commit 157cd3aed70845564e2ecc9754f3f826a3c9c65e Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Sat Nov 24 15:46:00 2018 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Sun Jan 6 14:05:36 2019 +0100 Fix NULL pointer deref in xmlTextReaderValidateEntity Found by OSS-Fuzz. https://gitlab.gnome.org/GNOME/libxml2/commit/8919885ff9363cecd4260827dd89514c33f3dc30 commit 8919885ff9363cecd4260827dd89514c33f3dc30 Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Tue Jan 1 16:30:38 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Sun Jan 6 14:24:59 2019 +0100 Fix -Wformat-truncation warnings (GCC 8) https://gitlab.gnome.org/GNOME/libxml2/commit/19f0950d30208c4a37fe90b25ed82c5bdc44287a commit 19f0950d30208c4a37fe90b25ed82c5bdc44287a Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Tue Jan 1 16:38:42 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Sun Jan 6 14:25:12 2019 +0100 Fix -Wcast-function-type warnings (GCC 8) Use xmlGenericError instead of fprintf as error handler. It also prints to stderr by default. https://gitlab.gnome.org/GNOME/libxml2/commit/dcae579eca047affba1f5daef98b11b9593388db commit dcae579eca047affba1f5daef98b11b9593388db Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Tue Jan 1 16:48:40 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Sun Jan 6 14:25:18 2019 +0100 Remove unneeded function pointer casts https://gitlab.gnome.org/GNOME/libxml2/commit/26828cb3a1294e09e42064f4769d4b3c0a8623b3 commit 26828cb3a1294e09e42064f4769d4b3c0a8623b3 Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Mon Jan 7 16:52:42 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Mon Jan 7 18:07:00 2019 +0100 Fix commit "Memory leak in xmlFreeID (xmlreader.c)" The recent commit "Memory leak in xmlFreeID (xmlreader.c)" introduced a double-free. https://gitlab.gnome.org/GNOME/libxml2/commit/6b49db2cb235a54b6a3bd91dccf3d98b9cdeaa65 commit 6b49db2cb235a54b6a3bd91dccf3d98b9cdeaa65 Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Mon Jan 7 17:14:21 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Mon Jan 7 18:07:00 2019 +0100 Fix memory leak in xmlSAX2StartElement Introduced by a recent commit. Only happens if max depth is exceeded in SAX1 mode. Found by OSS-Fuzz. https://gitlab.gnome.org/GNOME/libxml2/commit/b48226f78c626a0fdbaed65793f1a6138de8558f commit b48226f78c626a0fdbaed65793f1a6138de8558f Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Mon Jan 7 17:58:32 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Mon Jan 7 18:07:00 2019 +0100 Fix memory leaks in xmlParseStartTag2 error paths Found by OSS-Fuzz. https://gitlab.gnome.org/GNOME/libxml2/commit/2c8dc7158a3b7b028454abcb6f162c4da28ed80b commit 2c8dc7158a3b7b028454abcb6f162c4da28ed80b Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Mon Feb 25 12:00:50 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Mon Feb 25 12:08:48 2019 +0100 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. Fixes #43. https://gitlab.gnome.org/GNOME/libxml2/commit/8161b463f52c365273d110cffa2d980a271f98a8 commit 8161b463f52c365273d110cffa2d980a271f98a8 Author: Nick Wellnhofer <wellnhofer@aevum.de> AuthorDate: Thu Feb 28 12:25:05 2019 +0100 Commit: Nick Wellnhofer <wellnhofer@aevum.de> CommitDate: Thu Feb 28 12:25:05 2019 +0100 Remove debug printf in xmlreader.c Fixes #46.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f33b7a6cb6cb08274e34472cca930620fced3c7 commit 9f33b7a6cb6cb08274e34472cca930620fced3c7 Author: Mart Raudsepp <leio@gentoo.org> AuthorDate: 2019-03-03 20:18:16 +0000 Commit: Mart Raudsepp <leio@gentoo.org> CommitDate: 2019-03-03 20:19:11 +0000 dev-libs/libxml2: revbump for patchset, fix xmlconf for tests Closes: https://bugs.gentoo.org/679046 Closes: https://bugs.gentoo.org/679096 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Mart Raudsepp <leio@gentoo.org> dev-libs/libxml2/Manifest | 1 + dev-libs/libxml2/libxml2-2.9.9-r1.ebuild | 219 +++++++++++++++++++++++++++++++ 2 files changed, 220 insertions(+)