ports/devel/cxref/files/patch-af
Will Andrews f0135a326e Fix malloc problem.
PR:		47039
Submitted by:	Chris Knight <chris@aims.com.au>,
		"Simon 'corecode' Schubert" <corecode@corecode.ath.cx>
2003-06-12 04:33:33 +00:00

16 lines
435 B
Text

--- comment.c.orig Tue Nov 16 20:11:38 1999
+++ comment.c Tue Jan 14 16:17:17 2003
@@ -158,8 +158,11 @@
if(comment)
{
- malloc_comment=Realloc(malloc_comment,strlen(comment)+1);
- strcpy(malloc_comment,comment);
+ if(malloc_comment != comment)
+ {
+ malloc_comment=Realloc(malloc_comment,strlen(comment)+1);
+ strcpy(malloc_comment,comment);
+ }
current_comment=malloc_comment;
}
else