1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lzw: fix potential integer overflow.

This commit is contained in:
Ronald S. Bultje 2012-03-28 20:00:38 -07:00
parent b7b1509d06
commit 0399fe0fd2

View File

@ -102,7 +102,7 @@ void ff_lzw_decode_tail(LZWState *p)
if(s->mode == FF_LZW_GIF) {
while (s->bs > 0) {
if (s->pbuf + s->bs >= s->ebuf) {
if (s->bs >= s->ebuf - s->pbuf) {
s->pbuf = s->ebuf;
break;
} else {