[MPlayer-cvslog] r35364 - trunk/stream/tv.c

reimar subversion at mplayerhq.hu
Tue Nov 6 22:48:43 CET 2012


Author: reimar
Date: Tue Nov  6 22:48:43 2012
New Revision: 35364

Log:
Error out if an invalid channel list name was specified
instead of continuing and reading outside array bounds
all over the place.

Modified:
   trunk/stream/tv.c

Modified: trunk/stream/tv.c
==============================================================================
--- trunk/stream/tv.c	Tue Nov  6 22:37:49 2012	(r35363)
+++ trunk/stream/tv.c	Tue Nov  6 22:48:43 2012	(r35364)
@@ -551,10 +551,11 @@ static int open_tv(tvi_handle_t *tvh)
 	}
     }
 
-    if (tvh->chanlist == -1)
+    if (tvh->chanlist == -1) {
 	mp_msg(MSGT_TV, MSGL_WARN, MSGTR_TV_UnableFindChanlist,
 	    tvh->tv_param->chanlist);
-    else
+        return 0;
+    } else
 	mp_msg(MSGT_TV, MSGL_V, "Selected channel list: %s (including %d channels)\n",
 	    chanlists[tvh->chanlist].name, chanlists[tvh->chanlist].count);
 


More information about the MPlayer-cvslog mailing list