[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#774759: [pre-approval] unblock: ghostscript/9.06~dfsg-2



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear RT,

I'd like to get the patch for #732440 included in Jessie. The bug was
reported three independent times and is a premature abort in Ghostscript
processing. The patch that fixes that bug was included in upstream's
9.14 version and can be directly cherry-picked on top of 9.06~dfsg-1 as
currently in jessie.

Here goes the proposed changelog:

ghostscript (9.06~dfsg-2) unstable; urgency=medium

  * Add patch cherry-picked upstream to fix /typecheck error in /findfont
    (Closes: #732440)

The cherry-picked patch as well as the full debdiff are attached.

TIA, cheers,

OdyX
diff -Nru ghostscript-9.06~dfsg/debian/changelog ghostscript-9.06~dfsg/debian/changelog
--- ghostscript-9.06~dfsg/debian/changelog	2014-08-27 04:08:44.000000000 +0200
+++ ghostscript-9.06~dfsg/debian/changelog	2015-01-07 08:28:03.000000000 +0100
@@ -1,3 +1,10 @@
+ghostscript (9.06~dfsg-2) unstable; urgency=medium
+
+  * Add patch cherry-picked upstream to fix /typecheck error in /findfont
+    (Closes: #732440)
+
+ -- Didier Raboud <odyx@debian.org>  Wed, 07 Jan 2015 08:27:52 +0100
+
 ghostscript (9.06~dfsg-1) unstable; urgency=medium
 
   * Team upload
diff -Nru ghostscript-9.06~dfsg/debian/patches/020140211~f4584b0.patch ghostscript-9.06~dfsg/debian/patches/020140211~f4584b0.patch
--- ghostscript-9.06~dfsg/debian/patches/020140211~f4584b0.patch	1970-01-01 01:00:00.000000000 +0100
+++ ghostscript-9.06~dfsg/debian/patches/020140211~f4584b0.patch	2015-01-07 08:26:20.000000000 +0100
@@ -0,0 +1,48 @@
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Tue, 11 Feb 2014 15:15:56 +0000 (+0000)
+Subject: Bug 695031: don't assume we can read a font file
+X-Git-Tag: ghostpdl-9.12rc1~50
+X-Git-Url: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff_plain;h=f4584b0e162a96ec143f0057de63c116e649e02b
+Bug-Debian: https://bugs.debian.org/732440
+
+Bug 695031: don't assume we can read a font file
+
+When we scan system fonts, we were assuming fonts found would be in a format
+Ghostscript understands. This is not necessarily the case.
+
+So put the minimal parsing call to get the font's name in a stopped context,
+so we can skip the file it's not an understandable format. And clean up the
+stack in the event we try such a file.
+
+No cluster differences.
+---
+
+--- a/Resource/Init/gs_fonts.ps
++++ b/Resource/Init/gs_fonts.ps
+@@ -385,12 +385,20 @@
+         pop pop pop
+       }{
+         % we could open the font file
+-        .findfontname
+-        not { dup 0 get } if  % stack: (newname) [ (name) (path) ]
+-        % DEBUG { (  found ) print dup print (\n) print flush } if
+-        % add entry to the fontmap
+-        1 index exch 0 exch dup type /nametype ne {cvn} if put
+-        aload pop .definefontmap
++        mark 2 1 roll
++        {.findfontname} stopped
++        {
++          cleartomark
++          pop pop
++        }
++        {
++          3 -1 roll pop
++          not { dup 0 get } if  % stack: (newname) [ (name) (path) ]
++          % DEBUG { (  found ) print dup print (\n) print flush } if
++          % add entry to the fontmap
++          1 index exch 0 exch dup type /nametype ne {cvn} if put
++          aload pop .definefontmap
++        } ifelse
+       } ifelse
+     } forall
+   } if
diff -Nru ghostscript-9.06~dfsg/debian/patches/series ghostscript-9.06~dfsg/debian/patches/series
--- ghostscript-9.06~dfsg/debian/patches/series	2014-08-27 03:59:17.000000000 +0200
+++ ghostscript-9.06~dfsg/debian/patches/series	2015-01-07 08:25:44.000000000 +0100
@@ -3,6 +3,7 @@
 020121130~a3d00da.patch
 020130619~1b87b82.patch
 020130619~daceba6.patch
+020140211~f4584b0.patch
 1001_document_inkcov_device.patch
 2001_docdir_fix_for_debian.patch
 2002_gs_man_fix_debian.patch
From: Chris Liddell <chris.liddell@artifex.com>
Date: Tue, 11 Feb 2014 15:15:56 +0000 (+0000)
Subject: Bug 695031: don't assume we can read a font file
X-Git-Tag: ghostpdl-9.12rc1~50
X-Git-Url: http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff_plain;h=f4584b0e162a96ec143f0057de63c116e649e02b
Bug-Debian: https://bugs.debian.org/732440

Bug 695031: don't assume we can read a font file

When we scan system fonts, we were assuming fonts found would be in a format
Ghostscript understands. This is not necessarily the case.

So put the minimal parsing call to get the font's name in a stopped context,
so we can skip the file it's not an understandable format. And clean up the
stack in the event we try such a file.

No cluster differences.
---

--- a/Resource/Init/gs_fonts.ps
+++ b/Resource/Init/gs_fonts.ps
@@ -385,12 +385,20 @@
         pop pop pop
       }{
         % we could open the font file
-        .findfontname
-        not { dup 0 get } if  % stack: (newname) [ (name) (path) ]
-        % DEBUG { (  found ) print dup print (\n) print flush } if
-        % add entry to the fontmap
-        1 index exch 0 exch dup type /nametype ne {cvn} if put
-        aload pop .definefontmap
+        mark 2 1 roll
+        {.findfontname} stopped
+        {
+          cleartomark
+          pop pop
+        }
+        {
+          3 -1 roll pop
+          not { dup 0 get } if  % stack: (newname) [ (name) (path) ]
+          % DEBUG { (  found ) print dup print (\n) print flush } if
+          % add entry to the fontmap
+          1 index exch 0 exch dup type /nametype ne {cvn} if put
+          aload pop .definefontmap
+        } ifelse
       } ifelse
     } forall
   } if

Reply to: