Browse Source

indeo3: validate new frame size before resetting decoder

tags/n0.11
Kostya Shishkov 13 years ago
parent
commit
6de226a2b8
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      libavcodec/indeo3.c

+ 8
- 0
libavcodec/indeo3.c View File

@@ -900,6 +900,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;



Loading…
Cancel
Save