Commit 11cc2092 authored by Michael Niedermayer's avatar Michael Niedermayer

lzw(gif): Fix overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 96d04941
......@@ -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++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment