[FFmpeg-cvslog] avformat/aiffdec: sanity check block_align

Michael Niedermayer git at videolan.org
Fri Apr 8 01:30:51 EEST 2022


ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Sun Oct 31 00:10:39 2021 +0200| [ed968f5290bb0fb2f679bfed0b7da6613b1d090e] | committer: Michael Niedermayer

avformat/aiffdec: sanity check block_align

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 93f7776921ed8c5219732210067016c3457e864d)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ed968f5290bb0fb2f679bfed0b7da6613b1d090e
---

 libavformat/aiffdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
     }



More information about the ffmpeg-cvslog mailing list