Commit 2c8d876d authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '569d18aa'

* commit '569d18aa':
  matroskadec: Verify realaudio codec parameters
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 7163bbef 569d18aa
...@@ -1766,6 +1766,10 @@ static int matroska_read_header(AVFormatContext *s) ...@@ -1766,6 +1766,10 @@ static int matroska_read_header(AVFormatContext *s)
track->audio.sub_packet_h = avio_rb16(&b); track->audio.sub_packet_h = avio_rb16(&b);
track->audio.frame_size = avio_rb16(&b); track->audio.frame_size = avio_rb16(&b);
track->audio.sub_packet_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); track->audio.buf = av_malloc(track->audio.frame_size * track->audio.sub_packet_h);
if (codec_id == AV_CODEC_ID_RA_288) { if (codec_id == AV_CODEC_ID_RA_288) {
st->codec->block_align = track->audio.coded_framesize; st->codec->block_align = track->audio.coded_framesize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment