Anton Khirnov <[email protected]> writes:

> From: Nir Ben David <[email protected]>
>
> Signed-off-by: Anton Khirnov <[email protected]>
> ---
>  libavcodec/golomb.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
> index 503aa14..d8a1e06 100644
> --- a/libavcodec/golomb.h
> +++ b/libavcodec/golomb.h
> @@ -302,6 +302,8 @@ static inline int get_ur_golomb_jpegls(GetBitContext *gb, 
> int k, int limit, int
>      }else{
>          int i;
>          for(i=0; SHOW_UBITS(re, gb, 1) == 0; i++){
> +            if (get_bits_left(gb) <= 0)
> +                return -1;
>              LAST_SKIP_BITS(re, gb, 1);
>              UPDATE_CACHE(re, gb);
>          }
> -- 

This is wrong.  get_bits_left() doesn't work in that context.

-- 
Måns Rullgård
[email protected]
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to