mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 21:45:10 +00:00
apedec: fix global array overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7a5e587249
commit
8db2935db0
@ -217,7 +217,7 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
|
||||
|
||||
av_log(avctx, AV_LOG_DEBUG, "Compression Level: %d - Flags: %d\n",
|
||||
s->compression_level, s->flags);
|
||||
if (s->compression_level % 1000 || s->compression_level > COMPRESSION_LEVEL_INSANE) {
|
||||
if (s->compression_level % 1000 || s->compression_level > COMPRESSION_LEVEL_INSANE || !s->compression_level) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Incorrect compression level %d\n",
|
||||
s->compression_level);
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
Loading…
Reference in New Issue
Block a user