Commit 0399fe0f authored by Ronald S. Bultje's avatar Ronald S. Bultje

lzw: fix potential integer overflow.

parent b7b1509d
......@@ -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 {
......
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