tsp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tsp-devel] xmlStrcat makes Targa core.


From: Frederik Deweerdt
Subject: Re: [Tsp-devel] xmlStrcat makes Targa core.
Date: Wed, 14 Nov 2007 23:16:05 +0100
User-agent: Mutt/1.5.12-2006-07-14

On Wed, Nov 14, 2007 at 10:32:08PM +0100, Stef Euskadi wrote:
> Agur,
> 
> Since my last cvs update and the use of xmlStrcat instead of the
> native C strcat
> function
> in the gdisp_xml.c file, Targa systematically crashes and produces a core
> file when exiting.
I hit the bug yesterday, but did not have time to dig any further.
> 
> I have taken a look at the source code of the XML2 library and I have
> discovered that the
> xmlStrcat function behaviour is completely different from the one of the
> native C function strcat.
> 
> xmlStrcat(string1, string2) does not put string2 at the end of string1.
Indeed, a similar functionality could be reached with
string1 = xmlStrcat(string1, string2);
But the problem is that the strings need to be allocated using the
libxml functions (xmlCharStrDup). That's because the string is
reallocate()'d which fails with the statically allocated arrays targa
uses.
> 
> ==>>  I go back to strcat function in the code.
strcat(BAD_CAST dest, BAD_CAST src); then ? :)

Frederik




reply via email to

[Prev in Thread] Current Thread [Next in Thread]