lvqcl wrote: > libFLAC has several places like this: > > if(0 == (ptr = realloc(ptr, size))) > return false; > > which results in memory leaks if realloc fails (the old value of ptr is lost). > The patch should fix this.
I found a problem with this patch. Specifcally, where ever the patch tries to free() the old pointer where safe_realloc_mul_2op_() fails, can result in a double free(). This is because, when safe_realloc_mul_2op_() has either of its size arguments equal to zero, will call realloc(ptr, 0) which according to the realloc manpage is an implicit free() anyway. Working on a fix for this and re-visiting some of this realloc() stuff. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/ _______________________________________________ flac-dev mailing list [email protected] http://lists.xiph.org/mailman/listinfo/flac-dev
