[arch-commits] Commit in ghostscript/trunk (3 files)
Andreas Radke
andyrtr at archlinux.org
Thu Sep 6 15:12:00 UTC 2018
Date: Thursday, September 6, 2018 @ 15:12:00
Author: andyrtr
Revision: 333808
upgpkg: ghostscript 9.24-3
apply more upstream fixes for upcoming CVEs and fix a segfault
Added:
ghostscript/trunk/0002_retain_LockSafetyParams_through_failed_installpagedevice.patch
ghostscript/trunk/0003_Fix_SEGV_seen_in_all-devices_test.patch
Modified:
ghostscript/trunk/PKGBUILD
---------------------------------------------------------------------+
0002_retain_LockSafetyParams_through_failed_installpagedevice.patch | 69 ++++++++++
0003_Fix_SEGV_seen_in_all-devices_test.patch | 40 +++++
PKGBUILD | 13 +
3 files changed, 119 insertions(+), 3 deletions(-)
Added: 0002_retain_LockSafetyParams_through_failed_installpagedevice.patch
===================================================================
--- 0002_retain_LockSafetyParams_through_failed_installpagedevice.patch (rev 0)
+++ 0002_retain_LockSafetyParams_through_failed_installpagedevice.patch 2018-09-06 15:12:00 UTC (rev 333808)
@@ -0,0 +1,69 @@
+From 5812b1b78fc4d36fdc293b7859de69241140d590 Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell at artifex.com>
+Date: Tue, 4 Sep 2018 23:18:46 +0100
+Subject: [PATCH] Bug 699714: retain .LockSafetyParams through failed
+ .installpagedevice
+
+In the event that the .trysetparams fails during .installpagedevice, catch the
+error, and ensure that at least the .LockSafetyParams is set.
+---
+ Resource/Init/gs_setpd.ps | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
+index bba3c8c..aee9614 100644
+--- a/Resource/Init/gs_setpd.ps
++++ b/Resource/Init/gs_setpd.ps
+@@ -95,12 +95,19 @@ level2dict begin
+ { % Since setpagedevice doesn't create new device objects,
+ % we must (carefully) reinstall the old parameters in
+ % the same device.
+- .currentpagedevice pop //null currentdevice //null .trysetparams
++ .currentpagedevice pop //null currentdevice //null
++ {.trysetparams} .internalstopped
++ {
++ //null
++ } if
+ dup type /booleantype eq
+ { pop pop }
+- { % This should never happen!
++ {
+ SETPDDEBUG { (Error in .trysetparams!) = pstack flush } if
+ cleartomark pop pop pop
++ % if resetting the entire device state failed, at least put back the se
++ currentdevice //null //false mark /.LockSafetyParams .currentpagedevice pop
++ /.LockSafetyParams .knownget not {//false} if .putdeviceparamsonly
+ /.installpagedevice cvx /rangecheck signalerror
+ }
+ ifelse pop pop
+--
+2.9.1
+
+
+From e914f1da46e33decc534486598dc3eadf69e6efb Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell at artifex.com>
+Date: Wed, 5 Sep 2018 08:44:41 +0100
+Subject: [PATCH] Fix incomplete comment from previous commit
+
+---
+ Resource/Init/gs_setpd.ps | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Resource/Init/gs_setpd.ps b/Resource/Init/gs_setpd.ps
+index aee9614..b75c431 100644
+--- a/Resource/Init/gs_setpd.ps
++++ b/Resource/Init/gs_setpd.ps
+@@ -105,7 +105,8 @@ level2dict begin
+ {
+ SETPDDEBUG { (Error in .trysetparams!) = pstack flush } if
+ cleartomark pop pop pop
+- % if resetting the entire device state failed, at least put back the se
++ % if resetting the entire device state failed, at least put back the
++ % security related key
+ currentdevice //null //false mark /.LockSafetyParams .currentpagedevice pop
+ /.LockSafetyParams .knownget not {//false} if .putdeviceparamsonly
+ /.installpagedevice cvx /rangecheck signalerror
+--
+2.9.1
+
+
Added: 0003_Fix_SEGV_seen_in_all-devices_test.patch
===================================================================
--- 0003_Fix_SEGV_seen_in_all-devices_test.patch (rev 0)
+++ 0003_Fix_SEGV_seen_in_all-devices_test.patch 2018-09-06 15:12:00 UTC (rev 333808)
@@ -0,0 +1,40 @@
+From 68eca5e94e6f63f4392b15581ad41af52e0edfd9 Mon Sep 17 00:00:00 2001
+From: Robin Watts <robin.watts at artifex.com>
+Date: Thu, 6 Sep 2018 12:56:51 +0100
+Subject: [PATCH] Fix SEGV seen in all-devices test with plank
+ examples/ridt91.eps
+
+Silly typo in the contone fill code for the landscape flippedy
+color cache case.
+---
+ base/gximono.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/base/gximono.c b/base/gximono.c
+index 2971f40..276db69 100644
+--- a/base/gximono.c
++++ b/base/gximono.c
+@@ -1222,8 +1222,8 @@ image_render_mono_ht(gx_image_enum * penum_orig, const byte * buffer, int data_x
+ dev_value = &(color_cache[*psrc * spp_out]);
+ for (j = 0; j < spp_out; j++) {
+ *(devc_contone[j] + position) = dev_value[j];
+- position -= LAND_BITS;
+ }
++ position -= LAND_BITS;
+ xr--;
+ } /* at loop exit xn will be <= xr */
+ psrc++;
+@@ -1259,8 +1259,8 @@ image_render_mono_ht(gx_image_enum * penum_orig, const byte * buffer, int data_x
+ dev_value = &(color_cache[*psrc * spp_out]);
+ for (j = 0; j < spp_out; j++) {
+ *(devc_contone[j] + position) = dev_value[j];
+- devc_contone[j] += LAND_BITS;
+ }
++ position += LAND_BITS;
+ xr++;
+ } /* at loop exit xn will be >= xr */
+ psrc++;
+--
+2.9.1
+
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-09-06 10:51:13 UTC (rev 333807)
+++ PKGBUILD 2018-09-06 15:12:00 UTC (rev 333808)
@@ -4,7 +4,7 @@
pkgbase=ghostscript
pkgname=(ghostscript ghostxps ghostpcl)
pkgver=9.24
-pkgrel=2
+pkgrel=3
pkgdesc="An interpreter for the PostScript language"
url="https://www.ghostscript.com/"
arch=('x86_64')
@@ -14,9 +14,13 @@
makedepends=('gtk3' 'gnutls' 'glu' 'freeglut')
# https://github.com/ArtifexSoftware/ghostpdl-downloads/releases
source=(https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${pkgver/./}/ghostpdl-${pkgver}.tar.gz
- 0001_ICC_profile_validation.patch)
+ 0001_ICC_profile_validation.patch
+ 0002_retain_LockSafetyParams_through_failed_installpagedevice.patch
+ 0003_Fix_SEGV_seen_in_all-devices_test.patch)
sha512sums=('d3aae0d6f9d4f56392078d5034e278afa4f436f4b0977aeab0b9fbba8282e6598bf4532494f7df28f752d4cd1ea4c985e8f3e47db9be40cdf885b17f16731d75'
- '6cfdd351e8e84968c20cf8f15e01a09a215b6132af89ca0e392716638d925a0f750dab3dbcbdf44f200fb9cc419be5dadccffc226c9a405e888f3580f98cf4ea')
+ '6cfdd351e8e84968c20cf8f15e01a09a215b6132af89ca0e392716638d925a0f750dab3dbcbdf44f200fb9cc419be5dadccffc226c9a405e888f3580f98cf4ea'
+ '670ccf36927904fc2e918847baf082753d3b4b81fd0ee2347feb6de5a0ab77eb9c00cb640fcb3c7a0f395694112f3921775a6f614bec08e3d4452155b030951e'
+ '45be77dc890d9d251541d44fe0ad860a7d83d969ce697bbb32cb469d8837417020f1a017ae7aecbb8fbb45647ad9c3e6f92d321c2adfe6c8b3412c580f4058c5')
prepare() {
cd ghostpdl-${pkgver}
@@ -28,6 +32,9 @@
# https://bugs.ghostscript.com/show_bug.cgi?id=699713
patch -Np1 -i ../0001_ICC_profile_validation.patch
+ # apply more upstream fixes to solve various crashes
+ patch -Np1 -i ../0002_retain_LockSafetyParams_through_failed_installpagedevice.patch
+ patch -Np1 -i ../0003_Fix_SEGV_seen_in_all-devices_test.patch
}
build() {
More information about the arch-commits
mailing list