head 1.2; access; symbols pkgsrc-2019Q4:1.1.0.28 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.24 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.22 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.20 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.18 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.16 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.14 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.12 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.10 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.8 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.4 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.2 pkgsrc-2017Q1-base:1.1; locks; strict; comment @// @; 1.2 date 2020.01.11.14.40.44; author nia; state dead; branches; next 1.1; commitid ob8z1coJpYLOxhSB; 1.1 date 2017.02.20.08.00.42; author snj; state Exp; branches; next ; commitid wEqt3LcjvbM5fFGz; desc @@ 1.2 log @freeimage: Update to 3.18.0 Release 3.18.0 is a maintenance release that mainly brings updates of its third party libraries. The library has been updated with the new ZLib (1.2.11), LibJPEG (9c), LibPNG (1.6.35), LibTIFF (4.0.9), LibRaw (0.19.0), LibWebP (1.0.0), OpenEXR (2.2.1). Other significant improvements concern better support for JPEG saving (when using 32-bit CMYK images) and PSD saving. Lastly, the library contains many bug fixes provided by our users (will concern especially plugins PCX, TIFF, XPM, GIF, TARGA, PSD, BMP, DDS, PNG, HDR). As usual, check the changes log for full details (especially for bug fixes) and check also the updated FreeImage documentation. @ text @$NetBSD: patch-Source_FreeImage_PluginXPM.cpp,v 1.1 2017/02/20 08:00:42 snj Exp $ Fix CVE-2016-5684. http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginXPM.cpp?r1=1.17&r2=1.18 and http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginXPM.cpp?r1=1.18&r2=1.19 --- Source/FreeImage/PluginXPM.cpp.orig 2015-03-02 02:07:08.000000000 -0800 +++ Source/FreeImage/PluginXPM.cpp 2017-02-19 11:37:34.000000000 -0800 @@@@ -181,6 +181,11 @@@@ Load(FreeImageIO *io, fi_handle handle, } free(str); + // check info string + if((width <= 0) || (height <= 0) || (colors <= 0) || (cpp <= 0)) { + throw "Improperly formed info string"; + } + if (colors > 256) { dib = FreeImage_AllocateHeader(header_only, width, height, 24, FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK); } else { @@@@ -193,7 +198,7 @@@@ Load(FreeImageIO *io, fi_handle handle, FILE_RGBA rgba; str = ReadString(io, handle); - if(!str) + if(!str || (strlen(str) < (size_t)cpp)) throw "Error reading color strings"; std::string chrs(str,cpp); //create a string for the color chars using the first cpp chars @ 1.1 log @Fix CVE-2015-0852 and CVE-2016-5684. @ text @d1 1 a1 1 $NetBSD$ @