Re: Fix for memory corruption in yuvdeinterlace

"Steven M. Schultz" <[email protected]> Wed, 10 Oct 2007 06:18:11 -0700 (PDT)
Newsgroups gmane.comp.video.mjpeg.devel
Message-ID <[email protected]>

On Wed, 10 Oct 2007, Stefan M. Fendt wrote:

> (Joking:) If this happens, we really should consider some "#if/#ifdef
> OSX", shouldn't we? We just let it drop over some places by chance in
> the code making it more readable *VBG* and everyone is happy :-))))))

	No.  If a program crashes because an invalid pointer is being 
	passed into free() then the program is wrong.  The fact that some
	(g)libc implementatins do not crash (but silently corrupt the
	malloc area) does not mean the progra is correct.

	What _was_ happending was something like this:

	    a = malloc(num) + N;
	    ...
	    free(a-N);

	and that is wrong - overshoot for speed purposes or not.

	   a = malloc(num + N):
	   free(a);

	does not crash or corrupt things ;)

> hmm.... Would you mind to be the guinea pig, then? (We probably should
> not conterminate CVS with it before this is fixed?)
	
	CVS is supposed to be changing - as long as someone is actively
	fixing things then a _temporary_ breakage is not too bad.

	Steven Schultz


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/