Skip to content
Snippets Groups Projects
Commit 6de226a2 authored by Kostya Shishkov's avatar Kostya Shishkov
Browse files

indeo3: validate new frame size before resetting decoder

parent bc00da27
No related branches found
No related tags found
No related merge requests found
...@@ -900,6 +900,14 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, ...@@ -900,6 +900,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment