aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/lzw.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-03-28 20:00:38 -0700
committerRonald S. Bultje <rsbultje@gmail.com>2012-03-29 11:36:14 -0700
commit0399fe0fd23ff272282dd093cc2720deb6f87ea8 (patch)
treea5d76d5ce4662fc7f18a0a34b6934dacdc6fc670 /libavcodec/lzw.c
parentb7b1509d06d3696d3b944791227fe198ded0654b (diff)
downloadffmpeg-0399fe0fd23ff272282dd093cc2720deb6f87ea8.tar.gz
lzw: fix potential integer overflow.
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 b674d4e296..8761510283 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 {