On Sun, Jun 30, 2013 at 06:26:16PM +0200, Luca Barbato wrote:
> Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> CC: [email protected]
> ---
>  libavcodec/indeo5.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
> index dc5f6f0..d731c4b 100644
> --- a/libavcodec/indeo5.c
> +++ b/libavcodec/indeo5.c
> @@ -520,6 +520,12 @@ static int decode_mb_info(IVI45DecContext *ctx, 
> IVIBandDesc *band,
>                          mv_x += IVI_TOSIGNED(mv_delta);
>                          mb->mv_x = mv_x;
>                          mb->mv_y = mv_y;
> +                        if (mv_x < 0 || mv_y < 0) {
> +                            av_log(avctx, AV_LOG_ERROR, "Invalid mv %d %d\n",
> +                                   mv_x, mv_y);
> +                            mb->mv_x = mb->mv_y = 0;
> +                            return AVERROR_INVALIDDATA;
> +                        }
>                      }
>                  }
>              }
> -- 

I'd use "Invalid MV %d,%d\n" but otherwise looks OK
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to