mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
aiff: check block_align in aiff_read_packet
It can be unset in avcodec_parameters_from_context and a value of 0
causes SIGFPE crashes.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 93c39db5f1)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
@@ -367,6 +367,11 @@ static int aiff_read_packet(AVFormatContext *s,
|
||||
if (max_size <= 0)
|
||||
return AVERROR_EOF;
|
||||
|
||||
if (!st->codecpar->block_align) {
|
||||
av_log(s, AV_LOG_ERROR, "block_align not set\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
/* Now for that packet */
|
||||
switch (st->codecpar->codec_id) {
|
||||
case AV_CODEC_ID_ADPCM_IMA_QT:
|
||||
|
||||
Reference in New Issue
Block a user