summaryrefslogtreecommitdiffstats
path: root/libavcodec/lzw.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/lzw.c')
-rw-r--r--libavcodec/lzw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/lzw.c b/libavcodec/lzw.c
index b674d4e..8761510 100644
--- a/libavcodec/lzw.c
+++ b/libavcodec/lzw.c
@@ -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 {
OpenPOWER on IntegriCloud