[50470] trunk/dports/graphics/optipng

vinc17 at macports.org vinc17 at macports.org
Fri May 1 05:57:06 PDT 2009


Revision: 50470
          http://trac.macports.org/changeset/50470
Author:   vinc17 at macports.org
Date:     2009-05-01 05:57:06 -0700 (Fri, 01 May 2009)
Log Message:
-----------
optipng: upstream security patch. Closes #19498.

Modified Paths:
--------------
    trunk/dports/graphics/optipng/Portfile

Added Paths:
-----------
    trunk/dports/graphics/optipng/files/
    trunk/dports/graphics/optipng/files/optipng-0.6.2.1.diff

Modified: trunk/dports/graphics/optipng/Portfile
===================================================================
--- trunk/dports/graphics/optipng/Portfile	2009-05-01 12:53:17 UTC (rev 50469)
+++ trunk/dports/graphics/optipng/Portfile	2009-05-01 12:57:06 UTC (rev 50470)
@@ -4,6 +4,7 @@
 
 name            optipng
 version         0.6.2
+revision        1
 categories      graphics
 maintainers     vincent-opdarw at vinc17.org
 description     PNG file optimizer
@@ -26,6 +27,9 @@
 
 # Doesn't depend on libpng or zlib since it uses its own, modified versions
 
+patch.pre_args  -p1
+patchfiles      optipng-0.6.2.1.diff
+
 # Make sure gmake 3.81+ is used, as scripts/gcc.mak needs POSIX
 # backslash-newline sequence compatibility.
 depends_build   port:gmake

Added: trunk/dports/graphics/optipng/files/optipng-0.6.2.1.diff
===================================================================
--- trunk/dports/graphics/optipng/files/optipng-0.6.2.1.diff	                        (rev 0)
+++ trunk/dports/graphics/optipng/files/optipng-0.6.2.1.diff	2009-05-01 12:57:06 UTC (rev 50470)
@@ -0,0 +1,57 @@
+diff -ru optipng-0.6.2/lib/pngxtern/gif/gifread.c optipng-0.6.2.1/lib/pngxtern/gif/gifread.c
+--- optipng-0.6.2/lib/pngxtern/gif/gifread.c	2006-08-10 20:17:00.000000000 -0400
++++ optipng-0.6.2.1/lib/pngxtern/gif/gifread.c	2009-02-20 03:11:00.000000000 -0500
+@@ -219,8 +219,7 @@
+  **/
+ static void GIFReadNextExtension(struct GIFExtension *ext, FILE *stream)
+ {
+-    unsigned char *ptr;
+-    unsigned int len;
++    unsigned int offset, len;
+     int count, label;
+ 
+     GIF_FGETC(label, stream);
+@@ -233,7 +232,7 @@
+         return;
+     }
+ 
+-    ptr = ext->Buffer;
++    offset = 0;
+     len = ext->BufferSize;
+     for ( ;; )
+     {
+@@ -243,10 +242,10 @@
+             ext->BufferSize += 1024;
+             ext->Buffer = realloc(ext->Buffer, ext->BufferSize);
+         }
+-        count = ReadDataBlock(ptr, stream);
++        count = ReadDataBlock(ext->Buffer + offset, stream);
+         if (count == 0)
+             break;
+-        ptr += count;
++        offset += count;
+         len -= count;
+     }
+ }
+diff -ru optipng-0.6.2/src/optipng.c optipng-0.6.2.1/src/optipng.c
+--- optipng-0.6.2/src/optipng.c	2008-11-09 23:56:00.000000000 -0500
++++ optipng-0.6.2.1/src/optipng.c	2008-11-11 13:57:00.000000000 -0500
+@@ -542,6 +542,7 @@
+ static void
+ app_init(void)
+ {
++    setvbuf(stdout, NULL, _IONBF, 0);
+     if (options.log_name != NULL)
+     {
+         /* Open the log file, line-buffered. */
+diff -ru optipng-0.6.2/src/proginfo.h optipng-0.6.2.1/src/proginfo.h
+--- optipng-0.6.2/src/proginfo.h	2008-11-09 23:56:00.000000000 -0500
++++ optipng-0.6.2.1/src/proginfo.h	2009-02-22 23:38:00.000000000 -0500
+@@ -1,5 +1,5 @@
+ #define PROGRAM_NAME        "OptiPNG"
+ #define PROGRAM_DESCRIPTION "Advanced PNG optimizer"
+-#define PROGRAM_VERSION     "0.6.2"
+-#define PROGRAM_COPYRIGHT   "Copyright (C) 2001-2008 Cosmin Truta"
++#define PROGRAM_VERSION     "0.6.2.1"
++#define PROGRAM_COPYRIGHT   "Copyright (C) 2001-2009 Cosmin Truta"
+ #define PROGRAM_URI         "http://optipng.sourceforge.net/"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090501/bd3220ed/attachment.html>


More information about the macports-changes mailing list