mupdf: update to 1.10a.
This commit is contained in:
parent
84b7c220b8
commit
1140232e68
@ -1,6 +1,6 @@
|
||||
--- source/fitz/load-jpx.c
|
||||
--- source/fitz/load-jpx.c.orig
|
||||
+++ source/fitz/load-jpx.c
|
||||
@@ -3,12 +3,17 @@
|
||||
@@ -484,12 +484,17 @@
|
||||
/* Without the definition of OPJ_STATIC, compilation fails on windows
|
||||
* due to the use of __stdcall. We believe it is required on some
|
||||
* linux toolchains too. */
|
||||
@ -17,21 +17,13 @@
|
||||
-#include <openjpeg.h>
|
||||
+#include <openjpeg-2.1/openjpeg.h>
|
||||
|
||||
static void fz_opj_error_callback(const char *msg, void *client_data)
|
||||
{
|
||||
@@ -117,7 +122,7 @@ fz_load_jpx(fz_context *ctx, unsigned ch
|
||||
opj_stream_set_read_function(stream, fz_opj_stream_read);
|
||||
opj_stream_set_skip_function(stream, fz_opj_stream_skip);
|
||||
opj_stream_set_seek_function(stream, fz_opj_stream_seek);
|
||||
- opj_stream_set_user_data(stream, &sb);
|
||||
+ opj_stream_set_user_data(stream, &sb, NULL);
|
||||
/* Set the length to avoid an assert */
|
||||
opj_stream_set_user_data_length(stream, size);
|
||||
|
||||
@@ -247,3 +252,6 @@ fz_load_jpx(fz_context *ctx, unsigned ch
|
||||
|
||||
return img;
|
||||
/* OpenJPEG does not provide a safe mechanism to intercept
|
||||
* allocations. In the latest version all allocations go
|
||||
@@ -971,4 +976,7 @@
|
||||
fz_drop_pixmap(ctx, img);
|
||||
}
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+#endif
|
||||
#endif /* HAVE_LURATECH */
|
||||
|
@ -1,36 +0,0 @@
|
||||
From fa1936405b6a84e5c9bb440912c23d532772f958 Mon Sep 17 00:00:00 2001
|
||||
From: Robin Watts <robin.watts@artifex.com>
|
||||
Date: Thu, 21 Jul 2016 15:39:11 +0100
|
||||
Subject: [PATCH] Bug 696941: Fix use after free.
|
||||
|
||||
The file is HORRIBLY corrupt, and triggers Sophos to think it's
|
||||
PDF malware (which it isn't). It does however trigger a use
|
||||
after free, worked around here.
|
||||
---
|
||||
source/pdf/pdf-xref.c | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
|
||||
index 576c315..3222599 100644
|
||||
--- source/pdf/pdf-xref.c
|
||||
+++ source/pdf/pdf-xref.c
|
||||
@@ -1184,8 +1184,14 @@ pdf_load_xref(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf)
|
||||
fz_throw(ctx, FZ_ERROR_GENERIC, "object offset out of range: %d (%d 0 R)", (int)entry->ofs, i);
|
||||
}
|
||||
if (entry->type == 'o')
|
||||
- if (entry->ofs <= 0 || entry->ofs >= xref_len || pdf_get_xref_entry(ctx, doc, entry->ofs)->type != 'n')
|
||||
- fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)entry->ofs, i);
|
||||
+ {
|
||||
+ /* Read this into a local variable here, because pdf_get_xref_entry
|
||||
+ * may solidify the xref, hence invalidating "entry", meaning we
|
||||
+ * need a stashed value for the throw. */
|
||||
+ fz_off_t ofs = entry->ofs;
|
||||
+ if (ofs <= 0 || ofs >= xref_len || pdf_get_xref_entry(ctx, doc, ofs)->type != 'n')
|
||||
+ fz_throw(ctx, FZ_ERROR_GENERIC, "invalid reference to an objstm that does not exist: %d (%d 0 R)", (int)ofs, i);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.9.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Template file for 'mupdf'
|
||||
pkgname=mupdf
|
||||
version=1.9a
|
||||
revision=4
|
||||
version=1.10a
|
||||
revision=1
|
||||
wrksrc="${pkgname}-${version}-source"
|
||||
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
|
||||
libjpeg-turbo-devel jbig2dec-devel libXext-devel libXcursor-devel
|
||||
@ -14,7 +14,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="GPL-3"
|
||||
homepage="http://mupdf.com"
|
||||
distfiles="http://mupdf.com/downloads/mupdf-${version}-source.tar.gz"
|
||||
checksum=8015c55f4e6dd892d3c50db4f395c1e46660a10b460e2ecd180a497f55bbc4cc
|
||||
checksum=aacc1f36b9180f562022ef1ab3439b009369d944364f3cff8a2a898834e3a836
|
||||
|
||||
pre_configure() {
|
||||
rm -rf thirdparty/{curl,freetype,harfbuzz,jpeg,zlib,jbig2dec,openjpeg}
|
||||
@ -60,8 +60,9 @@ mupdf-devel_package() {
|
||||
mupdf-tools_package() {
|
||||
short_desc+=" - tools"
|
||||
pkg_install() {
|
||||
vmove usr/bin/mutool
|
||||
vmove usr/bin/mujstest
|
||||
vmove usr/bin/muraster
|
||||
vmove usr/bin/mutool
|
||||
vmove usr/share/man/man1/mutool.1
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user