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

Michael Niedermayer michaelni at gmx.at
Mon Dec 30 14:23:52 CET 2013


On Mon, Dec 30, 2013 at 08:29:56AM +0100, Reimar Döffinger wrote:
> 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?

yes
changed
thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20131230/522dbc0b/attachment.asc>


More information about the ffmpeg-cvslog mailing list