[Ffmpeg-cvslog] r8498 - trunk/libavcodec/lzw.c

Michael Niedermayer michaelni
Sun Mar 25 14:02:04 CEST 2007


Hi

On Sun, Mar 25, 2007 at 12:23:05AM +0100, bcoudurier wrote:
> Author: bcoudurier
> Date: Sun Mar 25 00:23:05 2007
> New Revision: 8498
> 
> Modified:
>    trunk/libavcodec/lzw.c
> 
> Log:
> break if eob is reached to avoid reading one too much byte
> 
> Modified: trunk/libavcodec/lzw.c
> ==============================================================================
> --- trunk/libavcodec/lzw.c	(original)
> +++ trunk/libavcodec/lzw.c	Sun Mar 25 00:23:05 2007
> @@ -77,6 +77,7 @@ static int lzw_get_code(struct LZWState 
>                  s->bs = sizbuf;
>                  if(!sizbuf) {
>                      s->eob_reached = 1;
> +                    break;
>                  }

* this check does not prevent reading over the end
* this check only catches one eob case in the GIF branch of the if()
* you are not maintainer of LZW
* how do you know the code isnt intended to read a byte or 2 too much for
  simplicity and optimization reasons like almost all other code in lavc
  too?

considering these, please revert it

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20070325/81f81351/attachment.pgp>



More information about the ffmpeg-cvslog mailing list