aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-10-31 00:10:39 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-07 16:26:59 +0200
commited968f5290bb0fb2f679bfed0b7da6613b1d090e (patch)
tree14c81524e821a16d5bcc1e5ff88e8ad659cca99e
parentf2a206309e00200de0e75bb351be56571c2f6e70 (diff)
downloadffmpeg-ed968f5290bb0fb2f679bfed0b7da6613b1d090e.tar.gz
avformat/aiffdec: sanity check block_align
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 93f7776921ed8c5219732210067016c3457e864d) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/aiffdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 2f27baf46f..12469f5105 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -362,7 +362,7 @@ got_sound:
if (!st->codecpar->block_align && st->codecpar->codec_id == AV_CODEC_ID_QCELP) {
av_log(s, AV_LOG_WARNING, "qcelp without wave chunk, assuming full rate\n");
st->codecpar->block_align = 35;
- } else if (!st->codecpar->block_align) {
+ } else if (st->codecpar->block_align <= 0) {
av_log(s, AV_LOG_ERROR, "could not find COMM tag or invalid block_align value\n");
return -1;
}