X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Frv30.c;h=1483107c665a4750cd132d7eeb29b9edf77a7884;hp=fd8fd4f98741113ac53d6e15e00114a467870f57;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/rv30.c b/ffmpeg/libavcodec/rv30.c index fd8fd4f..1483107 100644 --- a/ffmpeg/libavcodec/rv30.c +++ b/ffmpeg/libavcodec/rv30.c @@ -259,13 +259,13 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) RV34DecContext *r = avctx->priv_data; int ret; + if (avctx->extradata_size < 2) { + av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n"); + return AVERROR(EINVAL); + } r->rv30 = 1; if ((ret = ff_rv34_decode_init(avctx)) < 0) return ret; - if(avctx->extradata_size < 2){ - av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n"); - return -1; - } r->max_rpr = avctx->extradata[1] & 7; if(avctx->extradata_size < 2*r->max_rpr + 8){