update to mupdf-1.10a

This commit is contained in:
sthen 2016-12-12 10:54:39 +00:00
parent 5b3c1ec86a
commit 0e0da4b1af
22 changed files with 111 additions and 216 deletions

View File

@ -1,14 +1,13 @@
# $OpenBSD: Makefile,v 1.70 2016/11/08 12:05:04 sthen Exp $
# $OpenBSD: Makefile,v 1.71 2016/12/12 10:54:39 sthen Exp $
SHARED_LIBS += mupdf 4.0
SHARED_LIBS += mupdf 5.0
SHARED_LIBS += mupdfthird 0.0
COMMENT = graphic library, pdf parser, viewer and utilities
V = 1.9a
V = 1.10a
DISTNAME = mupdf-$V-source
PKGNAME = mupdf-$V
REVISION = 2
CATEGORIES = textproc x11

View File

@ -1,2 +1,2 @@
SHA256 (mupdf-1.9a-source.tar.gz) = gBXFX05t2JLTxQ2085XB5GZgoQtGDi7NGApJf1W7xMw=
SIZE (mupdf-1.9a-source.tar.gz) = 20493793
SHA256 (mupdf-1.10a-source.tar.gz) = qswfNrkYD1YgIu8as0ObAJNp2UQ2Tzz/iiqJiDTjqDY=
SIZE (mupdf-1.10a-source.tar.gz) = 42264707

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile,v 1.11 2016/10/16 09:16:52 sthen Exp $
--- Makefile.orig Thu Apr 21 12:14:32 2016
+++ Makefile Sun Oct 16 09:57:32 2016
@@ -141,14 +141,17 @@ $(FONT_GEN_URW) : $(FONT_BIN_URW)
$OpenBSD: patch-Makefile,v 1.12 2016/12/12 10:54:39 sthen Exp $
--- Makefile.orig Mon Nov 28 13:34:04 2016
+++ Makefile Mon Dec 12 09:40:54 2016
@@ -152,14 +152,17 @@ $(FONT_GEN_SIL) : $(FONT_BIN_SIL)
# --- Library ---
@ -10,8 +10,8 @@ $OpenBSD: patch-Makefile,v 1.11 2016/10/16 09:16:52 sthen Exp $
+MUPDF_LIB = libmupdf.so.${LIBmupdf_VERSION}
+THIRD_LIB = libmupdfthird.so.${LIBmupdfthird_VERSION}
MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
MUPDF_OBJ := $(FITZ_OBJ) $(FONT_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(SVG_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
THIRD_OBJ := $(FREETYPE_OBJ) $(HARFBUZZ_OBJ) $(JBIG2DEC_OBJ) $(JPEG_OBJ) $(JPEGXR_OBJ) $(LURATECH_OBJ) $(MUJS_OBJ) $(OPENJPEG_OBJ) $(ZLIB_OBJ)
$(MUPDF_LIB) : $(MUPDF_OBJ)
+ $(CC) $(LDFLAGS) --shared -o $@ $^ $(LIBS)
@ -21,7 +21,7 @@ $OpenBSD: patch-Makefile,v 1.11 2016/10/16 09:16:52 sthen Exp $
INSTALL_LIBS := $(MUPDF_LIB) $(THIRD_LIB)
@@ -187,7 +190,7 @@ $(OUT)/platform/x11/curl/%.o : platform/x11/%.c | $(AL
@@ -198,7 +201,7 @@ $(OUT)/platform/x11/curl/%.o : platform/x11/%.c | $(AL
$(CC_CMD) $(X11_CFLAGS) $(CURL_CFLAGS) -DHAVE_CURL
$(OUT)/platform/gl/%.o : platform/gl/%.c | $(ALL_DIR)

View File

@ -1,15 +1,15 @@
$OpenBSD: patch-Makerules,v 1.15 2016/10/16 09:16:52 sthen Exp $
--- Makerules.orig Thu Apr 21 12:14:32 2016
+++ Makerules Sun Oct 16 10:00:26 2016
@@ -9,6 +9,7 @@ HAVE_LIBDL ?= yes
CFLAGS += -Wall
$OpenBSD: patch-Makerules,v 1.16 2016/12/12 10:54:39 sthen Exp $
--- Makerules.orig Mon Nov 28 13:34:04 2016
+++ Makerules Mon Dec 12 09:41:21 2016
@@ -21,6 +21,7 @@ else
LDREMOVEUNREACH = -Wl,--gc-sections
endif
+ifneq "$(OS)" "OpenBSD" # don't override C optimizer flags for ports builds
ifeq "$(build)" "debug"
CFLAGS += -pipe -g -DDEBUG
LDFLAGS += -g
@@ -38,6 +39,7 @@ LIBS += -lprofiler
@@ -55,6 +56,7 @@ LIBS += -lprofiler
else
$(error unknown build setting: '$(build)')
endif
@ -17,27 +17,27 @@ $OpenBSD: patch-Makerules,v 1.15 2016/10/16 09:16:52 sthen Exp $
ifeq "$(largefile)" "yes"
CFLAGS += -DFZ_LARGEFILE
@@ -81,7 +83,7 @@ LD = xcrun ld
@@ -103,7 +105,7 @@ LD = xcrun ld
RANLIB_CMD = xcrun ranlib $@
# Linux uses pkg-config for system libraries.
-else ifeq "$(OS)" "Linux"
+else
HAVE_X11 ?= yes
HAVE_PTHREADS ?= yes
@@ -96,7 +98,7 @@ HAVE_CURL = yes
SYS_CURL_CFLAGS = $(shell pkg-config --cflags libcurl)
SYS_CURL_LIBS = $(shell pkg-config --libs libcurl)
endif
-SYS_CURL_DEPS = -lpthread -lrt
+SYS_CURL_DEPS = -lpthread
SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext)
SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)
@@ -108,6 +110,7 @@ SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype
SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjp2)
SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjp2)
@@ -123,7 +125,7 @@ SYS_CURL_CFLAGS += $(shell pkg-config --cflags openssl
SYS_CURL_DEPS += $(shell pkg-config --libs openssl)
endif
endif
-SYS_CURL_DEPS += -lpthread -lrt
+SYS_CURL_DEPS += -lpthread
ifeq "$(shell pkg-config --exists x11 xext && echo yes)" "yes"
HAVE_X11 = yes
@@ -147,6 +149,7 @@ SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenj
endif
SYS_JBIG2DEC_LIBS = -ljbig2dec
+SYS_JPEG_CFLAGS = -I/usr/local/include
SYS_JPEG_LIBS = -ljpeg

View File

@ -1,15 +1,19 @@
$OpenBSD: patch-Makethird,v 1.3 2016/10/18 09:24:20 sthen Exp $
--- Makethird.orig Thu Apr 21 12:14:32 2016
+++ Makethird Tue Oct 18 10:08:26 2016
@@ -512,9 +512,9 @@ $(GLFW_LIB): $(addprefix $(GLFW_OUT)/, $(GLFW_SRC:%.c=
$(GLFW_OUT):
$(MKDIR_CMD)
$OpenBSD: patch-Makethird,v 1.4 2016/12/12 10:54:39 sthen Exp $
--- Makethird.orig Mon Nov 28 13:34:04 2016
+++ Makethird Mon Dec 12 09:42:29 2016
@@ -665,13 +665,13 @@ GLFW_SRC := \
xkb_unicode.c
$(GLFW_OUT)/%.o: $(GLFW_DIR)/src/%.c | $(GLFW_OUT)
- $(CC_CMD) -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_USE_OPENGL -D_GLFW_HAS_GLXGETPROCADDRESS
+ $(CC_CMD) -I/usr/X11R6/include -D_GLFW_X11 -D_GLFW_GLX -D_GLFW_USE_OPENGL -D_GLFW_HAS_GLXGETPROCADDRESS
$(GLFW_LIB): $(addprefix $(GLFW_OUT)/, $(GLFW_SRC:%.c=%.o))
GLFW_LIBS := -lGL -lX11 -lXcursor -lXrandr -lXinerama -lpthread
endif
-GLFW_CFLAGS := -I$(GLFW_DIR)/include
+GLFW_CFLAGS := -I/usr/X11R6/include -I$(GLFW_DIR)/include
GLFW_LIBS := -lGL -lX11 -lXcursor -lXrandr -lXinerama -lpthread
$(GLFW_OUT):
$(MKDIR_CMD)
HAVE_GLFW := yes

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-platform_gl_gl-main_c,v 1.2 2016/10/16 09:16:52 sthen Exp $
$OpenBSD: patch-platform_gl_gl-main_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to mupdf-gl:
- drm : opengl stuff
- proc exec : opening a external browser on uri link
--- platform/gl/gl-main.c.orig Thu Apr 21 12:14:32 2016
+++ platform/gl/gl-main.c Sun Oct 16 09:47:50 2016
@@ -1365,6 +1365,12 @@ int main(int argc, char **argv)
--- platform/gl/gl-main.c.orig Mon Nov 28 13:34:04 2016
+++ platform/gl/gl-main.c Mon Dec 12 09:39:02 2016
@@ -1414,6 +1414,12 @@ int main(int argc, char **argv)
glfwMakeContextCurrent(window);

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-platform_x11_jstest_main_c,v 1.1 2016/01/19 05:20:51 semarie Exp $
$OpenBSD: patch-platform_x11_jstest_main_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to mujstest
- rpath : OPEN command
- wpath cpath : SCREENSHOT command
--- platform/x11/jstest_main.c.orig Sun Jan 17 13:50:58 2016
+++ platform/x11/jstest_main.c Sun Jan 17 13:52:29 2016
@@ -310,6 +310,12 @@ main(int argc, char *argv[])
--- platform/x11/jstest_main.c.orig Mon Nov 28 13:34:04 2016
+++ platform/x11/jstest_main.c Mon Dec 12 09:39:02 2016
@@ -309,6 +309,12 @@ main(int argc, char *argv[])
if (fz_optind == argc)
usage();

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-platform_x11_pdfapp_c,v 1.6 2016/10/16 09:16:52 sthen Exp $
--- platform/x11/pdfapp.c.orig Thu Apr 21 12:14:32 2016
+++ platform/x11/pdfapp.c Sun Oct 16 09:47:50 2016
$OpenBSD: patch-platform_x11_pdfapp_c,v 1.7 2016/12/12 10:54:39 sthen Exp $
--- platform/x11/pdfapp.c.orig Mon Nov 28 13:34:04 2016
+++ platform/x11/pdfapp.c Mon Dec 12 09:39:02 2016
@@ -26,8 +26,18 @@ enum
static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repaint, int transition, int searching);
static void pdfapp_updatepage(pdfapp_t *app);
@ -21,18 +21,9 @@ $OpenBSD: patch-platform_x11_pdfapp_c,v 1.6 2016/10/16 09:16:52 sthen Exp $
static int zoom_in(int oldres)
{
int i;
@@ -288,7 +298,7 @@ void pdfapp_open_progressive(pdfapp_t *app, char *file
}
#ifdef HAVE_CURL
- if (!strncmp(filename, "http://", 7))
+ if (!strncmp(filename, "http://", 7) || !strncmp(filename, "https://", 8))
{
app->stream = fz_stream_from_curl(ctx, filename, pdfapp_more_data, app);
while (1)
@@ -1011,6 +1021,12 @@ static void pdfapp_search_in_direction(pdfapp_t *app,
{
int firstpage, page;
@@ -1038,6 +1048,12 @@ static void pdfapp_search_in_direction(pdfapp_t *app,
return;
}
+ if (app && *app->search == '\0')
+ {
@ -43,7 +34,7 @@ $OpenBSD: patch-platform_x11_pdfapp_c,v 1.6 2016/10/16 09:16:52 sthen Exp $
wincursor(app, WAIT);
firstpage = app->pageno;
@@ -1508,9 +1524,9 @@ static void handlescroll(pdfapp_t *app, int modifiers,
@@ -1535,9 +1551,9 @@ static void handlescroll(pdfapp_t *app, int modifiers,
{
/* zoom in/out if ctrl is pressed */
if (dir < 0)

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-platform_x11_x11_main_c,v 1.1 2016/01/19 05:20:51 semarie Exp $
$OpenBSD: patch-platform_x11_x11_main_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to mupdf-x11 and mupdf-x11-curl:
- inet dns : with HAVE_CURL only
- proc exec : opening an external browser on uri link
--- platform/x11/x11_main.c.orig Tue Nov 10 17:19:51 2015
+++ platform/x11/x11_main.c Mon Jan 18 15:20:56 2016
@@ -698,7 +698,6 @@ void onselreq(Window requestor, Atom selection, Atom t
--- platform/x11/x11_main.c.orig Mon Nov 28 13:34:04 2016
+++ platform/x11/x11_main.c Mon Dec 12 09:39:02 2016
@@ -706,7 +706,6 @@ void onselreq(Window requestor, Atom selection, Atom t
void winreloadpage(pdfapp_t *app)
{
XEvent xev;
@ -14,7 +14,7 @@ add pledge(2) to mupdf-x11 and mupdf-x11-curl:
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
@@ -709,8 +708,7 @@ void winreloadpage(pdfapp_t *app)
@@ -717,8 +716,7 @@ void winreloadpage(pdfapp_t *app)
xev.xclient.data.l[0] = 0;
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = 0;
@ -24,7 +24,7 @@ add pledge(2) to mupdf-x11 and mupdf-x11-curl:
}
void winopenuri(pdfapp_t *app, char *buf)
@@ -884,6 +882,20 @@ int main(int argc, char **argv)
@@ -892,6 +890,20 @@ int main(int argc, char **argv)
tmo_at.tv_sec = 0;
tmo_at.tv_usec = 0;
timeout = NULL;

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-source_fitz_load-jpx_c,v 1.2 2016/10/18 09:24:20 sthen Exp $
$OpenBSD: patch-source_fitz_load-jpx_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
- OPJ_STATIC interferes with shared lib patch for mupdf
- cope with API change in openjpeg 2.1.0
--- source/fitz/load-jpx.c.orig Thu Apr 21 12:14:32 2016
+++ source/fitz/load-jpx.c Tue Oct 18 10:09:14 2016
@@ -1,13 +1,5 @@
#include "mupdf/fitz.h"
--- source/fitz/load-jpx.c.orig Mon Nov 28 13:34:04 2016
+++ source/fitz/load-jpx.c Mon Dec 12 09:39:02 2016
@@ -481,14 +481,6 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data,
#else /* HAVE_LURATECH */
-/* Without the definition of OPJ_STATIC, compilation fails on windows
- * due to the use of __stdcall. We believe it is required on some
@ -18,13 +18,4 @@ $OpenBSD: patch-source_fitz_load-jpx_c,v 1.2 2016/10/18 09:24:20 sthen Exp $
-
#include <openjpeg.h>
static void fz_opj_error_callback(const char *msg, void *client_data)
@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int
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);
/* OpenJPEG does not provide a safe mechanism to intercept

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-source_pdf_pdf-shade_c,v 1.1 2016/08/27 20:58:48 jca Exp $
CVE-2016-6525
http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e;hp=fa1936405b6a84e5c9bb440912c23d532772f958
--- source/pdf/pdf-shade.c.orig Sat Aug 27 13:03:30 2016
+++ source/pdf/pdf-shade.c Sat Aug 27 13:04:17 2016
@@ -206,7 +206,7 @@ pdf_load_mesh_params(fz_context *ctx, pdf_document *do
obj = pdf_dict_get(ctx, dict, PDF_NAME_Decode);
if (pdf_array_len(ctx, obj) >= 6)
{
- n = (pdf_array_len(ctx, obj) - 4) / 2;
+ n = fz_mini(FZ_MAX_COLORS, (pdf_array_len(ctx, obj) - 4) / 2);
shade->u.m.x0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0));
shade->u.m.x1 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1));
shade->u.m.y0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2));

View File

@ -1,36 +0,0 @@
$OpenBSD: patch-source_pdf_pdf-xref_c,v 1.2 2016/10/16 09:16:52 sthen Exp $
CVE-2016-6265
http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=fa1936405b6a84e5c9bb440912c23d532772f958
--- source/pdf/pdf-xref.c.orig Thu Apr 21 12:14:32 2016
+++ source/pdf/pdf-xref.c Sun Oct 16 10:07:02 2016
@@ -1191,8 +1191,14 @@ pdf_load_xref(fz_context *ctx, pdf_document *doc, pdf_
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);
+ }
}
}
@@ -1578,8 +1584,10 @@ pdf_close_document(fz_context *ctx, pdf_document *doc)
* glyph cache at this point. */
fz_purge_glyph_cache(ctx);
+#ifdef WITH_JS
if (doc->js)
pdf_drop_js(ctx, doc->js);
+#endif
pdf_drop_xref_sections(ctx, doc);
fz_free(ctx, doc->xref_index);

View File

@ -1,11 +1,11 @@
$OpenBSD: patch-source_tools_mudraw_c,v 1.2 2016/10/16 09:16:52 sthen Exp $
$OpenBSD: patch-source_tools_mudraw_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to "mutool draw":
- wpath cpath : only if output is specified
--- source/tools/mudraw.c.orig Thu Apr 21 12:14:32 2016
+++ source/tools/mudraw.c Sun Oct 16 09:49:29 2016
@@ -1225,6 +1225,23 @@ int mudraw_main(int argc, char **argv)
--- source/tools/mudraw.c.orig Mon Nov 28 13:34:04 2016
+++ source/tools/mudraw.c Mon Dec 12 09:39:02 2016
@@ -1497,6 +1497,23 @@ int mudraw_main(int argc, char **argv)
if (fz_optind == argc)
usage();

View File

@ -1,13 +1,15 @@
$OpenBSD: patch-source_tools_murun_c,v 1.1 2016/10/16 09:16:52 sthen Exp $
--- source/tools/murun.c.orig Sun Oct 16 10:02:16 2016
+++ source/tools/murun.c Sun Oct 16 10:05:49 2016
$OpenBSD: patch-source_tools_murun_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
--- source/tools/murun.c.orig Mon Nov 28 13:34:04 2016
+++ source/tools/murun.c Mon Dec 12 09:39:02 2016
@@ -1,3 +1,4 @@
+#ifdef WITH_JS
#include "mupdf/fitz.h"
#include "mupdf/pdf.h"
@@ -3174,3 +3175,4 @@ int murun_main(int argc, char **argv)
@@ -4532,5 +4533,6 @@ int murun_main(int argc, char **argv)
fz_drop_context(ctx);
return 0;
}
+#endif
#endif

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-source_tools_mutool_c,v 1.1 2016/10/16 09:16:52 sthen Exp $
--- source/tools/mutool.c.orig Sun Oct 16 10:02:47 2016
+++ source/tools/mutool.c Sun Oct 16 10:05:25 2016
@@ -9,7 +9,9 @@
#endif
int mudraw_main(int argc, char *argv[]);
+#ifdef WITH_JS
int murun_main(int argc, char *argv[]);
+#endif
int pdfclean_main(int argc, char *argv[]);
int pdfextract_main(int argc, char *argv[]);
int pdfinfo_main(int argc, char *argv[]);
@@ -25,7 +27,9 @@ static struct {
char *desc;
} tools[] = {
{ mudraw_main, "draw", "convert document" },
+#ifdef WITH_JS
{ murun_main, "run", "run javascript" },
+#endif
{ pdfclean_main, "clean", "rewrite pdf file" },
{ pdfextract_main, "extract", "extract font and image resources" },
{ pdfinfo_main, "info", "show information about pdf resources" },

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-source_tools_pdfclean_c,v 1.2 2016/10/16 09:16:52 sthen Exp $
$OpenBSD: patch-source_tools_pdfclean_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to "mutool clean"
--- source/tools/pdfclean.c.orig Thu Apr 21 12:14:32 2016
+++ source/tools/pdfclean.c Sun Oct 16 09:47:50 2016
@@ -72,6 +72,12 @@ int pdfclean_main(int argc, char **argv)
--- source/tools/pdfclean.c.orig Mon Nov 28 13:34:04 2016
+++ source/tools/pdfclean.c Mon Dec 12 09:39:02 2016
@@ -77,6 +77,12 @@ int pdfclean_main(int argc, char **argv)
outfile = argv[fz_optind++];
}

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-source_tools_pdfextract_c,v 1.1 2016/01/19 05:20:51 semarie Exp $
$OpenBSD: patch-source_tools_pdfextract_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to "mutool extract"
--- source/tools/pdfextract.c.orig Sun Jan 17 12:12:27 2016
+++ source/tools/pdfextract.c Sun Jan 17 12:13:42 2016
@@ -202,6 +202,12 @@ int pdfextract_main(int argc, char **argv)
--- source/tools/pdfextract.c.orig Mon Nov 28 13:34:04 2016
+++ source/tools/pdfextract.c Mon Dec 12 09:39:02 2016
@@ -255,6 +255,12 @@ int pdfextract_main(int argc, char **argv)
infile = argv[fz_optind++];

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-source_tools_pdfinfo_c,v 1.1 2016/01/19 05:20:51 semarie Exp $
$OpenBSD: patch-source_tools_pdfinfo_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to "mutool info"
--- source/tools/pdfinfo.c.orig Sun Jan 17 10:20:26 2016
+++ source/tools/pdfinfo.c Sun Jan 17 10:23:26 2016
@@ -1061,6 +1061,12 @@ int pdfinfo_main(int argc, char **argv)
--- source/tools/pdfinfo.c.orig Mon Nov 28 13:34:04 2016
+++ source/tools/pdfinfo.c Mon Dec 12 09:39:02 2016
@@ -1021,6 +1021,12 @@ int pdfinfo_main(int argc, char **argv)
if (fz_optind == argc)
infousage();

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-source_tools_pdfpages_c,v 1.1 2016/01/19 05:20:51 semarie Exp $
$OpenBSD: patch-source_tools_pdfpages_c,v 1.2 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to "mutool pages"
--- source/tools/pdfpages.c.orig Sun Jan 17 12:13:56 2016
+++ source/tools/pdfpages.c Sun Jan 17 12:15:06 2016
@@ -229,6 +229,12 @@ int pdfpages_main(int argc, char **argv)
--- source/tools/pdfpages.c.orig Mon Nov 28 13:34:04 2016
+++ source/tools/pdfpages.c Mon Dec 12 09:39:02 2016
@@ -189,6 +189,12 @@ int pdfpages_main(int argc, char **argv)
if (fz_optind == argc)
infousage();

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-source_tools_pdfshow_c,v 1.2 2016/10/16 09:16:52 sthen Exp $
$OpenBSD: patch-source_tools_pdfshow_c,v 1.3 2016/12/12 10:54:39 sthen Exp $
add pledge(2) to "mutool show":
- rpath : dropped after opening
- no need of wpath cpath for -o, as the open is already done at this place
--- source/tools/pdfshow.c.orig Thu Apr 21 12:14:32 2016
+++ source/tools/pdfshow.c Sun Oct 16 09:47:50 2016
@@ -218,6 +218,12 @@ int pdfshow_main(int argc, char **argv)
--- source/tools/pdfshow.c.orig Mon Nov 28 13:34:04 2016
+++ source/tools/pdfshow.c Mon Dec 12 09:39:02 2016
@@ -220,6 +220,12 @@ int pdfshow_main(int argc, char **argv)
char *output = NULL;
int c;
@ -19,7 +19,7 @@ add pledge(2) to "mutool show":
ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
if (!ctx)
{
@@ -251,6 +257,13 @@ int pdfshow_main(int argc, char **argv)
@@ -253,6 +259,13 @@ int pdfshow_main(int argc, char **argv)
fz_try(ctx)
{
doc = pdf_open_document(ctx, filename);

View File

@ -1,20 +0,0 @@
$OpenBSD: patch-thirdparty_mujs_jslex_c,v 1.1 2016/11/08 12:05:04 sthen Exp $
a0ceaf5050f
Fix 697244: Check for incomplete escape sequence at end of input. master
author Tor Andersson <tor.andersson@artifex.com>
Mon, 31 Oct 2016 12:05:37 +0000 (13:05 +0100)
committer Tor Andersson <tor.andersson@artifex.com>
Mon, 31 Oct 2016 12:05:37 +0000 (13:05 +0100)
--- thirdparty/mujs/jslex.c.orig Tue Nov 8 11:14:30 2016
+++ thirdparty/mujs/jslex.c Tue Nov 8 11:15:34 2016
@@ -376,6 +376,7 @@ static int lexescape(js_State *J)
return 0;
switch (J->lexchar) {
+ case 0: jsY_error(J, "unterminated escape sequence");
case 'u':
jsY_next(J);
if (!jsY_ishex(J->lexchar)) return 1; else { x |= jsY_tohex(J->lexchar) << 12; jsY_next(J); }

View File

@ -1,19 +1,22 @@
@comment $OpenBSD: PLIST,v 1.17 2016/10/16 09:16:52 sthen Exp $
@comment $OpenBSD: PLIST,v 1.18 2016/12/12 10:54:39 sthen Exp $
@bin bin/mujstest
bin/mupdf
@bin bin/mupdf-gl
@bin bin/mupdf-x11
@bin bin/mupdf-x11-curl
@bin bin/muraster
@bin bin/mutool
include/mupdf/
include/mupdf/fitz/
include/mupdf/fitz.h
include/mupdf/fitz/annotation.h
include/mupdf/fitz/archive.h
include/mupdf/fitz/bidi.h
include/mupdf/fitz/bitmap.h
include/mupdf/fitz/buffer.h
include/mupdf/fitz/colorspace.h
include/mupdf/fitz/compressed-buffer.h
include/mupdf/fitz/config.h
include/mupdf/fitz/context.h
include/mupdf/fitz/crypt.h
include/mupdf/fitz/device.h
@ -49,12 +52,13 @@ include/mupdf/fitz/string.h
include/mupdf/fitz/structured-text.h
include/mupdf/fitz/system.h
include/mupdf/fitz/text.h
include/mupdf/fitz/track-usage.h
include/mupdf/fitz/transition.h
include/mupdf/fitz/tree.h
include/mupdf/fitz/ucdn.h
include/mupdf/fitz/unzip.h
include/mupdf/fitz/util.h
include/mupdf/fitz/version.h
include/mupdf/fitz/writer.h
include/mupdf/fitz/xml.h
include/mupdf/html.h
include/mupdf/memento.h
@ -70,7 +74,6 @@ include/mupdf/pdf/document.h
include/mupdf/pdf/event.h
include/mupdf/pdf/field.h
include/mupdf/pdf/font.h
include/mupdf/pdf/graft.h
include/mupdf/pdf/interpret.h
include/mupdf/pdf/javascript.h
include/mupdf/pdf/name-table.h
@ -81,7 +84,7 @@ include/mupdf/pdf/parse.h
include/mupdf/pdf/resource.h
include/mupdf/pdf/widget.h
include/mupdf/pdf/xref.h
include/mupdf/xps.h
include/mupdf/svg.h
@lib lib/libmupdf.so.${LIBmupdf_VERSION}
@lib lib/libmupdfthird.so.${LIBmupdfthird_VERSION}
@man man/man1/mupdf.1
@ -96,6 +99,7 @@ share/doc/mupdf/overview.txt
share/doc/mupdf/progressive.txt
share/doc/mupdf/refcount.txt
share/doc/mupdf/thirdparty.txt
share/doc/mupdf/types.txt
share/pixmaps/
share/pixmaps/mupdf.xpm
@exec %D/bin/update-desktop-database