# HG changeset patch # User reimar # Date 1352238523 0 # Node ID 5816c9e25d29668fe00e679b76a6b658d72e385d # Parent 7b3252fa77616ca2df3a54ed0dcde4f385cf2f7f Error out if an invalid channel list name was specified instead of continuing and reading outside array bounds all over the place. diff -r 7b3252fa7761 -r 5816c9e25d29 stream/tv.c --- a/stream/tv.c Tue Nov 06 21:37:49 2012 +0000 +++ b/stream/tv.c Tue Nov 06 21:48:43 2012 +0000 @@ -551,10 +551,11 @@ } } - 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);