pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/freeimage



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Mar 21 16:41:41 UTC 2020

Modified Files:
        pkgsrc/graphics/freeimage: distinfo
Added Files:
        pkgsrc/graphics/freeimage/patches:
            patch-Source_LibRawLite_internal_dcraw__common.cpp

Log Message:
graphics/freeimage: add patch for char subscript in array


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/graphics/freeimage/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/freeimage/patches/patch-Source_LibRawLite_internal_dcraw__common.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/graphics/freeimage/distinfo
diff -u pkgsrc/graphics/freeimage/distinfo:1.7 pkgsrc/graphics/freeimage/distinfo:1.8
--- pkgsrc/graphics/freeimage/distinfo:1.7      Sat Jan 11 14:40:44 2020
+++ pkgsrc/graphics/freeimage/distinfo  Sat Mar 21 16:41:41 2020
@@ -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 @@ Size (FreeImage3180.zip) = 7415716 bytes
 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

Added files:

Index: pkgsrc/graphics/freeimage/patches/patch-Source_LibRawLite_internal_dcraw__common.cpp
diff -u /dev/null pkgsrc/graphics/freeimage/patches/patch-Source_LibRawLite_internal_dcraw__common.cpp:1.1
--- /dev/null   Sat Mar 21 16:41:41 2020
+++ pkgsrc/graphics/freeimage/patches/patch-Source_LibRawLite_internal_dcraw__common.cpp        Sat Mar 21 16:41:41 2020
@@ -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