aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch
blob: a990641a495ea9f4b265ecec64e81b467e894d34 (about) (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Fix an integer overflow in initYCbCrConversion():

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1907

3rd party Git reference

https://github.com/vadz/libtiff/commit/468988860e0dae62ebbf991627c74bcbb4bd256f

        * libtiff/tif_getimage.c: initYCbCrConversion(): stricter validation for
        refBlackWhite coefficients values. To avoid invalid float->int32 conversion
        (when refBlackWhite[0] == 2147483648.f)
        Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1907
        Credit to OSS Fuzz


/cvs/maptools/cvsroot/libtiff/ChangeLog,v  <--  ChangeLog
new revision: 1.1243; previous revision: 1.1242
/cvs/maptools/cvsroot/libtiff/libtiff/tif_getimage.c,v  <--  libtiff/tif_getimage.c
new revision: 1.107; previous revision: 1.106

Index: libtiff/libtiff/tif_getimage.c
===================================================================
RCS file: /cvs/maptools/cvsroot/libtiff/libtiff/tif_getimage.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- libtiff/libtiff/tif_getimage.c	20 May 2017 11:29:02 -0000	1.106
+++ libtiff/libtiff/tif_getimage.c	29 May 2017 11:29:06 -0000	1.107
@@ -1,4 +1,4 @@
-/* $Id: tif_getimage.c,v 1.106 2017-05-20 11:29:02 erouault Exp $ */
+/* $Id: tif_getimage.c,v 1.107 2017-05-29 11:29:06 erouault Exp $ */
 
 /*
  * Copyright (c) 1991-1997 Sam Leffler
@@ -2241,7 +2241,7 @@
 
 static int isInRefBlackWhiteRange(float f)
 {
-    return f >= (float)(-0x7FFFFFFF + 128) && f <= (float)0x7FFFFFFF;
+    return f > (float)(-0x7FFFFFFF + 128) && f < (float)0x7FFFFFFF;
 }
 
 static int