diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-17 15:21:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-17 15:25:45 +0200 |
commit | 2c8d876dea153b387c57d9ec5809780c21414b84 (patch) | |
tree | 335de186ba45f183f4a2aed0db027a055d271e3c | |
parent | 7163bbefa26d634eae7bac8f0d891f2bca270eb9 (diff) | |
parent | 569d18aa9dc989c37bb4d4b968026fe5afa6fff9 (diff) | |
download | ffmpeg-2c8d876dea153b387c57d9ec5809780c21414b84.tar.gz |
Merge commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9'
* commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9':
matroskadec: Verify realaudio codec parameters
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 86351df76d..76c610b214 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1766,6 +1766,10 @@ static int matroska_read_header(AVFormatContext *s) track->audio.sub_packet_h = avio_rb16(&b); track->audio.frame_size = avio_rb16(&b); track->audio.sub_packet_size = avio_rb16(&b); + if (flavor <= 0 || track->audio.coded_framesize <= 0 || + track->audio.sub_packet_h <= 0 || track->audio.frame_size <= 0 || + track->audio.sub_packet_size <= 0) + return AVERROR_INVALIDDATA; track->audio.buf = av_malloc(track->audio.frame_size * track->audio.sub_packet_h); if (codec_id == AV_CODEC_ID_RA_288) { st->codec->block_align = track->audio.coded_framesize; |