From 836e3bbdeddd079474501964f6bf759e1802bf84 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Aug 22 2013 14:37:20 +0000 Subject: Fixed character set conversion issue in pdfwrite (bug #999927). Resolves: rhbz#999927 --- diff --git a/ghostscript-pdf-charset-conv.patch b/ghostscript-pdf-charset-conv.patch new file mode 100644 index 0000000..ef1b745 --- /dev/null +++ b/ghostscript-pdf-charset-conv.patch @@ -0,0 +1,17 @@ +diff -up ghostscript-9.07/base/gdevpdfe.c.pdf-charset-conv ghostscript-9.07/base/gdevpdfe.c +--- ghostscript-9.07/base/gdevpdfe.c.pdf-charset-conv 2013-08-22 15:17:11.883531983 +0100 ++++ ghostscript-9.07/base/gdevpdfe.c 2013-08-22 15:17:46.762697347 +0100 +@@ -380,10 +380,10 @@ pdf_xmp_write_translated(gx_device_pdf * + } + memset(buf1, 0x00, (j * sizeof(UTF16)) + 2); + for (i = 0; i < j; i++) { +- if (buf0[i] <= 0x7f || buf0[0] >= 0xAE) { +- if (buf0[0] == 0x7f) { ++ if (buf0[i] <= 0x7f || buf0[i] >= 0xAE) { ++ if (buf0[i] == 0x7f) { + emprintf1(pdev->memory, "PDFDocEncoding %x cannot be represented in Unicode\n", +- buf0[0]); ++ buf0[i]); + } else + buf1[(i * 2) + 3] = buf0[i]; + } else { diff --git a/ghostscript.spec b/ghostscript.spec index 367524e..5130845 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer Name: ghostscript Version: %{gs_ver} -Release: 12%{?dist} +Release: 13%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -32,6 +32,7 @@ Patch13: ghostscript-wrf-snprintf.patch Patch14: ghostscript-cups-colord.patch Patch15: ghostscript-zfapi-crash.patch Patch16: ghostscript-gstoraster-costs.patch +Patch17: ghostscript-pdf-charset-conv.patch Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: poppler-data @@ -162,6 +163,9 @@ rm -rf expat freetype icclib jasper jpeg lcms lcms2 libpng openjpeg zlib cups/li # Tweak filter costs for gstoraster (part of bug #998977). %patch16 -p1 -b .gstoraster-costs +# Fixed character set conversion issue in pdfwrite (bug #999927). +%patch17 -p1 -b .pdf-charset-conv + # Remove pdfopt man pages which were mistakenly left in (bug #963882). rm man/{de/,}pdfopt.1 @@ -361,6 +365,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Thu Aug 22 2013 Tim Waugh 9.07-13 +- Fixed character set conversion issue in pdfwrite (bug #999927). + * Wed Aug 21 2013 Tim Waugh 9.07-12 - Tweak filter costs for gstoraster (part of bug #998977).