lzw: fix potential integer overflow.
This commit is contained in:
parent
b7b1509d06
commit
0399fe0fd2
@ -102,7 +102,7 @@ void ff_lzw_decode_tail(LZWState *p)
|
|||||||
|
|
||||||
if(s->mode == FF_LZW_GIF) {
|
if(s->mode == FF_LZW_GIF) {
|
||||||
while (s->bs > 0) {
|
while (s->bs > 0) {
|
||||||
if (s->pbuf + s->bs >= s->ebuf) {
|
if (s->bs >= s->ebuf - s->pbuf) {
|
||||||
s->pbuf = s->ebuf;
|
s->pbuf = s->ebuf;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user