diff options
Diffstat (limited to 'graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp')
-rw-r--r-- | graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp b/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp deleted file mode 100644 index 27b5953f1e7b..000000000000 --- a/graphics/freeimage/files/patch-Source-FreeImage-PluginXPM.cpp +++ /dev/null @@ -1,23 +0,0 @@ ---- 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 |