diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-15 20:51:00 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-15 21:28:54 +0100 |
commit | 5f95c130a020ec8f6eb7ade8808f59dac5834410 (patch) | |
tree | 9bf1694d1f28370a1b6460a0821f69d0bcf397d9 /libavformat/mov.c | |
parent | 4255d6d96cb80fd411c858d424626f60b97f52ac (diff) | |
download | ffmpeg-5f95c130a020ec8f6eb7ade8808f59dac5834410.tar.gz |
mov: Fix near infinite loop in stsd parsing.
Fixes Ticket768
Bug found by: Diana Elena Muscalu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 7b41ec4414..38248d45a2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1082,6 +1082,9 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) avio_rb32(pb); /* reserved */ avio_rb16(pb); /* reserved */ dref_id = avio_rb16(pb); + }else if (size <= 0){ + av_log(c->fc, AV_LOG_ERROR, "invalid size %d in stsd\n", size); + return -1; } if (st->codec->codec_tag && |