On 06/21/2013 03:26 PM, Nicolas Bertrand wrote:
> From: Michael Niedermayer <[email protected]>
> 
> Fixes out of array accesses
> 
> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> Signed-off-by: Michael Niedermayer <[email protected]>
> ---
>  libavcodec/jpeg2000dec.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> index 038ab4f..45396d0 100644
> --- a/libavcodec/jpeg2000dec.c
> +++ b/libavcodec/jpeg2000dec.c
> @@ -432,6 +432,11 @@ static int get_sot(Jpeg2000DecoderContext *s, int n)
>      /* Read TNSot but not used */
>      bytestream2_get_byteu(&s->g);               // TNsot
>  
> +    if (TPsot >= FF_ARRAY_ELEMS(s->tile[s->curtileno].tile_part)) {
> +        av_log(s->avctx, AV_LOG_ERROR, "TPsot %d too big\n", TPsot);
> +        return AVERROR_PATCHWELCOME;
> +    }

Why patch is welcome? Is it a missing feature? Do we need/have samples?

lu

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to