forked from pool/mupdf
aa442929d8
- 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
123 lines
3.8 KiB
Diff
123 lines
3.8 KiB
Diff
From 5fb79e6ccb805b3d94c8bb8eb0990d9944ae7602 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <5fb79e6ccb805b3d94c8bb8eb0990d9944ae7602.1528041417.git.mjg@fedoraproject.org>
|
|
From: Michael J Gruber <mjg@fedoraproject.org>
|
|
Date: Sun, 3 Jun 2018 17:55:46 +0200
|
|
Subject: [PATCH] fix build on big endian
|
|
|
|
0dc1153 ("Spread of context into all procedures and removal from
|
|
structures", 2017-04-26) missed a few spots that are relevant on big
|
|
endian only.
|
|
|
|
Add the missing ContextIDs in the call chain so that the build succeeds
|
|
again.
|
|
|
|
Signed-off-by: Michael J Gruber <mjg@fedoraproject.org>
|
|
---
|
|
src/cmsmd5.c | 22 +++++++++++-----------
|
|
1 file changed, 11 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/src/cmsmd5.c b/src/cmsmd5.c
|
|
index 4b8f7f9..dd0925a 100644
|
|
--- a/src/cmsmd5.c
|
|
+++ b/src/cmsmd5.c
|
|
@@ -29,7 +29,7 @@
|
|
#ifdef CMS_USE_BIG_ENDIAN
|
|
|
|
static
|
|
-void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs)
|
|
+void byteReverse(cmsContext ContextID, cmsUInt8Number * buf, cmsUInt32Number longs)
|
|
{
|
|
do {
|
|
|
|
@@ -42,7 +42,7 @@ void byteReverse(cmsUInt8Number * buf, cmsUInt32Number longs)
|
|
}
|
|
|
|
#else
|
|
-#define byteReverse(buf, len)
|
|
+#define byteReverse(ContextID, buf, len)
|
|
#endif
|
|
|
|
|
|
@@ -172,7 +172,7 @@ cmsHANDLE MD5alloc(cmsContext ContextID)
|
|
|
|
|
|
static
|
|
-void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
|
|
+void MD5add(cmsContext ContextID, cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
|
|
{
|
|
_cmsMD5* ctx = (_cmsMD5*) Handle;
|
|
cmsUInt32Number t;
|
|
@@ -196,7 +196,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
|
|
}
|
|
|
|
memmove(p, buf, t);
|
|
- byteReverse(ctx->in, 16);
|
|
+ byteReverse(ContextID, ctx->in, 16);
|
|
|
|
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
|
|
buf += t;
|
|
@@ -205,7 +205,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
|
|
|
|
while (len >= 64) {
|
|
memmove(ctx->in, buf, 64);
|
|
- byteReverse(ctx->in, 16);
|
|
+ byteReverse(ContextID, ctx->in, 16);
|
|
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
|
|
buf += 64;
|
|
len -= 64;
|
|
@@ -216,7 +216,7 @@ void MD5add(cmsHANDLE Handle, cmsUInt8Number* buf, cmsUInt32Number len)
|
|
|
|
// Destroy the object and return the checksum
|
|
static
|
|
-void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
|
|
+void MD5finish(cmsContext ContextID, cmsProfileID* ProfileID, cmsHANDLE Handle)
|
|
{
|
|
_cmsMD5* ctx = (_cmsMD5*) Handle;
|
|
cmsUInt32Number count;
|
|
@@ -232,21 +232,21 @@ void MD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle)
|
|
if (count < 8) {
|
|
|
|
memset(p, 0, count);
|
|
- byteReverse(ctx->in, 16);
|
|
+ byteReverse(ContextID, ctx->in, 16);
|
|
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
|
|
|
|
memset(ctx->in, 0, 56);
|
|
} else {
|
|
memset(p, 0, count - 8);
|
|
}
|
|
- byteReverse(ctx->in, 14);
|
|
+ byteReverse(ContextID, ctx->in, 14);
|
|
|
|
((cmsUInt32Number *) ctx->in)[14] = ctx->bits[0];
|
|
((cmsUInt32Number *) ctx->in)[15] = ctx->bits[1];
|
|
|
|
MD5_Transform(ctx->buf, (cmsUInt32Number *) ctx->in);
|
|
|
|
- byteReverse((cmsUInt8Number *) ctx->buf, 4);
|
|
+ byteReverse(ContextID, (cmsUInt8Number *) ctx->buf, 4);
|
|
memmove(ProfileID ->ID8, ctx->buf, 16);
|
|
|
|
_cmsFree(ctx ->ContextID, ctx);
|
|
@@ -291,7 +291,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
|
|
if (MD5 == NULL) goto Error;
|
|
|
|
// Add all bytes
|
|
- MD5add(MD5, Mem, BytesNeeded);
|
|
+ MD5add(ContextID,MD5, Mem, BytesNeeded);
|
|
|
|
// Temp storage is no longer needed
|
|
_cmsFree(ContextID, Mem);
|
|
@@ -300,7 +300,7 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile)
|
|
memmove(Icc, &Keep, sizeof(_cmsICCPROFILE));
|
|
|
|
// And store the ID
|
|
- MD5finish(&Icc ->ProfileID, MD5);
|
|
+ MD5finish(ContextID, &Icc ->ProfileID, MD5);
|
|
return TRUE;
|
|
|
|
Error:
|
|
--
|
|
2.18.0.rc0.294.g786209a621
|
|
|