[FFmpeg-cvslog] cljr: fix buf_size sanity check
Paul B. Mahol
git at videolan.org
Tue Dec 20 04:18:09 CET 2011
ffmpeg | branch: master | Paul B. Mahol <onemda at gmail.com> | Sat Dec 17 17:58:06 2011 +0000| [2e7905eee8d0f8813e703cacdd7b3ffdc4960656] | committer: Janne Grunau
cljr: fix buf_size sanity check
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e7905eee8d0f8813e703cacdd7b3ffdc4960656
---
libavcodec/cljr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index f40d4d1..cf307bb 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -62,7 +62,7 @@ static int decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
- if (buf_size / avctx->height < avctx->width) {
+ if (buf_size < avctx->height * avctx->width) {
av_log(avctx, AV_LOG_ERROR,
"Resolution larger than buffer size. Invalid header?\n");
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list