diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2012-05-14 19:46:54 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-10-06 08:43:43 +0200 |
commit | d4f3abca6a76f322d0b8c5e90dd0368efdf58821 (patch) | |
tree | 70be3b2d04ae2a8c067f1eba2a9da54854aa48a3 /libavcodec | |
parent | e5f4e249422834f727bcd432b73af971277f1371 (diff) | |
download | ffmpeg-d4f3abca6a76f322d0b8c5e90dd0368efdf58821.tar.gz |
indeo3: validate new frame size before resetting decoder
(cherry picked from commit 6de226a2b8b703abc823f18c3fd7f39a0787aeb5)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/indeo3.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 55b4ec7a7a..b7ef9e5241 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -895,6 +895,14 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, av_dlog(avctx, "Frame dimensions changed!\n"); + if (width < 16 || width > 640 || + height < 16 || height > 480 || + width & 3 || height & 3) { + av_log(avctx, AV_LOG_ERROR, + "Invalid picture dimensions: %d x %d!\n", width, height); + return AVERROR_INVALIDDATA; + } + ctx->width = width; ctx->height = height; |