The line # is old; the patch is not obsolete, it is just an incorrect fix. The internal rule is: if you return a char * that was the input buffer (answer) then it was big enough; if you return a different char *, you malloc'ed it and it needs to be freed. The bug in question was from someone naively returning a string constant from such a function. You are right that if there are other places that similarly return string constants, they need to be modified to follow the internal rule, by strcpy'ing themselves into the answer buffer and returning that.
Charles, I am sorry that I have been so bad at following the bug tracker. Hopefully I will get better, since I finally discovered how to have the bug tracker send me an e-mail whenever someone posts to it. E-mail is civilization. Clint ________________________________________ From: Charles Evans [cvev...@users.sourceforge.net] try my old (possibly obsolete) test patch: fwindow.r:2498: remove: if (p != answer) free(p); This only 'fixes' the one function that crashes gpxtest. IIRC many graphics functions are called from many places passing strings, some of which need to be freed, and are, and some that must not be freed, and are, thus the crash. I assume by the lack of related bugs that the affected functions are not often needed. Charles ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Unicon-group mailing list Unicon-group@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unicon-group ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Unicon-group mailing list Unicon-group@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unicon-group