On Tue, Apr 16, 2013 at 03:19:33PM +0200, Anton Khirnov wrote:
> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> CC:[email protected]
> ---
> libavcodec/rv10.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
> index 427cbbc..781c0d5 100644
> --- a/libavcodec/rv10.c
> +++ b/libavcodec/rv10.c
> @@ -346,6 +346,11 @@ static int rv20_decode_picture_header(RVDecContext *rv)
> f = get_bits(&s->gb, rpr_bits);
>
> if (f) {
> + if (s->avctx->extradata_size < 7 + 2 * f) {
not 8?
> + av_log(s->avctx, AV_LOG_ERROR, "Extradata too small.\n");
> + return AVERROR_INVALIDDATA;
> + }
> +
> new_w = 4 * ((uint8_t*)s->avctx->extradata)[6 + 2 * f];
> new_h = 4 * ((uint8_t*)s->avctx->extradata)[7 + 2 * f];
> } else {
> --
otherwise looks OK
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel