Browse Source

lzw(gif): Fix overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
11cc209226
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/lzw.c

+ 1
- 1
libavcodec/lzw.c View File

@@ -101,7 +101,7 @@ void ff_lzw_decode_tail(LZWState *p)
struct LZWState *s = (struct LZWState *)p;

if(s->mode == FF_LZW_GIF) {
while(s->pbuf < s->ebuf && s->bs>0){
while(s->pbuf + s->bs < s->ebuf && s->bs>0){
s->pbuf += s->bs;
s->bs = *s->pbuf++;
}


Loading…
Cancel
Save