[41031] trunk/dports/textproc/recode

blb at macports.org blb at macports.org
Tue Oct 21 00:29:53 PDT 2008


Revision: 41031
          http://trac.macports.org/changeset/41031
Author:   blb at macports.org
Date:     2008-10-21 00:29:52 -0700 (Tue, 21 Oct 2008)
Log Message:
-----------
textproc/recode - fix infinite loop when processing UTF8, ticket #10117

Modified Paths:
--------------
    trunk/dports/textproc/recode/Portfile

Added Paths:
-----------
    trunk/dports/textproc/recode/files/patch-src_libiconv.c.diff

Modified: trunk/dports/textproc/recode/Portfile
===================================================================
--- trunk/dports/textproc/recode/Portfile	2008-10-21 07:27:26 UTC (rev 41030)
+++ trunk/dports/textproc/recode/Portfile	2008-10-21 07:29:52 UTC (rev 41031)
@@ -4,7 +4,7 @@
 
 name            recode
 version         3.6
-revision        2
+revision        3
 categories      textproc
 maintainers     nomaintainer
 platforms       darwin
@@ -25,7 +25,9 @@
 
 depends_lib     port:libtool port:gettext
 
-patchfiles      patch-lib_Makefile.in.diff
+# src/libiconv.c patch from Debian,
+# http://packages.debian.org/stable/text/recode
+patchfiles      patch-lib_Makefile.in.diff patch-src_libiconv.c.diff
 
 pre-configure {
     copy -force ${prefix}/share/libtool/config.guess ${prefix}/share/libtool/config.sub ${worksrcpath}

Added: trunk/dports/textproc/recode/files/patch-src_libiconv.c.diff
===================================================================
--- trunk/dports/textproc/recode/files/patch-src_libiconv.c.diff	                        (rev 0)
+++ trunk/dports/textproc/recode/files/patch-src_libiconv.c.diff	2008-10-21 07:29:52 UTC (rev 41031)
@@ -0,0 +1,32 @@
+--- src/libiconv.c.orig	2000-07-01 11:13:25.000000000 -0600
++++ src/libiconv.c	2008-10-21 01:24:40.000000000 -0600
+@@ -1,5 +1,5 @@
+ /* Conversion of files between different charsets and surfaces.
+-   Copyright \xA9 1999, 2000 Free Software Foundation, Inc.
++   Copyright \xA9 1999, 2000, 2001 Free Software Foundation, Inc.
+    Contributed by Fran\xE7ois Pinard <pinard at iro.umontreal.ca>, 1999,
+    and Bruno Haible <haible at clisp.cons.org>, 2000.
+ 
+@@ -195,12 +195,17 @@
+ 	 memcpy() doesn't do here, because the regions might overlap.
+ 	 memmove() isn't worth it, because we rarely have to move more
+ 	 than 12 bytes.  */
+-      if (input > input_buffer && input_left > 0)
++      cursor = input_buffer;
++      if (input_left > 0)
+ 	{
+-	  cursor = input_buffer;
+-	  do
+-	    *cursor++ = *input++;
+-	  while (--input_left > 0);
++	  if (input > input_buffer)
++	    {
++	      do
++		*cursor++ = *input++;
++	      while (--input_left > 0);
++	    }
++	  else
++	    cursor += input_left;
+ 	}
+     }
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20081021/1c9fdd87/attachment.html 


More information about the macports-changes mailing list