Browse Source

vcr1: check if dimensions are supported, fix out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
845724c82c
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/vcr1.c

+ 4
- 0
libavcodec/vcr1.c View File

@@ -50,6 +50,10 @@ static av_cold int vcr1_decode_init(AVCodecContext *avctx)

avctx->pix_fmt = AV_PIX_FMT_YUV410P;

if (avctx->width % 8 || avctx->height%4) {
av_log_ask_for_sample(avctx, "odd dimensions are not supported\n");
return AVERROR_PATCHWELCOME;
}
return 0;
}



Loading…
Cancel
Save