Fixed character set conversion issue in pdfwrite (bug #999927).

Resolves: rhbz#999927
This commit is contained in:
Tim Waugh 2013-08-22 15:37:20 +01:00
parent e9d3d79e4f
commit 836e3bbded
2 changed files with 25 additions and 1 deletions

View File

@ -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 {

View File

@ -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 <twaugh@redhat.com> 9.07-13
- Fixed character set conversion issue in pdfwrite (bug #999927).
* Wed Aug 21 2013 Tim Waugh <twaugh@redhat.com> 9.07-12
- Tweak filter costs for gstoraster (part of bug #998977).