GraphicsMagick: Validate Validate legacy Ghostscript font file i...

GraphicsMagick Commits <[email protected]> Thu, 12 Sep 2024 10:42:02 -0500
Newsgroups gmane.comp.video.graphicsmagick.cvs
Message-ID <mailman.20285.1726155734.8001.graphicsmagick-commit@lists.sourceforge.net>
changeset effa76bf2394 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=effa76bf2394
summary: Validate Validate legacy Ghostscript font file in Ghostscript install directory before deciding to use it.

diffstat:

 configure    |  6 +++++-
 configure.ac |  6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r f02aa25402ed -r effa76bf2394 configure
--- a/configure	Thu Sep 12 10:24:00 2024 -0500
+++ b/configure	Thu Sep 12 10:41:35 2024 -0500
@@ -33627,7 +33627,11 @@
     if test "$with_gs" = 'yes' ; then
       if test "${PSDelegate}" != "${PSDelegateDefault}"
       then
-        ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
+        font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
+        if test -f "${font_dir}a010013l.pfb"
+        then
+          ghostscript_font_dir="${font_dir}"
+        fi
       fi
     fi
 
diff -r f02aa25402ed -r effa76bf2394 configure.ac
--- a/configure.ac	Thu Sep 12 10:24:00 2024 -0500
+++ b/configure.ac	Thu Sep 12 10:41:35 2024 -0500
@@ -3676,7 +3676,11 @@
     if test "$with_gs" = 'yes' ; then
       if test "${PSDelegate}" != "${PSDelegateDefault}"
       then
-        ghostscript_font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
+        font_dir=`echo "${PSDelegate}" | sed -e 's:/gs/.*:/gs:;s:^/::;s/./&:/;s:/:\\\\:g'`"\\fonts\\"
+        if test -f "${font_dir}a010013l.pfb"
+        then
+          ghostscript_font_dir="${font_dir}"
+        fi
       fi
     fi