Skip to content

Commit

Permalink
Merge commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9'
Browse files Browse the repository at this point in the history
* commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9':
  matroskadec: Verify realaudio codec parameters

Merged-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Sep 17, 2013
2 parents 7163bbe + 569d18a commit 2c8d876
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libavformat/matroskadec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2c8d876

Please sign in to comment.