On Thu, Mar 13, 2014 at 04:27:22PM +0100, Vittorio Giovara wrote:
> ---
>  libavcodec/sgidec.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
> index 91b68eb..bf717b0 100644
> --- a/libavcodec/sgidec.c
> +++ b/libavcodec/sgidec.c
> @@ -187,6 +187,13 @@ static int decode_frame(AVCodecContext *avctx,
>          return -1;
>      }
>  
> +    /* Check for supported image size. */
> +    if (avctx->width > 65535 || avctx->height > 65535) {
> +        av_log(avctx, AV_LOG_ERROR,
> +               "Unsupported resolution %dx%d\n", avctx->width, 
> avctx->height);
> +        return AVERROR_INVALIDDATA;
> +    }
> +
>      /* Check for supported image dimensions. */
>      if (dimension != 2 && dimension != 3) {
>          av_log(avctx, AV_LOG_ERROR, "wrong dimension number\n");
> -- 

looks stupid since it's read from 16-bit variables
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to