Module: libav
Branch: master
Commit: 0399fe0fd23ff272282dd093cc2720deb6f87ea8

Author:    Ronald S. Bultje <[email protected]>
Committer: Ronald S. Bultje <[email protected]>
Date:      Wed Mar 28 20:00:38 2012 -0700

lzw: fix potential integer overflow.

---

 libavcodec/lzw.c |    2 +-
 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 {

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to