commit:     6a2b56c0a796fdb00151ba69fb2c617715307905
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 20 20:46:33 2018 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Oct 20 20:46:43 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a2b56c0

media-libs/libextractor: Fix gcc-8 segfault (#668044 by Toralf Förster)

Closes: https://bugs.gentoo.org/668044
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 .../files/libextractor-1.7-segfault.patch             | 19 +++++++++++++++++++
 media-libs/libextractor/libextractor-1.7.ebuild       |  5 +++++
 2 files changed, 24 insertions(+)

diff --git a/media-libs/libextractor/files/libextractor-1.7-segfault.patch 
b/media-libs/libextractor/files/libextractor-1.7-segfault.patch
new file mode 100644
index 00000000000..8b44238bf07
--- /dev/null
+++ b/media-libs/libextractor/files/libextractor-1.7-segfault.patch
@@ -0,0 +1,19 @@
+*** a/src/plugins/ole2_extractor.c~    2018-06-20 15:02:55.000000000 -0500
+--- b/src/plugins/ole2_extractor.c     2018-07-18 15:21:13.411495048 -0500
+***************
+*** 336,342 ****
+        (buf[1] != 0x0) ||
+        (0 != strncmp (&buf[2],
+                       "SfxDocumentInfo",
+!                      strlen ("SfxDocumentInfo"))) ||
+        (buf[0x11] != 0x0B) ||
+        (buf[0x13] != 0x00) || /* pw protected! */
+        (buf[0x12] != 0x00) )
+--- 336,342 ----
+        (buf[1] != 0x0) ||
+        (0 != strncmp (&buf[2],
+                       "SfxDocumentInfo",
+!                      strlen ("SfxDocumentInfo") + 1)) ||
+        (buf[0x11] != 0x0B) ||
+        (buf[0x13] != 0x00) || /* pw protected! */
+        (buf[0x12] != 0x00) )

diff --git a/media-libs/libextractor/libextractor-1.7.ebuild 
b/media-libs/libextractor/libextractor-1.7.ebuild
index 74dc8b4f10b..76dde5f2ac4 100644
--- a/media-libs/libextractor/libextractor-1.7.ebuild
+++ b/media-libs/libextractor/libextractor-1.7.ebuild
@@ -58,6 +58,11 @@ RDEPEND="${DEPEND}
        !sci-biology/glimmer
 "
 
+PATCHES=(
+       # From Fedora
+       "${FILESDIR}"/${P}-segfault.patch
+)
+
 src_prepare() {
        default
 

Reply via email to