pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/print/enscript pull in a patch from redhat to fix a bu...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cca232ce8ece
branches:  trunk
changeset: 555182:cca232ce8ece
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Wed Feb 25 18:44:30 2009 +0000

description:
pull in a patch from redhat to fix a buffer overflow (CVE-2008-3863),
bump PKGREVISION

diffstat:

 print/enscript/Makefile         |   3 +-
 print/enscript/distinfo         |   4 +-
 print/enscript/patches/patch-ab |  99 ++++++++++++++++++++++++++++++++++++++--
 3 files changed, 98 insertions(+), 8 deletions(-)

diffs (151 lines):

diff -r 02b3a6c8e17f -r cca232ce8ece print/enscript/Makefile
--- a/print/enscript/Makefile   Wed Feb 25 18:40:51 2009 +0000
+++ b/print/enscript/Makefile   Wed Feb 25 18:44:30 2009 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.42 2009/02/13 18:53:28 abs Exp $
+# $NetBSD: Makefile,v 1.43 2009/02/25 18:44:30 drochner Exp $
 #
 
 DISTNAME=              enscript-1.6.4
+PKGREVISION=           1
 CATEGORIES=            print
 MASTER_SITES=          http://www.iki.fi/mtr/genscript/
 
diff -r 02b3a6c8e17f -r cca232ce8ece print/enscript/distinfo
--- a/print/enscript/distinfo   Wed Feb 25 18:40:51 2009 +0000
+++ b/print/enscript/distinfo   Wed Feb 25 18:44:30 2009 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.8 2009/02/13 18:53:28 abs Exp $
+$NetBSD: distinfo,v 1.9 2009/02/25 18:44:30 drochner Exp $
 
 SHA1 (enscript-1.6.4.tar.gz) = 9dd7128a508d4c9671659b9520028d12add50cfa
 RMD160 (enscript-1.6.4.tar.gz) = 9050728f14500f0360c5a4e258cba0646694bfeb
 Size (enscript-1.6.4.tar.gz) = 1036734 bytes
 SHA1 (patch-aa) = 0b095dbb1681b121a417bd7b3fb2dff351fcfa86
-SHA1 (patch-ab) = fa3103f949bf3a564afab7754a57de6b5c8cea3b
+SHA1 (patch-ab) = 67cf45f43ad282174b5bbaf8c60be3448c76f235
 SHA1 (patch-ac) = d43a55bfde2afe9bf49ab8cdd6bf7b2205d3952b
 SHA1 (patch-ad) = 31e461f8b2647699a2847445703745a07994e571
 SHA1 (patch-ae) = 311ee615f231adbeece251606617065d306249ac
diff -r 02b3a6c8e17f -r cca232ce8ece print/enscript/patches/patch-ab
--- a/print/enscript/patches/patch-ab   Wed Feb 25 18:40:51 2009 +0000
+++ b/print/enscript/patches/patch-ab   Wed Feb 25 18:44:30 2009 +0000
@@ -1,8 +1,97 @@
-$NetBSD: patch-ab,v 1.3 2009/02/13 18:53:28 abs Exp $
+$NetBSD: patch-ab,v 1.4 2009/02/25 18:44:30 drochner Exp $
 
---- src/psgen.c.orig   2003-03-05 07:36:53.000000000 +0000
+--- src/psgen.c.orig   2003-03-05 08:36:53.000000000 +0100
 +++ src/psgen.c
