pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/freeimage graphics/freeimage: add patch for c...
details: https://anonhg.NetBSD.org/pkgsrc/rev/989625db2fed
branches: trunk
changeset: 425406:989625db2fed
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Mar 21 16:41:41 2020 +0000
description:
graphics/freeimage: add patch for char subscript in array
diffstat:
graphics/freeimage/distinfo | 3 +-
graphics/freeimage/patches/patch-Source_LibRawLite_internal_dcraw__common.cpp | 24 ++++++++++
2 files changed, 26 insertions(+), 1 deletions(-)
diffs (42 lines):
diff -r 484922c626ba -r 989625db2fed graphics/freeimage/distinfo
--- a/graphics/freeimage/distinfo Sat Mar 21 16:40:37 2020 +0000
+++ b/graphics/freeimage/distinfo Sat Mar 21 16:41:41 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2020/01/11 14:40:44 nia Exp $
+$NetBSD: distinfo,v 1.8 2020/03/21 16:41:41 rillig Exp $
SHA1 (FreeImage3180.zip) = 38daa9d8f1bca2330a2eaa42ec66fbe6ede7dce9
RMD160 (FreeImage3180.zip) = b791715fccf49355a3cb27b6250d8ed809c2454e
@@ -7,3 +7,4 @@
SHA1 (patch-Makefile) = d453337cb2a34f4480d1bd3c2115cb93715170b8
SHA1 (patch-Makefile.fip) = 466b82e70d06f9552a73d86a742aa1bd3450f881
SHA1 (patch-Source_LibOpenJPEG_opj__malloc.h) = 7e8b65d17cf1f0ed295964d477b96acac56bd927
+SHA1 (patch-Source_LibRawLite_internal_dcraw__common.cpp) = 3f9a149c7294b3ed3f2c17f4c28fe5b7cc223838
diff -r 484922c626ba -r 989625db2fed graphics/freeimage/patches/patch-Source_LibRawLite_internal_dcraw__common.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/freeimage/patches/patch-Source_LibRawLite_internal_dcraw__common.cpp Sat Mar 21 16:41:41 2020 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-Source_LibRawLite_internal_dcraw__common.cpp,v 1.1 2020/03/21 16:41:41 rillig Exp $
+
+Source/LibRawLite/internal/dcraw_common.cpp: In member function 'void LibRaw::xtrans_interpolate(int)':
+Source/LibRawLite/internal/dcraw_common.cpp:5879:27: error: array subscript has type 'char' [-Werror=char-subscripts]
+ cstat[fcol(row, col)]++;
+ ^
+
+The expected values for fcol must be in the range 0..3 anyway, otherwise
+the behavior is undefined. Instead of using char, it would probably be
+better to use uint8_t here.
+
+https://sourceforge.net/p/freeimage/bugs/322/
+
+--- Source/LibRawLite/internal/dcraw_common.cpp.orig 2018-06-30 02:08:06.000000000 +0000
++++ Source/LibRawLite/internal/dcraw_common.cpp
+@@ -5876,7 +5876,7 @@ void CLASS xtrans_interpolate(int passes
+ /* Check against right pattern */
+ for (row = 0; row < 6; row++)
+ for (col = 0; col < 6; col++)
+- cstat[fcol(row, col)]++;
++ cstat[(unsigned char)fcol(row, col)]++;
+
+ if (cstat[0] < 6 || cstat[0] > 10 || cstat[1] < 16 || cstat[1] > 24 || cstat[2] < 6 || cstat[2] > 10 || cstat[3])
+ throw LIBRAW_EXCEPTION_IO_CORRUPT;
Home |
Main Index |
Thread Index |
Old Index