OSDN Git Service

pass correct buffer size to lzw decode init
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 25 Mar 2007 16:29:11 +0000 (16:29 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 25 Mar 2007 16:29:11 +0000 (16:29 +0000)
Originally committed as revision 8518 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/gifdec.c

index 386c039..095b506 100644 (file)
@@ -109,7 +109,8 @@ static int gif_read_image(GifState *s)
     /* now get the image data */
     code_size = bytestream_get_byte(&s->bytestream);
     //TODO: add proper data size
-    ff_lzw_decode_init(s->lzw, code_size, s->bytestream, 0, FF_LZW_GIF);
+    ff_lzw_decode_init(s->lzw, code_size, s->bytestream,
+                       s->bytestream_end - s->bytestream, FF_LZW_GIF);
 
     /* read all the image */
     linesize = s->picture.linesize[0];