aboutsummaryrefslogtreecommitdiffstats
path: root/main/sdl2_image/CVE-2017-14450.patch
blob: c7feeb7f8c5677eb9fd87b36ac5cf968058f90f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# HG changeset patch
# User Ryan C. Gordon <icculus@icculus.org>
# Date 1517113689 18000
# Node ID 45e750f92c843dccea0820d86726e9cf1d524392
# Parent  d0142861559ccd4fde994fbd33c34fbdee25f84c
gif: report error on bogus LWZ data, instead of overflowing a buffer.

diff -r d0142861559c -r 45e750f92c84 IMG_gif.c
--- a/IMG_gif.c	Sat Jan 27 22:50:18 2018 -0500
+++ b/IMG_gif.c	Sat Jan 27 23:28:09 2018 -0500
@@ -497,8 +497,10 @@
             return -3;
         }
         *sp++ = table[1][code];
-        if (code == table[0][code])
-        RWSetMsg("circular table entry BIG ERROR");
+        if (code == table[0][code]) {
+            RWSetMsg("circular table entry BIG ERROR");
+            return -3;
+        }
         code = table[0][code];
     }