[MPlayer-dev-eng] Re: [PATCH] Avoid freeing of unallocated memory in tv.c

Guillaume POIRIER poirierg at gmail.com
Sun Jan 7 20:40:01 CET 2007


Hi,

On 1/7/07, Vladimir Voroshilov <voroshil at gmail.com> wrote:
> 2007/1/2, Vladimir Voroshilov <voroshil at gmail.com>:
> >
> > Hi, All
> > I have found small bug in tv.c.
> > If tvi_init_* function return NULL (e.g. fails to initialize driver)
> > demuxer->priv  will not point to allocated memory, but demux_close_tv does not
> > check this case and MPLayer will crash.
> > Attached trivial patch fixes this.
> Did anybody look on this patch?
>
> I have found another similar bug in tv.c: if start method of tvi_*
> driver return 0 (meaning start failure) this cause call to driver's
> uninit function twice. The result is crash of MPayer.
>
> Attached patch fixes both issues. For second issue it just prevents
> double call to uninit.

The patch looks Ok to me. I don't think there's a maintainer for that
part of MPlayer, so if you apply your patch fix whatever it fixes
afterwards, then I'd say go ahead and apply ;)

Guillaume
-- 
An association of men who will not quarrel with one another is a thing
which has never yet existed, from the greatest confederacy of nations
down to a town meeting or a vestry.
 -- Thomas Jefferson
(when interviewed about MPlayer ML flamewars)
http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html



More information about the MPlayer-dev-eng mailing list