-@@ -2034,8 +2034,9 @@ dump_ps_page_header (char *fname, int em
+@@ -24,6 +24,7 @@
+  * Boston, MA 02111-1307, USA.
+  */
+ 
++#include <limits.h>
+ #include "gsint.h"
+ 
+ /*
+@@ -124,7 +125,7 @@ struct gs_token_st
+         double xscale;
+         double yscale;
+         int llx, lly, urx, ury; /* Bounding box. */
+-        char filename[512];
++        char filename[PATH_MAX];
+         char *skipbuf;
+         unsigned int skipbuf_len;
+         unsigned int skipbuf_pos;
+@@ -135,11 +136,11 @@ struct gs_token_st
+       Color bgcolor;
+       struct
+       {
+-        char name[512];
++        char name[PATH_MAX];
+         FontPoint size;
+         InputEncoding encoding;
+       } font;
+-      char filename[512];
++      char filename[PATH_MAX];
+     } u;
+ };
+ 
+@@ -248,7 +249,7 @@ static int do_print = 1;
+ static int user_fontp = 0;
+ 
+ /* The user ^@font{}-defined font. */
+-static char user_font_name[256];
++static char user_font_name[PATH_MAX];
+ static FontPoint user_font_pt;
+ static InputEncoding user_font_encoding;
+ 
+@@ -978,7 +979,8 @@ large for page\n"),
+                       FATAL ((stderr,
+                               _("user font encoding can be only the system's default or `ps'")));
+ 
+-                    strcpy (user_font_name, token.u.font.name);
++                    memset  (user_font_name, 0, sizeof(user_font_name));
++                    strncpy (user_font_name, token.u.font.name, sizeof(user_font_name) - 1);
+                     user_font_pt.w = token.u.font.size.w;
+                     user_font_pt.h = token.u.font.size.h;
+                     user_font_encoding = token.u.font.encoding;
+@@ -1444,7 +1446,7 @@ read_special_escape (InputStream *is, To
+         buf[i] = ch;
+         if (i + 1 >= sizeof (buf))
+           FATAL ((stderr, _("too long argument for %s escape:\n%.*s"),
+-                  escapes[i].name, i, buf));
++                  escapes[e].name, i, buf));
+       }
+       buf[i] = '\0';
+ 
+@@ -1452,7 +1454,8 @@ read_special_escape (InputStream *is, To
+       switch (escapes[e].escape)
+       {
+       case ESC_FONT:
+-        strcpy (token->u.font.name, buf);
++        memset  (token->u.font.name, 0, sizeof(token->u.font.name));
++        strncpy (token->u.font.name, buf, sizeof(token->u.font.name) - 1);
+ 
+         /* Check for the default font. */
+         if (strcmp (token->u.font.name, "default") == 0)
+@@ -1465,7 +1468,8 @@ read_special_escape (InputStream *is, To
+               FATAL ((stderr, _("malformed font spec for ^@font escape: %s"),
+                       token->u.font.name));
+ 
+-            strcpy (token->u.font.name, cp);
++            memset  (token->u.font.name, 0, sizeof(token->u.font.name));
++            strncpy (token->u.font.name, cp, sizeof(token->u.font.name) - 1);
+             xfree (cp);
+           }
+         token->type = tFONT;
+@@ -1544,7 +1548,8 @@ read_special_escape (InputStream *is, To
+         break;
+ 
+       case ESC_SETFILENAME:
+-        strcpy (token->u.filename, buf);
++        memset  (token->u.filename, 0, sizeof(token->u.font.name));
++        strncpy (token->u.filename, buf, sizeof(token->u.filename) - 1);
+         token->type = tSETFILENAME;
+         break;
+ 
+@@ -2034,8 +2039,9 @@ dump_ps_page_header (char *fname, int em
    else
      {
        ftail++;
@@ -14,7 +103,7 @@
      }
  
    if (nup > 1)
-@@ -2385,9 +2386,10 @@ recognize_eps_file (Token *token)
+@@ -2385,9 +2391,10 @@ recognize_eps_file (Token *token)
    MESSAGE (2, (stderr, "^@epsf=\"%s\"\n", token->u.epsf.filename));
  
    i = strlen (token->u.epsf.filename);
@@ -26,7 +115,7 @@
        token->u.epsf.pipe = 1;
        token->u.epsf.filename[i - 1] = '\0';
        token->u.epsf.fp = popen (token->u.epsf.filename, "r");
-@@ -2400,6 +2402,7 @@ recognize_eps_file (Token *token)
+@@ -2400,6 +2407,7 @@ recognize_eps_file (Token *token)
        }
      }
    else



Home | Main Index | Thread Index | Old Index