[FFmpeg-cvslog] avcodec/lagarith: fix init_get_bits() size in lag_decode_arith_plane()

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Dec 30 08:29:56 CET 2013


On 30.12.2013, at 01:02, git at videolan.org (Michael Niedermayer) wrote:
> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 29 23:38:20 2013 +0100| [e80aa47abf74b9dda336d3e156fb49402093ec44] | committer: Michael Niedermayer
> 
> avcodec/lagarith: fix init_get_bits() size in lag_decode_arith_plane()
> 
> untested due to lack of sample
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
>> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e80aa47abf74b9dda336d3e156fb49402093ec44
> ---
> 
> libavcodec/lagarith.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
> index 71e7e99..710558c 100644
> --- a/libavcodec/lagarith.c
> +++ b/libavcodec/lagarith.c
> @@ -443,7 +443,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst,
>             offset += 4;
>         }
> 
> -        init_get_bits(&gb, src + offset, src_size * 8);
> +        init_get_bits(&gb, src + offset, (src_size - offset) * 8);

Don't we have a version that does the *8 with proper checking on its own that we should use while at it?


More information about the ffmpeg-cvslog mailing list