diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-04-15 19:12:19 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-04-15 19:12:19 +0000 |
commit | 51ebd65b058363ebf917cc10a89db33d12beb036 (patch) | |
tree | 469b6ab9d37d112d5e40481ea106c87184f07326 /graphics | |
parent | 7b922e726bb06b73308d91db234fe9f5cf158126 (diff) |
Notes
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/freeimage/Makefile | 2 | ||||
-rw-r--r-- | graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/graphics/freeimage/Makefile b/graphics/freeimage/Makefile index 0256a7f23672..f0921ee707be 100644 --- a/graphics/freeimage/Makefile +++ b/graphics/freeimage/Makefile @@ -3,7 +3,7 @@ PORTNAME= freeimage PORTVERSION= 3.16.0 -PORTREVISION= 3 +PORTREVISION= 4 # 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! diff --git a/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp b/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp new file mode 100644 index 000000000000..27b5953f1e7b --- /dev/null +++ b/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 |