indeo3: validate new frame size before resetting decoder
(cherry picked from commit 6de226a2b8b703abc823f18c3fd7f39a0787aeb5) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
parent
e5f4e24942
commit
d4f3abca6a
@ -895,6 +895,14 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
|||||||
|
|
||||||
av_dlog(avctx, "Frame dimensions changed!\n");
|
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->width = width;
|
||||||
ctx->height = height;
|
ctx->height = height;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user