blob: 1a668307ae4a112a82ed5738d3ab8c2bc72a2a20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
This patch comes from: https://github.com/vadz/libtiff/commit/ce6841d9e41d621ba23cf18b190ee6a23b2cc833
Upstream-Status: Backport
Signed-off-by: Baogen shang <baogen.shang@windriver.com>
--- a/tools/gif2tiff.c 2013-12-17 16:46:02.160814995 +0800
+++ b/tools/gif2tiff.c 2013-12-17 16:52:25.140814949 +0800
@@ -406,6 +406,11 @@
return 0;
}
if (oldcode == -1) {
+ if (code >= clear) {
+ fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
+ return 0;
+ }
+
*(*fill)++ = suffix[code];
firstchar = oldcode = code;
return 1;
|