Menu

#35 Fix segfailts in BLT3.0 in Blt_Realloc

open
nobody
None
5
2010-03-16
2010-03-16
Anonymous
No

It fixes the segfaults http://sourceforge.net/tracker/index.php?func=detail&aid=2970753&group_id=18616&atid=118616 and may depend on implementation of TclpRealloc. At least bug reproduced in tcl-8.5.5. To fix it set a check for reallocation calls with zero length.

(src/bltAlloc.c)

void *
Blt_Realloc(void *ptr, size_t size)
{
if (size == 0) { size = 1 ; }
return (*bltReallocPtr)(ptr, size);
}

Discussion


Log in to post a comment.