diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-28 20:00:38 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-29 11:36:14 -0700 |
commit | 0399fe0fd23ff272282dd093cc2720deb6f87ea8 (patch) | |
tree | a5d76d5ce4662fc7f18a0a34b6934dacdc6fc670 /libavcodec/lzw.c | |
parent | b7b1509d06d3696d3b944791227fe198ded0654b (diff) | |
download | ffmpeg-0399fe0fd23ff272282dd093cc2720deb6f87ea8.tar.gz |
lzw: fix potential integer overflow.
Diffstat (limited to 'libavcodec/lzw.c')
-rw-r--r-- | libavcodec/lzw.c | 2 |
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 { |