2 Jan 2007 10:31
[PATCH] Avoid freeing of unallocated memory in tv.c
Vladimir Voroshilov <voroshil <at> gmail.com>
2007-01-02 09:31:42 GMT
2007-01-02 09:31:42 GMT
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. -- Regards, Vladimir Voroshilov mailto:voroshil <at> gmail.com Omsk State University JID: voroshil <at> jabber.ru ICQ: 95587719
Index: tv.c
===================================================================
--- tv.c (revision 21808)
+++ tv.c (working copy)
<at> <at> -480,6 +480,7 <at> <at>
sh_audio_t *sh_audio = NULL;
tvi_functions_t *funcs;
+ demuxer->priv=NULL;
if(!(tvh=tv_begin())) return NULL;
if (!tv_init(tvh)) return NULL;
if (!open_tv(tvh)){
<at> <at> -625,7 +626,9 <at> <at>
static void demux_close_tv(demuxer_t *demuxer)
(Continue reading)
RSS Feed