Compare commits

...

11 Commits
f35 ... rawhide

Author SHA1 Message Date
Fedora Release Engineering 59b615c537 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 21:00:38 +00:00
Sandro Mani 57d5651c80 Rebuild (tesseract) 2022-12-23 21:59:57 +01:00
Sandro Mani dae2ea6f54 Rebuild (leptonica) 2022-12-21 15:42:11 +01:00
Michael J Gruber 15f1cc451a fix png_write_band (rhbz#2154545)
... (gsbz#706227)
2022-12-20 15:14:34 +01:00
Michael J Gruber 4383cdfe1f SPDX migration 2022-12-17 11:42:04 +01:00
Michael J Gruber 910cfdca95 rebase to 1.21.1 (rhbz#2152708) 2022-12-13 11:36:39 +01:00
Michael J Gruber 1bccd68af3 rebase to 1.21.0 (rhbz#2140776) 2022-11-11 13:59:27 +01:00
Michael J Gruber 110373e8d9 rebase to 1.21.0-rc1 2022-10-27 20:48:13 +02:00
Michael J Gruber c05df1b2d8 rebase to 1.20.3 (bz #2104499) 2022-08-12 21:13:32 +02:00
Fedora Release Engineering 7d449a49d4 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 00:00:23 +00:00
Sandro Mani 2fb98fa93a Rebuild (tesseract) 2022-07-08 10:50:04 +02:00
4 changed files with 64 additions and 8 deletions

4
.gitignore vendored
View File

@ -27,3 +27,7 @@
/mupdf-1.20.0-rc1-source.tar.gz
/mupdf-1.20.0-rc2-source.tar.gz
/mupdf-1.20.0-source.tar.gz
/mupdf-1.20.3-source.tar.gz
/mupdf-1.21.0-rc1-source.tar.gz
/mupdf-1.21.0-source.tar.gz
/mupdf-1.21.1-source.tar.gz

View File

@ -0,0 +1,50 @@
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Sun, 18 Dec 2022 00:22:04 +0000 (+0900)
Subject: Bug 706227: png_write_band: initialize stream before calling deflateBound
X-Git-Url: http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=a76b4ed0d3a2c7e52bba2d6c10b44d11d5ade2fe
Bug 706227: png_write_band: initialize stream before calling deflateBound
zlib deflateBound manual says when calling this function,
stream should have been initialized via a call to deflateInit_()
or deflateInit2_(), so change so.
Note that without this fix, "mutool draw -F png" segfaults on s390x,
perhaps on big endian, uninitialized bytes of a value (which is
not wholly initialized) is read, on the other hand, on little endian
initialized bytes of the value is read, so it happens not to cause
segfault.
Fixes https://bugs.ghostscript.com/show_bug.cgi?id=706227
---
diff --git a/source/fitz/output-png.c b/source/fitz/output-png.c
index 17279f913..979c75eeb 100644
--- a/source/fitz/output-png.c
+++ b/source/fitz/output-png.c
@@ -236,6 +236,12 @@ png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st
if (usize > SIZE_MAX / band_height)
fz_throw(ctx, FZ_ERROR_GENERIC, "png data too large.");
usize *= band_height;
+ writer->stream.opaque = ctx;
+ writer->stream.zalloc = fz_zlib_alloc;
+ writer->stream.zfree = fz_zlib_free;
+ err = deflateInit(&writer->stream, Z_DEFAULT_COMPRESSION);
+ if (err != Z_OK)
+ fz_throw(ctx, FZ_ERROR_GENERIC, "compression error %d", err);
writer->usize = usize;
/* Now figure out how large a buffer we need to compress into.
* deflateBound always expands a bit, and it's limited by being
@@ -245,12 +251,6 @@ png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st
writer->csize = UINT32_MAX;
writer->udata = Memento_label(fz_malloc(ctx, writer->usize), "png_write_udata");
writer->cdata = Memento_label(fz_malloc(ctx, writer->csize), "png_write_cdata");
- writer->stream.opaque = ctx;
- writer->stream.zalloc = fz_zlib_alloc;
- writer->stream.zfree = fz_zlib_free;
- err = deflateInit(&writer->stream, Z_DEFAULT_COMPRESSION);
- if (err != Z_OK)
- fz_throw(ctx, FZ_ERROR_GENERIC, "compression error %d", err);
}
dp = writer->udata;

View File

@ -4,15 +4,17 @@
%global jbig2dec_version 0.19
Name: mupdf
Version: 1.20.0
%global upversion 1.20.0
Version: 1.21.1
# upstream prerelease versions tags need to be translated to Fedorian
%global upversion %{version}
Release: %autorelease
Summary: A lightweight PDF viewer and toolkit
License: AGPLv3+
License: AGPL-3.0-or-later
URL: http://mupdf.com/
Source0: http://mupdf.com/downloads/archive/%{name}-%{upversion}-source.tar.gz
Source1: %{name}.desktop
Source2: %{name}-gl.desktop
Patch: mupdf-1.21.1-fix-png_write_band.patch
BuildRequires: gcc gcc-c++ make binutils desktop-file-utils coreutils pkgconfig
BuildRequires: openjpeg2-devel desktop-file-utils
BuildRequires: libjpeg-devel freetype-devel libXext-devel curl-devel
@ -25,14 +27,14 @@ Requires: jbig2dec-libs = %{jbig2dec_version}
# We need to build against the Artifex fork of lcms2 so that we are thread safe
# (see bug #1553915). Artifex make sure to rebase against upstream, who refuse
# to integrate Artifex's changes.
Provides: bundled(lcms2-devel) = 2.12^85.g558b336
Provides: bundled(lcms2-devel) = 2.14~rc1^59-g88b6a72
# We need to build against the Artifex fork of freeglut so that we are unicode safe.
Provides: bundled(freeglut-devel) = 3.0.0^11.g13ae6aa
# muPDF needs the muJS sources for the build even if we build against the system
# version so bundling them is the safer choice.
Provides: bundled(mujs-devel) = 1.2.0
Provides: bundled(mujs-devel) = 1.3.2
# muPDF builds only against in-tree extract which is versioned along with ghostpdl.
Provides: bundled(extract) = 9.56.0~rc1^4.g10c442d
Provides: bundled(extract) = 9.56.0^53-gc18d9f3
%description
MuPDF is a lightweight PDF viewer and toolkit written in portable C.
@ -59,7 +61,7 @@ The mupdf-devel package contains header files for developing
applications that use mupdf and static libraries
%prep
%setup -q -n %{name}-%{upversion}-source
%autosetup -p1 -n %{name}-%{upversion}-source
for d in $(ls thirdparty | grep -v -e extract -e freeglut -e lcms2 -e mujs)
do
rm -rf thirdparty/$d

View File

@ -1 +1 @@
SHA512 (mupdf-1.20.0-source.tar.gz) = 6837299c589ece9cc443b027433fa3eee545f5155aeb6359b7a43da239d2e99195e9ae3950ddec6cb6ebae77bc877573c6f89a90754c58723d7e87d9739ed1f4
SHA512 (mupdf-1.21.1-source.tar.gz) = 11eeea409e0b44d3f754a44b00b15522c2ae2d94171b8c7067efa7acbb1d597eefe1e27607fab90a56bf6c73579bbfb77b7599080fc2504a5881aaf7cc1957c7