app-text/libwpd: Security revbump for CVE-2017-14226

Package-Manager: Portage-2.3.6, Repoman-2.3.1
This commit is contained in:
Andreas Sturmlechner
2017-09-11 19:37:32 +02:00
parent 370acb70de
commit ba7ccf31e3
2 changed files with 103 additions and 0 deletions
@@ -0,0 +1,50 @@
Gentoo-bug: 630682 (CVE-2017-14226)
Change-Id: I0d8d6887fa360c05d5f9e2a070410c77926b9ce1
Reviewed-on: https://gerrit.libreoffice.org/42054
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
--- a/src/lib/WP5StylesListener.cpp
+++ b/src/lib/WP5StylesListener.cpp
@@ -85,8 +85,9 @@
m_currentPage = WPXPageSpan(m_pageList.back(), 0.0, 0.0);
m_currentPage.setPageSpan(1);
- for (std::vector<WPXHeaderFooter>::const_iterator HFiter = (m_nextPage.getHeaderFooterList()).begin();
- HFiter != (m_nextPage.getHeaderFooterList()).end(); ++HFiter)
+ std::vector<WPXHeaderFooter> headerFooterList = m_nextPage.getHeaderFooterList();
+ for (std::vector<WPXHeaderFooter>::const_iterator HFiter = headerFooterList.begin();
+ HFiter != headerFooterList.end(); ++HFiter)
{
if ((*HFiter).getOccurrence() != NEVER)
{
--- a/src/lib/WP42StylesListener.cpp
+++ b/src/lib/WP42StylesListener.cpp
@@ -84,8 +84,9 @@
m_currentPage = WPXPageSpan(m_pageList.back(), 0.0, 0.0);
m_currentPage.setPageSpan(1);
- for (std::vector<WPXHeaderFooter>::const_iterator HFiter = (m_nextPage.getHeaderFooterList()).begin();
- HFiter != (m_nextPage.getHeaderFooterList()).end(); ++HFiter)
+ std::vector<WPXHeaderFooter> headerFooterList = m_nextPage.getHeaderFooterList();
+ for (std::vector<WPXHeaderFooter>::const_iterator HFiter = headerFooterList.begin();
+ HFiter != headerFooterList.end(); ++HFiter)
{
if ((*HFiter).getOccurrence() != NEVER)
{
--- a/src/lib/WP1StylesListener.cpp
+++ b/src/lib/WP1StylesListener.cpp
@@ -83,8 +83,9 @@
m_currentPage = WPXPageSpan(m_pageList.back(), 0.0, 0.0);
m_currentPage.setPageSpan(1);
- for (std::vector<WPXHeaderFooter>::const_iterator HFiter = (m_nextPage.getHeaderFooterList()).begin();
- HFiter != (m_nextPage.getHeaderFooterList()).end(); ++HFiter)
+ std::vector<WPXHeaderFooter> headerFooterList = m_nextPage.getHeaderFooterList();
+ for (std::vector<WPXHeaderFooter>::const_iterator HFiter = headerFooterList.begin();
+ HFiter != headerFooterList.end(); ++HFiter)
{
if ((*HFiter).getOccurrence() != NEVER)
{
+53
View File
@@ -0,0 +1,53 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit alternatives
DESCRIPTION="WordPerfect Document import/export library"
HOMEPAGE="http://libwpd.sf.net"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
LICENSE="|| ( LGPL-2.1 MPL-2.0 )"
SLOT="0.10"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~x86 ~x86-fbsd"
IUSE="doc +tools"
RDEPEND="dev-libs/librevenge"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? ( app-doc/doxygen )
"
PATCHES=( "${FILESDIR}/${P}-CVE-2017-14226.patch" )
src_configure() {
econf \
--disable-static \
--disable-werror \
$(use_with doc docs) \
$(use_enable tools) \
--program-suffix=-${SLOT}
}
src_install() {
default
find "${D}" -name '*.la' -delete || die
}
pkg_postinst() {
if use tools; then
alternatives_auto_makesym /usr/bin/wpd2html "/usr/bin/wpd2html-[0-9].[0-9][0-9]"
alternatives_auto_makesym /usr/bin/wpd2raw "/usr/bin/wpd2raw-[0-9].[0-9][0-9]"
alternatives_auto_makesym /usr/bin/wpd2text "/usr/bin/wpd2text-[0-9].[0-9][0-9]"
fi
}
pkg_postrm() {
if use tools; then
alternatives_auto_makesym /usr/bin/wpd2html "/usr/bin/wpd2html-[0-9].[0-9][0-9]"
alternatives_auto_makesym /usr/bin/wpd2raw "/usr/bin/wpd2raw-[0-9].[0-9][0-9]"
alternatives_auto_makesym /usr/bin/wpd2text "/usr/bin/wpd2text-[0-9].[0-9][0-9]"
fi
}