pkgsrc-Changes-HG archive

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

[pkgsrc/pkgsrc-2005Q2]: pkgsrc/print/gpdf Pullup ticket 744 - requested by Ju...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8fecdc404153
branches:  pkgsrc-2005Q2
changeset: 496068:8fecdc404153
user:      salo <salo%pkgsrc.org@localhost>
date:      Thu Sep 08 10:27:34 2005 +0000

description:
Pullup ticket 744 - requested by Julio M. Merino Vidal
security fix for gpdf

Revisions pulled up:
- pkgsrc/print/gpdf/Makefile            1.29
- pkgsrc/print/gpdf/distinfo            1.12
- pkgsrc/print/gpdf/patches/patch-ab    1.1

   Module Name:         pkgsrc
   Committed By:        jmmv
   Date:                Mon Sep  5 14:42:43 UTC 2005

   Modified Files:
        pkgsrc/print/gpdf: Makefile distinfo
   Added Files:
        pkgsrc/print/gpdf/patches: patch-ab

   Log Message:
   Apply patch to fix CAN-2005-2097; taken from the Gentoo package, which
   in turn took the patch from Red Hat.  Bump PKGREVISION to 1.

diffstat:

 print/gpdf/Makefile         |   3 +-
 print/gpdf/distinfo         |   3 +-
 print/gpdf/patches/patch-ab |  68 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 72 insertions(+), 2 deletions(-)

diffs (97 lines):

diff -r cd47f5e37e22 -r 8fecdc404153 print/gpdf/Makefile
--- a/print/gpdf/Makefile       Sun Sep 04 13:41:04 2005 +0000
+++ b/print/gpdf/Makefile       Thu Sep 08 10:27:34 2005 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.26 2005/06/01 18:03:09 jlam Exp $
+# $NetBSD: Makefile,v 1.26.2.1 2005/09/08 10:27:34 salo Exp $
 #
 
 DISTNAME=      gpdf-2.10.0
+PKGREVISION=   1
 CATEGORIES=    print
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/gpdf/2.10/}
 EXTRACT_SUFX=  .tar.bz2
diff -r cd47f5e37e22 -r 8fecdc404153 print/gpdf/distinfo
--- a/print/gpdf/distinfo       Sun Sep 04 13:41:04 2005 +0000
+++ b/print/gpdf/distinfo       Thu Sep 08 10:27:34 2005 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.11 2005/03/22 16:32:56 jmmv Exp $
+$NetBSD: distinfo,v 1.11.2.1 2005/09/08 10:27:34 salo Exp $
 
 SHA1 (gpdf-2.10.0.tar.bz2) = f9b925ed5b15deb90968e834fd63fc7628688808
 RMD160 (gpdf-2.10.0.tar.bz2) = 16cb9413e012c2c5268082d8322d1468e5c30907
 Size (gpdf-2.10.0.tar.bz2) = 1079944 bytes
 SHA1 (patch-aa) = 8985b54bad962a31a6ee315747c0297419b8e291
+SHA1 (patch-ab) = 4601088604b8c5a52546e689bfdccc2aa18ea1e6
diff -r cd47f5e37e22 -r 8fecdc404153 print/gpdf/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/gpdf/patches/patch-ab       Thu Sep 08 10:27:34 2005 +0000
@@ -0,0 +1,68 @@
+$NetBSD: patch-ab,v 1.1.2.2 2005/09/08 10:27:34 salo Exp $
+
+Patch to fix CAN-2005-2097.  The patch in #163920 doesn't apply to
+gpdf, since gpdf uses the gnome print api for rendering.  The crux of
+that patch is to avoid using the FoFi (font file) classes for fixing
+up the embedded truetype font, but instead pass the font to freetype
+directly.  This patch does the same thing for the gpdf rendering code.
+
+Kristian Høgsberg <krh%redhat.com@localhost>
+
+--- xpdf/GPOutputDev.cc.krh    2005-08-01 11:44:43.000000000 -0400
++++ xpdf/GPOutputDev.cc        2005-08-01 11:45:32.000000000 -0400
+@@ -258,9 +258,6 @@
+   }
+   case fontTrueType: {
+     FoFiTrueType *ff;
+-    gint fd;
+-    gchar *temp_name;
+-    FILE *f;
+     gushort *code_to_gid;
+ 
+     ff = FoFiTrueType::make((char *)contents, length);
+@@ -269,16 +266,7 @@
+ 
+     code_to_gid = ((Gfx8BitFont *)font)->getCodeToGIDMap(ff); // this is g(oo)malloc'd
+ 
+-    fd = g_file_open_tmp("gpdf-ttf-XXXXXX", &temp_name, NULL);
+-    f = fdopen(fd, "wb");
+-    ff->writeTTF(&fileWrite, f);
+     delete ff;
+-    g_free(contents);
+-    fclose(f);
+-
+-    g_file_get_contents(temp_name, (gchar **)&contents, &length, NULL);
+-    unlink(temp_name);
+-    g_free(temp_name);
+ 
+     gff = gpdf_font_face_download((const guchar *)font_name,
+                                 (const guchar *)"",
+@@ -324,28 +312,8 @@
+     break;
+   }
+   case fontCIDType2: {
+-    FoFiTrueType *ff;
+-    gint fd;
+-    gchar *temp_name;
+-    FILE *f;
+     gint n_cids;    
+     gushort *code_to_gid;
+-
+-    ff = FoFiTrueType::make((char *)contents, length);
+-    if (!ff)
+-      return getFontFaceFallback(font);
+-
+-    fd = g_file_open_tmp("gpdf-ttf-XXXXXX", &temp_name, NULL);
+-    f = fdopen(fd, "wb");
+-    ff->writeTTF(&fileWrite, f);
+-    delete ff;
+-    g_free(contents);
+-    fclose(f);
+-
+-    g_file_get_contents(temp_name, (gchar **)&contents, &length, NULL);
+-    unlink(temp_name);
+-    g_free(temp_name);
+-
+     gff = gpdf_font_face_download((const guchar *)font_name,
+                                 (const guchar *)"",
+                                 GNOME_FONT_REGULAR, FALSE,



Home | Main Index | Thread Index | Old Index