summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-28 16:43:01 +0000
committermosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-28 16:43:01 +0000
commit32c0500f973910b5bb1834fdf4045e569a1e78a3 (patch)
tree240d4d1553f296fbb641e60a5ad3a981c93a99c0
parent65b530e4e91d94a6f87d084a83171e5800dafdc1 (diff)
downloadmpv-32c0500f973910b5bb1834fdf4045e569a1e78a3.tar.bz2
mpv-32c0500f973910b5bb1834fdf4045e569a1e78a3.tar.xz
Do not dereference NULL if no track could be found for a block.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12722 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/demux_mkv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c
index 1c07ca2696..4aff2abd61 100644
--- a/libmpdemux/demux_mkv.c
+++ b/libmpdemux/demux_mkv.c
@@ -2704,8 +2704,15 @@ handle_block (demuxer_t *demuxer, uint8_t *block, uint64_t length,
clear_subtitles(demuxer, tc, 0);
for (i=0; i<mkv_d->num_tracks; i++)
- if (mkv_d->tracks[i]->tnum == num)
+ if (mkv_d->tracks[i]->tnum == num) {
track = mkv_d->tracks[i];
+ break;
+ }
+ if (track == NULL)
+ {
+ free(lace_size);
+ return 1;
+ }
if (num == demuxer->audio->id)
{
ds = demuxer->audio;