Originally committed as revision 16157 to svn://svn.ffmpeg.org/ffmpeg/trunk
Laurent Aimar authored on 2008/12/16 08:01:54... | ... |
@@ -527,6 +527,11 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) |
527 | 527 |
MpegEncContext *s = avctx->priv_data; |
528 | 528 |
static int done=0; |
529 | 529 |
|
530 |
+ if (avctx->extradata_size < 8) { |
|
531 |
+ av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n"); |
|
532 |
+ return -1; |
|
533 |
+ } |
|
534 |
+ |
|
530 | 535 |
MPV_decode_defaults(s); |
531 | 536 |
|
532 | 537 |
s->avctx= avctx; |