diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-28 07:25:06 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-28 07:36:56 +0200 |
commit | 11cc2092269a36dc7a98545397e110fa8c08e18a (patch) | |
tree | 7338faa3e7b4eb21c6ff91bd37fdcc8e27889d58 /libavcodec/lzw.c | |
parent | 96d0494123a05fb78a0fd3f03b0b5aaefc170b1c (diff) | |
download | ffmpeg-11cc2092269a36dc7a98545397e110fa8c08e18a.tar.gz |
lzw(gif): Fix overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/lzw.c')
-rw-r--r-- | libavcodec/lzw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/lzw.c b/libavcodec/lzw.c index 185a05d6ab..2db0d67e7f 100644 --- a/libavcodec/lzw.c +++ b/libavcodec/lzw.c @@ -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++; } |