SHA256
1
0
forked from pool/mupdf
mupdf/0001-Fix-699840-Use-saved-sig_widget-pointer-to-sign-sign.patch
Martin Pluskal aa442929d8 Accepting request 684259 from home:guoyunhe:branches:Publishing
- Add build dependencies:
  * liblcms2-devel
  * Mesa-libGL-devel
  * freeglut-devel
  * pkgconfig(openssl)
  * pkgconfig(xi)
  * pkgconfig(xrandr)
- Change COPYING to %licnese instead of %doc
- Update mupdf-no-strip.patch
- Add patches from Fedora project:
  * mupdf-CVE-2018-16647.patch
  * mupdf-CVE-2018-16648.patch
  * mupdf-CVE-2018-18662.patch
  * 0001-Fix-699840-Use-saved-sig_widget-pointer-to-sign-sign.patch
  * 0001-Write-placeholder-appearance-streams-for-digital-sig.patch
  * 0001-fix-build-on-big-endian.patch
- Update to version 1.14:
  * New features:
    * Added "Source Han Serif" CJK fallback font.
    * Added more scripts to the Noto fallback fonts.
    * Multi-page PNM support.
    * "mutool show" now supports a path syntax for selecting objects to show.
  * Build system simplifications:
    * Auto-generated CMap, ICC, and JS source files are checked in to git.
    * Embedded CMap resources are now generated by a python script.
    * Embedded font resources are linked directly if using GNU ld or windows.
    * Namegen tool replaced by use of C macros.
    * Simplified Makefile.
  * Annotation editing:
    * New annotation editing mode in mupdf-gl.
    * Can create, edit, and delete most annotation types.
    * Can create appearance streams for most annotation types.
    * Can create appearance streams for Tx form fields.
    * Can create appearance streams for Ch form fields.
  * Form filling in mupdf-gl:
    * Can click buttons, checkboxes, and radioboxes.
    * Can fill out text fields using dialog box.
    * Can select choice options using dialog box.
    * Can verify and sign digital signatures.
  * Improved UI for mupdf-gl:
    * Password dialog.
    * Error dialog.
    * Open/save file dialog.
    * Snap selection to words or lines by holding control or control+shift.
    * Save and restore current location, bookmarks, and navigation history.
  * Bug fixes:
    * Improved CJK character fallback handling in EPUB.
  * API changes:
    * Pass rectangle and matrix structs by value.
    * Replaced PDF_NAME_Xxx macros with PDF_NAME(Xxx).
    * Added PDF_TRUE, PDF_FALSE, and PDF_NULL constant pdf_obj* macros.
    * Added helper functions: pdf_dict_get_int, etc.
    * Removed 'doc' argument in pdf_new_int, etc.
    * Quads instead of rects when highlighting and searching text.
    * mutool run: Pass arguments to script in scriptArgs global.

OBS-URL: https://build.opensuse.org/request/show/684259
OBS-URL: https://build.opensuse.org/package/show/Publishing/mupdf?expand=0&rev=81
2019-03-12 13:41:52 +00:00

59 lines
1.7 KiB
Diff

From 68840d4a34e1e56ea9130158e8e163fb60550db4 Mon Sep 17 00:00:00 2001
Message-Id: <68840d4a34e1e56ea9130158e8e163fb60550db4.1542273624.git.mjg@fedoraproject.org>
From: Tor Andersson <tor.andersson@artifex.com>
Date: Wed, 7 Nov 2018 19:44:55 +0100
Subject: [PATCH] Fix 699840: Use saved sig_widget pointer to sign signatures,
not selected_annot.
---
platform/gl/gl-form.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/platform/gl/gl-form.c b/platform/gl/gl-form.c
index 94daa8e2..889554f2 100644
--- a/platform/gl/gl-form.c
+++ b/platform/gl/gl-form.c
@@ -10,6 +10,10 @@
#include "mupdf/helpers/pkcs7-check.h"
#include "mupdf/helpers/pkcs7-openssl.h"
+static pdf_widget *sig_widget;
+static char sig_status[500];
+static int sig_result;
+
static char cert_filename[PATH_MAX];
static struct input cert_password;
@@ -22,7 +26,7 @@ static void do_sign(void)
fz_try(ctx)
{
signer = pkcs7_openssl_read_pfx(ctx, cert_filename, cert_password.text);
- pdf_sign_signature(ctx, pdf, selected_annot, signer);
+ pdf_sign_signature(ctx, pdf, sig_widget, signer);
ui_show_warning_dialog("Signed document successfully.");
}
fz_always(ctx)
@@ -33,7 +37,7 @@ static void do_sign(void)
fz_catch(ctx)
ui_show_warning_dialog("%s", fz_caught_message(ctx));
- if (pdf_update_page(ctx, selected_annot->page))
+ if (pdf_update_page(ctx, sig_widget->page))
render_page();
}
@@ -84,10 +88,6 @@ static void cert_file_dialog(void)
}
}
-static pdf_widget *sig_widget;
-static char sig_status[500];
-static int sig_result;
-
static void sig_dialog(void)
{
const char *label = pdf_field_label(ctx, sig_widget->page->doc, sig_widget->obj);
--
2.19.1.1238.g4b45f61cc0