[79146] trunk/dports/devel/t1lib

dports at macports.org dports at macports.org
Fri Jun 3 00:22:25 PDT 2011


Revision: 79146
          http://trac.macports.org/changeset/79146
Author:   dports at macports.org
Date:     2011-06-03 00:22:23 -0700 (Fri, 03 Jun 2011)
Log Message:
-----------
t1lib: add patch to fix buffer overflow vulnerability (#29631)

Modified Paths:
--------------
    trunk/dports/devel/t1lib/Portfile

Added Paths:
-----------
    trunk/dports/devel/t1lib/files/
    trunk/dports/devel/t1lib/files/patch-01-buffer-limit

Modified: trunk/dports/devel/t1lib/Portfile
===================================================================
--- trunk/dports/devel/t1lib/Portfile	2011-06-03 03:10:33 UTC (rev 79145)
+++ trunk/dports/devel/t1lib/Portfile	2011-06-03 07:22:23 UTC (rev 79146)
@@ -5,7 +5,7 @@
 
 name                t1lib
 version             5.1.2
-revision            1
+revision            2
 categories          devel graphics fonts
 maintainers         nomaintainer
 
@@ -27,6 +27,8 @@
                     sha1 4b4fc22c8688eefaaa8cfc990f0039f95f4287de \
                     rmd160 ab22aea390356750d743c0f4b08762aa76ca2a82
 
+patchfiles          patch-01-buffer-limit
+
 configure.args      --without-x
 
 depends_build       path:bin/glibtool:libtool

Added: trunk/dports/devel/t1lib/files/patch-01-buffer-limit
===================================================================
--- trunk/dports/devel/t1lib/files/patch-01-buffer-limit	                        (rev 0)
+++ trunk/dports/devel/t1lib/files/patch-01-buffer-limit	2011-06-03 07:22:23 UTC (rev 79146)
@@ -0,0 +1,31 @@
+diff -ur t1lib-5.1.2.orig/lib/t1lib/parseAFM.c t1lib-5.1.2/lib/t1lib/parseAFM.c
+--- lib/t1lib/parseAFM.c	2007-12-23 16:49:42.000000000 +0100
++++ lib/t1lib/parseAFM.c	2011-04-13 20:48:00.000000000 +0200
+@@ -179,6 +179,8 @@
+ 
+ /*************************** PARSING ROUTINES **************/ 
+   
++#define MAX_NAME_1 MAX_NAME-1   /* check for buffer overflow */
++
+ /*************************** token *************************/
+ 
+ /*  A "AFM File Conventions" tokenizer. That means that it will
+@@ -198,7 +200,8 @@
+     
+     idx = 0;
+     
+-    while (ch != EOF && ch != ' ' && ch != CR  && ch != LF &&
++    while (idx < MAX_NAME_1 &&
++	   ch != EOF && ch != ' ' && ch != CR  && ch != LF &&
+ 	   ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'){
+       ident[idx++] = ch;
+       ch = fgetc(stream);
+@@ -235,7 +238,7 @@
+     while ((ch = fgetc(stream)) == ' ' || ch == '\t' ); 
+     
+     idx = 0;
+-    while (ch != EOF && ch != CR  && ch != LF && ch != CTRL_Z) 
++    while (idx < MAX_NAME_1 && ch != EOF && ch != CR  && ch != LF && ch != CTRL_Z) 
+     {
+         ident[idx++] = ch;
+         ch = fgetc(stream);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110603/11ff41f2/attachment.html>


More information about the macports-changes mailing list