Received: by mail.netbsd.org (Postfix, from userid 605) id A29FF84DCA; Sat, 21 Mar 2020 16:41:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 292E284DC2 for ; Sat, 21 Mar 2020 16:41:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id CsWMUXTn720c for ; Sat, 21 Mar 2020 16:41:41 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 914FB84CD2 for ; Sat, 21 Mar 2020 16:41:41 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 8DE60FB27; Sat, 21 Mar 2020 16:41:41 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_158480890170150" MIME-Version: 1.0 Date: Sat, 21 Mar 2020 16:41:41 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/graphics/freeimage To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20200321164141.8DE60FB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_158480890170150 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_158480890170150 Content-Disposition: inline Content-Length: 2526 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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; --_----------=_158480890170150--