]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/atrac3.c
avcodec/atrac1: Cleanup generically after init failure
[ffmpeg] / libavcodec / atrac3.c
index 6cdcdf19644e8f613a9aa3e534dd804126df50a6..067aa23f1fa7ba993b0f831b51f98f9767646890 100644 (file)
@@ -964,7 +964,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
         return AVERROR_INVALIDDATA;
     }
 
-    if (avctx->block_align >= UINT_MAX / 2)
+    if (avctx->block_align > 1024 || avctx->block_align <= 0)
         return AVERROR(EINVAL);
 
     q->decoded_bytes_buffer = av_mallocz(FFALIGN(avctx->block_align, 4) +