[XviD-devel] severe bug found in bitstream.h of xvid 1.1.1!

skal skal65535 at orange.fr
Wed Nov 1 08:17:43 CET 2006



   Hi Liang Jian

> Message du 01/11/06 07:11
> 
> and 0xffffffff << (32 - bs->initpos) should be change to 0xffffffff << (32 -
> bitpos * 8)

    
     thanks for spotting this. It was fixed in HEAD but not in
     this 1.1.x.
     Anyway, i've added a simple bench in xvid_bench.c for this
     not to slip through again...

     bye!
Skal

> On 11/1/06, liang jian <jianliang79 at gmail.com> wrote:
> >
> > I am sorry, not initpos but bitpos.
> >
> > On 11/1/06, liang jian <jianliang79 at gmail.com> wrote:
> > >
> > >     There is a severe bug in BitstreamInit() function:
> > >
> > >      /* preserve the intervening bytes */
> > >      if (bs->initpos > 0)
> > >          bs->buf = bs->bufa & (0xffffffff << (32 - bs->initpos));
> > >      else
> > >          bs->buf = 0;
> > >
> > >     bs->pos = bs->initpos = bitpos*8;
> > >     bs->length = length;
> > >
> > >     The bs->initpos should be changed to initpos, because the value of
> > > bs->initpos has not been set when it is being referenced.



More information about the XviD-devel mailing list