gif: report error on bogus LWZ data, instead of overflowing a buffer.
authorRyan C. Gordon
Sat, 27 Jan 2018 23:28:09 -0500
changeset 56345e750f92c84
parent 562 d0142861559c
child 564 245e1a073937
gif: report error on bogus LWZ data, instead of overflowing a buffer.
IMG_gif.c
     1.1 --- a/IMG_gif.c	Sat Jan 27 22:50:18 2018 -0500
     1.2 +++ b/IMG_gif.c	Sat Jan 27 23:28:09 2018 -0500
     1.3 @@ -497,8 +497,10 @@
     1.4              return -3;
     1.5          }
     1.6          *sp++ = table[1][code];
     1.7 -        if (code == table[0][code])
     1.8 -        RWSetMsg("circular table entry BIG ERROR");
     1.9 +        if (code == table[0][code]) {
    1.10 +            RWSetMsg("circular table entry BIG ERROR");
    1.11 +            return -3;
    1.12 +        }
    1.13          code = table[0][code];
    1.14      }
    1.15