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

Vladimir Voroshilov voroshil at gmail.com
Sun Jan 7 19:46:47 CET 2007


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.

-- 
Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tv_avoid_uninit_free2.patch
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070108/08058de9/attachment.asc>


More information about the MPlayer-dev-eng mailing list