[FFmpeg-cvslog] apedec: fix global array overread
Michael Niedermayer
git at videolan.org
Wed Mar 28 15:22:49 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Mar 28 10:30:44 2012 +0200| [8db2935db0caa8efbef009994920ef6a20289496] | committer: Michael Niedermayer
apedec: fix global array overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8db2935db0caa8efbef009994920ef6a20289496
---
libavcodec/apedec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 907f45f..4d0801b 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list