commit: 6e7bb684c34f9fcc3a60ab0ea9435df2cd302614 Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Sat Feb 4 13:50:26 2017 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sat Feb 4 13:52:41 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e7bb684
app-doc/doxygen: Avoid dereferencing NULL pointer Gentoo-bug: 607160 * Thank you to Jiri Netolicky for finding the upstream issue and the commit that fixed it. Package-Manager: Portage-2.3.3, Repoman-2.3.1 ...ygen-1.8.13.ebuild => doxygen-1.8.13-r1.ebuild} | 10 +++++---- .../files/doxygen-1.8.13-NULL-dereference.patch | 24 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/app-doc/doxygen/doxygen-1.8.13.ebuild b/app-doc/doxygen/doxygen-1.8.13-r1.ebuild similarity index 97% rename from app-doc/doxygen/doxygen-1.8.13.ebuild rename to app-doc/doxygen/doxygen-1.8.13-r1.ebuild index ce44a9d..8b07058 100644 --- a/app-doc/doxygen/doxygen-1.8.13.ebuild +++ b/app-doc/doxygen/doxygen-1.8.13-r1.ebuild @@ -55,6 +55,7 @@ RESTRICT="test" PATCHES=( "${FILESDIR}/${PN}-1.8.9.1-empty-line-sigsegv.patch" #454348 "${FILESDIR}/${PN}-1.8.12-link_with_pthread.patch" + "${FILESDIR}/${PN}-1.8.13-NULL-dereference.patch" ) DOCS=( LANGUAGE.HOWTO README.md ) @@ -64,7 +65,7 @@ pkg_setup() { } src_prepare() { - default + cmake-utils_src_prepare # Ensure we link to -liconv if use elibc_FreeBSD && has_version dev-libs/libiconv || use elibc_uclibc; then @@ -82,12 +83,13 @@ src_prepare() { doc/maintainers.txt || die if is-flagq "-O3" ; then - echo + ewarn ewarn "Compiling with -O3 is known to produce incorrectly" ewarn "optimized code which breaks doxygen." - echo + ewarn + elog elog "Continuing with -O2 instead ..." - echo + elog replace-flags "-O3" "-O2" fi } diff --git a/app-doc/doxygen/files/doxygen-1.8.13-NULL-dereference.patch b/app-doc/doxygen/files/doxygen-1.8.13-NULL-dereference.patch new file mode 100644 index 00000000..8d72e8f --- /dev/null +++ b/app-doc/doxygen/files/doxygen-1.8.13-NULL-dereference.patch @@ -0,0 +1,24 @@ +From 0f02761a158a5e9ddbd5801682482af8986dbc35 Mon Sep 17 00:00:00 2001 +From: albert-github <albert.te...@gmail.com> +Date: Wed, 4 Jan 2017 12:24:55 +0100 +Subject: [PATCH] Bug 776791 - [1.8.13 Regression] Segfault building the + breathe docs + +Protected against NULL pointer of variable al +--- + src/xmlgen.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp +index fe95c7a..70e198a 100644 +--- a/src/xmlgen.cpp ++++ b/src/xmlgen.cpp +@@ -620,7 +620,7 @@ static void generateXMLForMember(MemberDef *md,FTextStream &ti,FTextStream &t,De + if (md->isInline()) t << "yes"; else t << "no"; + t << "\""; + +- if (al->refQualifier!=RefQualifierNone) ++ if (al!=0 && al->refQualifier!=RefQualifierNone) + { + t << " refqual=\""; + if (al->refQualifier==RefQualifierLValue) t << "lvalue"; else t << "rvalue";