svn commit: r467798 - in branches/2018Q2/graphics/freeimage: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Thu Apr 19 18:32:44 UTC 2018
Author: sunpoet
Date: Thu Apr 19 18:32:43 2018
New Revision: 467798
URL: https://svnweb.freebsd.org/changeset/ports/467798
Log:
MFH: r467404
Fix CVE-2016-5684
- Bump PORTREVISION for package change
Obtained from: https://sourceforge.net/p/freeimage/svn/1735/
https://sourceforge.net/p/freeimage/svn/1740/
Security: 5b1631dc-eafd-11e6-9ac1-a4badb2f4699
Approved by: ports-secteam (riggs)
Added:
branches/2018Q2/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp
- copied unchanged from r467404, head/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp
Modified:
branches/2018Q2/graphics/freeimage/Makefile
Directory Properties:
branches/2018Q2/ (props changed)
Modified: branches/2018Q2/graphics/freeimage/Makefile
==============================================================================
--- branches/2018Q2/graphics/freeimage/Makefile Thu Apr 19 18:29:48 2018 (r467797)
+++ branches/2018Q2/graphics/freeimage/Makefile Thu Apr 19 18:32:43 2018 (r467798)
@@ -3,7 +3,7 @@
PORTNAME= freeimage
PORTVERSION= 3.16.0
-PORTREVISION= 4
+PORTREVISION= 5
# Version 3.17.0 is available, but does not build on i386 (and probably
# other 32-bit arches) without some not-quite-trivial patching. If one
# decides to update the port, please make sure 32-bit builds are tested!
Copied: branches/2018Q2/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp (from r467404, head/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2018Q2/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp Thu Apr 19 18:32:43 2018 (r467798, copy of r467404, head/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp)
@@ -0,0 +1,23 @@
+--- Source/FreeImage/PluginXPM.cpp.orig 2013-11-29 19:29:14 UTC
++++ Source/FreeImage/PluginXPM.cpp
+@@ -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
More information about the svn-ports-branches
mailing list