libextractor: fix build with gcc8

This commit is contained in:
Franz Pletz 2019-01-11 06:47:24 +01:00
parent b5fa934872
commit 64d3bf6338
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4
2 changed files with 18 additions and 0 deletions

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
sha256 = "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh";
};
patches = [ ./fix-gcc8-build.patch ];
preConfigure =
'' echo "patching installation directory in \`extractor.c'..."
sed -i "src/main/extractor.c" \

View File

@ -0,0 +1,16 @@
diff --git a/src/plugins/ole2_extractor.c b/src/plugins/ole2_extractor.c
index 072ffc5..a105840 100644
--- a/src/plugins/ole2_extractor.c
+++ b/src/plugins/ole2_extractor.c
@@ -345,9 +345,8 @@ process_star_office (GsfInput *src,
gsf_input_read (src, size, (unsigned char*) buf);
if ( (buf[0] != 0x0F) ||
(buf[1] != 0x0) ||
- (0 != strncmp (&buf[2],
- "SfxDocumentInfo",
- strlen ("SfxDocumentInfo"))) ||
+ (0 != strcmp (&buf[2],
+ "SfxDocumentInfo")) ||
(buf[0x11] != 0x0B) ||
(buf[0x13] != 0x00) || /* pw protected! */
(buf[0x12] != 0x00) )