mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 10:15:22 +00:00
matroskadec: Verify realaudio codec parameters
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 569d18aa9d
)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
9272aa4698
commit
9f7a8b8f8f
@ -1580,6 +1580,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;
|
||||
|
Loading…
Reference in New Issue
Block a user