[93328] trunk/dports/textproc/unrtf

ryandesign at macports.org ryandesign at macports.org
Sun May 20 02:06:55 PDT 2012


Revision: 93328
          https://trac.macports.org/changeset/93328
Author:   ryandesign at macports.org
Date:     2012-05-20 02:06:54 -0700 (Sun, 20 May 2012)
Log Message:
-----------
unrtf: fix a bad memory dereference, and a compiler error with clang (#33119)

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

Added Paths:
-----------
    trunk/dports/textproc/unrtf/files/patch-src-attr.c.diff

Modified: trunk/dports/textproc/unrtf/Portfile
===================================================================
--- trunk/dports/textproc/unrtf/Portfile	2012-05-20 08:59:40 UTC (rev 93327)
+++ trunk/dports/textproc/unrtf/Portfile	2012-05-20 09:06:54 UTC (rev 93328)
@@ -5,6 +5,7 @@
 
 name                unrtf
 version             0.21.2
+revision            1
 categories          textproc
 license             GPL-3+
 platforms           darwin
@@ -25,7 +26,8 @@
 depends_lib         port:libiconv
 
 patchfiles          patch-configure.diff \
-                    patch-prefix.diff
+                    patch-prefix.diff \
+                    patch-src-attr.c.diff
 
 post-patch {
     reinplace "s|@PREFIX@|${prefix}|g" \

Added: trunk/dports/textproc/unrtf/files/patch-src-attr.c.diff
===================================================================
--- trunk/dports/textproc/unrtf/files/patch-src-attr.c.diff	                        (rev 0)
+++ trunk/dports/textproc/unrtf/files/patch-src-attr.c.diff	2012-05-20 09:06:54 UTC (rev 93328)
@@ -0,0 +1,21 @@
+https://savannah.gnu.org/bugs/?21721
+--- src/attr.c.orig	2008-11-09 01:01:19.000000000 -0600
++++ src/attr.c	2010-07-27 10:42:16.000000000 -0500
+@@ -350,7 +350,7 @@
+ 	AttrStack *stack = stack_of_stacks_top;
+ 	if (!stack) {
+ 		warning_handler("No stack to get attribute from");
+-		return;
++		return NULL;
+ 	}
+ 
+ 	i=stack->tos;
+@@ -572,7 +572,7 @@
+ 	while(prev_stack && prev_stack->next && prev_stack->next != stack)
+ 		prev_stack = prev_stack->next;
+ 
+-	if (prev_stack) {
++	if (prev_stack != stack) {
+ 		stack_of_stacks_top = prev_stack;
+ 		prev_stack->next = NULL;
+ 	} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120520/79327a95/attachment.html>


More information about the macports-changes mailing list