diff options
author | Leo Famulari <leo@famulari.name> | 2017-07-07 00:31:08 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-07-10 13:31:58 -0400 |
commit | 61adfb00b11cc16a70e60f19fd8e0a838a3ef608 (patch) | |
tree | 810e892a251a6f61377422b8ea83c3db8ef7aebc /gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch | |
parent | 625e7cd654418aa8c5af9f49189d67b9d550b8ea (diff) | |
download | guix-61adfb00b11cc16a70e60f19fd8e0a838a3ef608.tar.gz |
gnu: libtiff: Fix two integer overflows.
* gnu/packages/patches/libtiff-tiffycbcrtorgb-integer-overflow.patch, gnu/packages/patches/libtiff-tiffycbcrtorgbinit-integer-overflow.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/image.scm (libtiff-4.0.8)[source]: Use them.
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 |