1
0
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:
Michael Niedermayer 2012-03-28 07:25:06 +02:00
parent 96d0494123
commit 11cc209226

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++;
}