[MPlayer-dev-eng] [PATCH] libbs2b audio filter

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Mar 23 20:23:03 CET 2009


On Mon, 2009-03-23 at 19:52 +0100, Reimar Döffinger wrote:
> On Mon, Mar 23, 2009 at 06:27:42PM +0300, Andrew Savchenko wrote:
> > IMO the best solution is to replace all occurences of 
> > malloc/calloc/realloc to their safe wrappers, e.g. 
> > xmalloc/xcalloc/xrealloc with return value check and fatal error 
> > message and exit() call if NULL is returned; if sane exit attempt 

> What is it supposed to gain? The error message? It's questionable if it
> will be possible to print it. I complained about the checks like you did

Better chance of distinguishing it from a random crash (and thus
avoiding useless debugging), and safer realloc behavior. *(type *)NULL
is pretty much guaranteed to "safely" segfault on all current platforms,
but ((type *)NULL)[BIGNUM] isn't.




More information about the MPlayer-dev-eng mailing list