[MPlayer-cvslog] r23568 - trunk/command.c
reimar
subversion at mplayerhq.hu
Sun Jun 17 10:26:07 CEST 2007
Author: reimar
Date: Sun Jun 17 10:26:07 2007
New Revision: 23568
Log:
Make sure we do not access demuxer->s_streams out of bounds
when invalid -sid is given
Modified:
trunk/command.c
Modified: trunk/command.c
==============================================================================
--- trunk/command.c (original)
+++ trunk/command.c Sun Jun 17 10:26:07 2007
@@ -1257,14 +1257,16 @@ static int mp_property_sub(m_option_t *
if (mpctx->stream->type != STREAMTYPE_DVD
&& mpctx->stream->type != STREAMTYPE_DVDNAV) {
int i = 0;
+ d_sub->sh = NULL;
for (d_sub->id = 0; d_sub->id < MAX_S_STREAMS; d_sub->id++) {
if (mpctx->demuxer->s_streams[d_sub->id]) {
- if (i == dvdsub_id)
+ if (i == dvdsub_id) {
+ d_sub->sh = mpctx->demuxer->s_streams[d_sub->id];
break;
+ }
i++;
}
}
- d_sub->sh = mpctx->demuxer->s_streams[d_sub->id];
}
if (mpctx->demuxer->type == DEMUXER_TYPE_MATROSKA)
d_sub->id = demux_mkv_change_subs(mpctx->demuxer, dvdsub_id);
More information about the MPlayer-cvslog
mailing list