mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
lzw(gif): Fix overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
96d0494123
commit
11cc209226
@ -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…
Reference in New Issue
Block a user