diff options
Diffstat (limited to 'gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch')
-rw-r--r-- | gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch b/gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch new file mode 100644 index 0000000000..a990641a49 --- /dev/null +++ b/gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch @@ -0,0 +1,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 |