2018-02-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/fits.c (ReadFITSImage): Fix signed integer overflow when computing pixels size. Fixes oss-fuzz 6586 "graphicsmagick/coder_FITS_fuzzer: Integer-overflow in ReadFITSImage". (Credit to OSS-Fuzz)
2018-02-27 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- coders/svg.c (SVGStartElement, SVGEndElement): From the SVG spec: "The 'foreignObject' element allows for inclusion of a foreign namespace which has its graphical content drawn by a different user agent." Code has been added to consume and discard the 'foreignObject' element and any settings (e.g., fill color) internal to it. Previously, settings internal to the 'foreignObject' element would persist and "leak" into the graphic elements that followed it, resulting in undesired side effects (e.g., fill color other than the expected default).
2018-02-27 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (DrawPolygonPrimitive): Fixed a bug introduced by changeset 39102dd1d456. For SVG, this changeset applied both the group AND the fill opacity values to fill patterns (similarly for stroke). For WMF, however, this caused the fill pattern to be rendered as 100% transparent. A closer reading of the SVG spec does NOT show that the fill opacity should be applied to the fill pattern, so as of this latest changeset only the group opacity value is applied to fill and stroke patterns.
2018-02-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/bmp.c (ReadBMPImage): Fix divide by zero regression added by latest fixes. Fixes oss-fuzz 6583 "graphicsmagick/coder_BMP_fuzzer: Divide-by-zero in ReadBMPImage". (Credit to OSS-Fuzz)
2018-02-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/pict.c (ReadPICTImage): Validate that PICT rectangles do not have zero dimensions. Specify expected file type when reading from a temporary file. Trace PICT rectangle dimensions. More detection of blob EOF and more error handling. Fixes oss-fuzz issue 6193 "graphicsmagick/coder_PCT_fuzzer: Unknown signal in AllocateImageColormap" and likely many oss-fuzz ASAN/UBSAN issues reported against "PCT" and "PICT" since this one problem appears to be causing a spew of reports.
- coders/png.c (ReadMNGImage): Detect and handle failure to allocate global PLTE. Problem was reported via email from Petr Gajdos on February 26, 2018.
2018-02-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- magick/blob.c (ReadBlobLSBDouble): Make sure imported double is a normal value. (ReadBlobLSBDoubles): Make sure imported doubles are normal values. (ReadBlobLSBFloat): Make sure imported float is a normal value. (ReadBlobLSBFloats): Make sure imported floats are normal values. (ReadBlobMSBFloat): Make sure imported float is a normal value. (ReadBlobMSBFloats): Make sure imported floats are normal values. (ReadBlobMSBDouble): Make sure imported double is a normal value. (ReadBlobMSBDoubles): Make sure imported doubles are normal values.
- magick/import.c (ImportFloat32Quantum): Make sure imported float is a normal value. (ImportFloat64Quantum): Make sure imported double is a normal value.
- magick/image.h (RoundDoubleToQuantum): Restore previous behavior (from earlier today). (RoundFloatToQuantum): Restore previous behavior (from earlier today).
- coders/bmp.c (ReadBMPImage): Fix UBSAN runtime error: left shift of 205 by 24 places cannot be represented in type 'int'.
- coders/ept.c (ReadEPTImage): Fix dereference of NULL pointer which was detected by UBSAN in the test suite.
- magick/image.h (RoundDoubleToQuantum): Check double value for NaN and infinity in order to avoid undefined behavior. (RoundFloatToQuantum): Check float value for NaN and infinity in order to avoid undefined behavior.
- magick/common.h (MAGICK_ISNAN): Add a isnan() wrapper macro. (MAGICK_ISINF): Add a isinf() wrapper macro.
2018-02-25 Fojtik Jaroslav <JaFojtik@seznam.cz>
- coders/mat.c Fix oss-fuzz issue 6273 - Heap-use-after-free in GetLocaleExceptionMessage. (Credit to OSS-Fuzz)
2018-02-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/dcm.c (DCM_PostRescaleImage): Remove use of DCM_PostRescaleImage() since its implementation is wrong and accesses non-allocated heap memory. Problem was reported by Petr Gajdos via email on February 8, 2018.
- coders/jp2.c (ReadJP2Image): Use a ThrowJP2ReaderException macro to automatically clean up when throwing an exception.
- coders/bmp.c (ReadBMPImage): Report an error if RLE decode does not produce the expected number of bytes. Fixes oss-fuzz issue 6015 "graphicsmagick/coder_BMP_fuzzer: Out-of-memory in graphicsmagick_coder_BMP_fuzzer". (Credit to OSS-Fuzz)
2018-02-23 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (DrawImage): Fixed a bug in which graphical elements defined within <defs> ... </defs> were being rendered, contrary to the SVG spec.
2018-02-23 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (DrawPolygonPrimitive): When filling or stroking a polygon using a pattern, the fill (or stroke) and group/object opacity values were not being applied to the pattern (fixed).
2018-02-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/bmp.c (ReadBMPImage): Fix SeekBlob() return value checks. Add more EOF checks. Require that a provided ba_offset be a forward seek in order to avoid the possibility of endless looping.
2018-02-23 Fojtik Jaroslav <JaFojtik@seznam.cz>
- coders/mat.c Fix oss-fuzz issue 6301. (Credit to OSS-Fuzz)
2018-02-22 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/alpha_composite.c (BlendQuantumOpacity): The pixel compositing equation used when compositing an image into the output was incorrect and has been fixed.
- magick/render.c (DrawPolygonPrimitive): When compositing polygon edge pixels over a transparent black background, the code would composite as if the background were opaque black, resulting in the edge pixels being too dark (fixed).
2018-02-21 Greg Wolfe <gregory.wolfe@kodakalaris.com>
magick/render.c (DrawImage): Per the SVG spec, opacity, fill-opacity, and stroke-opacity values are now clamped to [0,1].
Also fixed two bugs introduced by changeset 91de8039f27d (dated 2018-02-12): (1) a group/object opacity value specified using a percentage was not being converted to a value in [0,1]; (2) if fill-opacity or stroke-opacity was 1, and the group/object opacity value was set to 1, the resulting fill-opacity or stroke-opacity value would be set to 0 instead of 1.
2018-02-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/viff.c (ReadVIFFImage): Fix excessive memory usage. Fixes oss-fuzz 6006 "graphicsmagick/coder_XV_fuzzer: Out-of-memory in graphicsmagick_coder_XV_fuzzer". (Credit to OSS-Fuzz)
- coders/txt.c (ReadInt): Avoid benign signed integer overflow due to accepting an arbitrary number of digits. Fixes oss-fuzz 6002 "graphicsmagick/coder_TEXT_fuzzer: Integer-overflow in ReadInt". (Credit to OSS-Fuzz)
- coders/viff.c (ReadVIFFImage): Verify that there is sufficient data to back up colormap allocation request. Fixes oss-fuzz 5986 "graphicsmagick/coder_VIFF_fuzzer: Out-of-memory in graphicsmagick_coder_VIFF_fuzzer". (Credit to OSS-Fuzz)
- magick/memory.c: Define MAGICK_MEMORY_HARD_LIMIT=value to abort when memory request exceeds value. Useful to find location of excessive memory requests.
2018-02-19 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- coders/svg.c (SVGStartElement): Per the SVG spec, the SVG coder now initializes the MVG coder (which renders SVG graphical elements) with the the SVG defaults for fill color, fill-opacity, stroke color, stroke-opacity, and stroke-width. This makes the SVG coder independent of the MVG coder intial state.
2018-02-19 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- coders/svg.c (SVGStartElement): Fixed initialization of x and y attributes per the SVG spec: for graphical elements "image", "pattern", "text", "rect", and "use", if the x or y attribute is not specified, the effect is as if a value of "0" were specified.
2018-02-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/sun.c (ReadSUNImage): Fix edge case which broke file-size validation logic. Fixes oss-fuzz issue 5981 "graphicsmagick/coder_SUN_fuzzer: Out-of-memory in graphicsmagick_coder_SUN_fuzzer". (Credit to OSS-Fuzz)
- coders/txt.c (ReadTXTImage): Validate that file size is sufficient for claimed image properties. Fixes oss-fuzz issue 5960 "graphicsmagick/coder_TXT_fuzzer: Out-of-memory in graphicsmagick_coder_TXT_fuzzer". (Credit to OSS-Fuzz)
- coders/tga.c (ReadTGAImage): Only allow 1 and 8 bit colormapped/grey images. Fixes oss-fuzz issue 6314 "graphicsmagick/coder_ICB_fuzzer: Undefined-shift in ReadTGAImage". (Credit to OSS-Fuzz)
- coders/bmp.c (ReadBMPImage): Detect and report when BMP height value is out of range (too negative). Fixes oss-fuzz issue 6394 "graphicsmagick/coder_BMP_fuzzer: Integer-overflow in ReadBMPImage". (Credit to OSS-Fuzz)
- coders/rla.c (ReadRLAImage): Detect when RLE decoding is producing too many samples and report as an error. Fixes oss-fuzz issue 6312 "graphicsmagick/coder_RLA_fuzzer: Timeout in graphicsmagick_coder_RLA_fuzzer". (Credit to OSS-Fuzz)
- coders/fits.c (ReadFITSImage): Validate that file size is sufficient for claimed image properties. Fixes oss-fuzz issue 6429 "graphicsmagick/coder_FITS_fuzzer: Timeout in graphicsmagick_coder_FITS_fuzzer". (Credit to OSS-Fuzz)
- magick/image.c (CloneImage): Check image pixel limits in CloneImage() when it is used to change the image dimensions. This avoids depending on the using code to detect and report such issues.
- coders/xcf.c (ReadXCFImage): Check image pixel limits after each CloneImage() to assure that image is within specified resource limits. Fixes oss-fuzz issue 6399 "graphicsmagick/enhance_fuzzer: Timeout in graphicsmagick_enhance_fuzzer". (Credit to OSS-Fuzz)
2018-02-16 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (TracePath): TracePath() was not correctly processing multiple sets of cubic or quadratic Bezier coordinates when the previous path data command was not a cubic or quadratic Bezier command. This would result in the first control point being equal to the current path point instead of being computed using the current path point and the second control point of the previous Bezier command.
2018-02-15 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (TracePath): TracePath() was not consuming commas (if present) at the end of a set of points when multiple sets of points were specified for various path commands (e.g., line, Bezier). This resulted in the remaining sets of points being ignored (fixed).
2018-02-15 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (TraceArcPath): No points are generated by TraceArcPath() if the starting and ending arc points are the same. For this case, the coordinate count was not being set to zero before returning (fixed).
2018-02-15 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (DrawImage): Clipping of polygons in DrawImage() would sometime result in a starting pixel location that was greater than the ending pixel location, causing a subsequent call to GetImagePixelsEx() to fail due a column count <= 0. Modified the clipping code to eliminate this condition, and also to return early if the polygon lies completely outside the image boundaries. Also fixed variable declarations from a previous commit that were causing problems for the C89 compiler.
2018-02-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/topol.c (ReadTOPOLImage): Detect EOF immediately rather than spinning. Fixes oss-fuzz issue 6303 "graphicsmagick/coder_TOPOL_fuzzer: Timeout in graphicsmagick_coder_TOPOL_fuzzer". (Credit to OSS-Fuzz)
- coders/dcm.c (DCM_SetupRescaleMap): Avoid excessive left shift. Fixes oss-fuzz issue 6256 "graphicsmagick/coder_DCM_fuzzer: Undefined-shift in DCM_SetupRescaleMap". (Credit to OSS-Fuzz)
2018-02-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/wpg.c (ExtractPostscript): Detect EOF on input while transferring bytes to Postscript file. Fixes oss-fuzz issue 6087 "graphicsmagick/coder_WPG_fuzzer: NULL". Later identified to be CVE-2017-1768 as previously discovered in ImageMagick. (Credit to OSS-Fuzz)
- coders/pdb.c (ReadPDBImage): Quit attempting to read image data immediately at EOF. Fixes oss-fuzz issue 6252 "graphicsmagick/coder_PDB_fuzzer: Timeout in graphicsmagick_coder_PDB_fuzzer". (Credit to OSS-Fuzz)
2018-02-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/topol.c (ReadTOPOLImage): Avoid index out of bounds when input filename does not use a file extension. Fixes oss-fuzz issue 6237 "graphicsmagick/coder_TOPOL_fuzzer: Index-out-of-bounds in ReadTOPOLImage". (Credit to OSS-Fuzz)
2018-02-12 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (DrawImage): Object/group opacity, when set in DrawImage(), would overwrite the fill and stroke opacities. This has been fixed so that the object opacity is now combined with the fill and stroke opacities per the SVG spec.
2018-02-12 Fojtik Jaroslav <JaFojtik@seznam.cz>
- coders/mat.c Fix oss-fuzz issue 6021. (Credit to OSS-Fuzz)
2018-02-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/dcm.c (ReadDCMImage): Avoid undefined left shift of short. Fix memory leaks in error reporting paths. Fixes oss-fuzz issue 6217 "graphicsmagick/coder_DCM_fuzzer: Undefined-shift in ReadDCMImage". (Credit to OSS-Fuzz)
- coders/dpx.c (ReadDPXImage): Avoid divide by zero exception in the case where reference high equals reference low. Fixes oss-fuzz issue 6215 "graphicsmagick/coder_DPX_fuzzer: Divide-by-zero in ReadDPXImage". (Credit to OSS-Fuzz)
- coders/topol.c (ReadTOPOLImage): Avoid index out of bounds when input filename does not use a file extension.
- coders/cut.c (ReadCUTImage): Avoid index out of bounds when input filename does not use a file extension. Fixes oss-fuzz issue 6218 "graphicsmagick/coder_CUT_fuzzer: Index-out-of-bounds in ReadCUTImage". (Credit to OSS-Fuzz)
- coders/pwp.c (ReadPWPImage): Force temporary file to be read as a SFW file rather than autodetecting the format. Fixes oss-fuzz issue 6220 "graphicsmagick/coder_PWP_fuzzer: Indirect-leak in AllocateImage". (Credit to OSS-Fuzz)
2018-02-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/pdf.c (WritePDFImage): Assure that xref memory is not leaked if an exception is thrown. Fixes oss-fuzz issue 5968 "graphicsmagick/coder_EPDF_fuzzer: Direct-leak in MagickRealloc". (Credit to OSS-Fuzz)
- coders/tim.c (ReadTIMImage): Verify that 4/8 bit PSX TIM provides a CLUT and verify indexes. Fixes oss-fuzz issue 5972 "graphicsmagick/coder_TIM_fuzzer: Null-dereference WRITE in ReadTIMImage". (Credit to OSS-Fuzz)
- coders/topol.c (ReadTOPOLImage): Add additional header validations. Fixes oss-fuzz issue 5975 "graphicsmagick/coder_TOPOL_fuzzer: Floating-point-exception in ReadTOPOLImage". (Credit to OSS-Fuzz)
- coders/bmp.c (ReadBMPImage): Avoid possible division by zero when decoding CIE primary values. (Credit to OSS-Fuzz)
- magick/export.c (ExportViewPixelArea): Only compute unsigned_maxvalue if sample_bits <= 32.
- magick/import.c (ImportViewPixelArea): Assure that double_maxvalue minus double_minvalue is not zero, or excessively close to zero to avoid divide by zero exception or impossible scaling factor. (Credit to OSS-Fuzz) (ImportViewPixelArea): Only compute unsigned_maxvalue if sample_bits <= 32.
2018-02-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/dib.c (ReadDIBImage): Validate that image width is not too negative such that it's absolute value can not fit in 32-bit unsigned width. Resolves oss-fuzz issue 6179 "graphicsmagick/coder_ICO_fuzzer: Integer-overflow in ReadDIBImage". (Credit to OSS-Fuzz)
- coders/dcm.c (funcDCM_BitsStored): Validate DICOM datum size. Use a different means to determine the maximum value which does not use excessive shifting. Resolves oss-fuzz issue 6165 "graphicsmagick/coder_DCM_fuzzer: Undefined-shift in funcDCM_BitsStored". (Credit to OSS-Fuzz)
2018-02-08 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/dpx.c (ReadWordU32BE): Add casts to avoid default type promotion from unsigned char to 'int' leading to undefined behavior for 24 bit shift. Fixes oss-fuzz issue 6058 "graphicsmagick/coder_DPX_fuzzer: Undefined-shift in ReadWordU32BE". (Credit to OSS-Fuzz) (ReadDPXImage): Require that the file has at least one element. Add bountiful casts for values which are left-shifted. Fixes oss-fuzz issue 5962 "graphicsmagick/coder_DPX_fuzzer: Undefined-shift in ReadDPXImage". (Credit to OSS-Fuzz)
- coders/dcm.c (DCM_ReadOffsetTable): Add casts Add casts to avoid default type promotion from unsigned char to 'int' leading to undefined behavior for 16 bit shift. Fixes oss-fuzz issue 5980 "graphicsmagick/coder_DCM_fuzzer: Undefined-shift in DCM_ReadOffsetTable". (Credit to OSS-Fuzz)
- magick/module_aliases.h (ModuleAliases): Add missing mapping from "ICODIB" format to "DIB" module.
- magick/import.c (ImportUInt32Quantum): Add casts to avoid default type promotion from unsigned char to 'int' leading to undefined behavior for 24 bit shift. Fixes oss-fuzz "graphicsmagick/coder_P7_fuzzer: Undefined-shift in ImportRGBQuantumType". (Credit to OSS-Fuzz)
2018-02-07 Fojtik Jaroslav <JaFojtik@seznam.cz>
- coders/wpg.c Fix oss-fuzz issue 5964 "graphicsmagick/coder_MAT_fuzzer: Heap-use-after-free in GetLocaleExceptionMessage". (Credit to OSS-Fuzz)
2018-02-07 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/render.c (IsPoint): Fixed a bug in which IsPoint() would reject as a valid coordinate value strings that did not begin with an integer: e.g., "0.25" would be accepted, but ".25" would not.
2018-02-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/cut.c (ReadCUTImage): Fix DestroyImageInfo() of NULL pointer leading to assertion. Fixes oss-fuzz issue 6067 "graphicsmagick/coder_CUT_fuzzer: Unknown signal in DestroyImageInfo".
- coders/tga.c (ReadTGAImage): Throw exception rather than assertion for unexpected comment size. Fixes oss-fuzz issue 5961 "graphicsmagick/coder_ICB_fuzzer: ASSERT: (size_t) (tga_info.id_length+1) == commentsize".
2018-02-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/pdf.c (WritePDFImage): Free 'xref' allocation before error return. Fixes oss-fuzz issue 5968 "graphicsmagick/coder_EPDF_fuzzer: Direct-leak in MagickRealloc".
2018-02-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/pdb.c (ReadPDBImage): Fix heap buffer overflow if blob is already at EOF when comment is read. Fixes oss-fuzz issue 5997 "graphicsmagick/coder_PDB_fuzzer: Heap-buffer-overflow in SetImageAttribute".
- coders/dpx.c (ReadDPXImage): Fix memory leak of user data if user data is truncated. Fix consumption of one uninitialized stack bytes. Fixes oss-fuzz issue 5973: graphicsmagick/enhance_fuzzer: Direct-leak in ReadDPXImage.
- coders/pnm.c (ReadPNMImage): Detect and avoid division by zero. Fixes Issue 5959 in oss-fuzz: graphicsmagick/coder_P7_fuzzer: Divide-by-zero in ReadPNMImage
- magick/xwindow.c (MagickXClientMessage): Eliminate valgrind gripe about use of uninitialized stack data by clearing allocation to zero. (MagickXMakeImage): Eliminate valgrind gripe about use of uninitialized heap data by clearing allocation to zero.
- coders/pwp.c (ReadPWPImage): Remove bogus EOF test on an image with a closed blob. Fixes Issue 5957 in oss-fuzz: graphicsmagick/coder_PWP_fuzzer: ASSERT: image->blob->type != UndefinedStream.
- www/Changes.rst: Fix typo with spelling "ChangeLog-2017.html". Resolves SourceForge issue #544 "dead link 2017 changelog page on GraphicsMagick web site".
2018-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- magick/static.c (OpenModule): Assure that status is initialized. Resolves Coverity 261207 "Uninitialized scalar variable".
- wand/magick_wand.c (MagickHasColormap): New function to test if the image has a colormap. (MagickIsGrayImage): New function to test if the image uses only gray pixels. (MagickIsMonochromeImage): New function to test if the image uses only monochrome pixels. (MagickIsOpaqueImage): New function to test if the image uses only opaque pixels. (MagickIsPaletteImage): New function to test if the image is based on a color palette. Above functions are written by Troy Patteson and submitted via SourceForge patch #54 "Wand API patches: has colormap, is gray image, is monochrome image, is opaque image, is palette image".
- fuzzing: Added initial OSS-Fuzz integration by Alex Gaynor. From SourceForge patch #55 "OSS-Fuzz integration"
- coders/png.c (ReadMNGImage): Fix free using possibly unallocated pointer value.
- magick/blob.c (SeekBlob): Remove implicit extension of blob allocation size based on seek offset. Besides making an assumption about how the blob memory was allocated, this reallocation feature provides a memory DOS opportunity. Resolves issue reported by Alex Gaynor via email entitled "Security issue with memory management in Magick++" to the graphicsmagick-security list on 31 Jan 2018. (SeekBlob):
- coders/jpeg.c (ReadIPTCProfile): Revert inadvertent wrong return codes added by change on December 9, 2017. Fixes SourceForge bug 542 "Improper call to JPEG library in state 201" since 1.3.28.
2018-02-01 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/annotate.c (RenderFreetype): Fixed the text opacity computation in RenderFreeType(). This bug caused the text fill color to bleed into the character cell when the SVG "fill-opacity" is less than 1.0.
2018-02-01 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- magick/attribute.c (CloneImageAttributes): Fixed a bug in which the source image attributes would always replace the destination image attributes instead of being appended to them, and the destination image attributes would become a memory leak.
2018-01-31 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- coders/svg.c (SVGStartElement): Fixed a bug in which the x,y location values for a <text> or <tspan> were overwritten by the x,y values for the next <tspan> before the previous values were used. This caused the text associated with the previous <text> or <tspan> to appear at the location specified for the next <tspan>.
2018-01-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- magick/static.c: Use !defined(SupportMagickModules) to enable static module loader. Fixes SourceForge bug #543 "Multiple definition of "OpenModule" (etc) when cross-compiling shared".
2018-01-29 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- coders/svg.c (SVGStartElement): A terminating '>' in a geometry string is interpreted to mean that the dimensions of an image should only be changed if its width or height exceeds the geometry specification. For an unapparent and undocumented reason, a terminating '>', if present, was being nulled out, making this feature unusable for SVG files (now fixed).
2018-01-29 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- coders/svg.c (ReadSVGImage): If there is a geometry string in image_info->size (e.g., gm convert -size "50x50%" in.svg out.png), AllocateImage() sets image->columns and image->rows to the width and height values from the size string. However, this makes no sense if the size string was something like "50x50%" (we'll get columns = rows = 50). So we set columns and rows to 0 after AllocateImage(), which is the same as if no size string was supplied by the client. This also results in svg_info.bounds to be set to 0,0 (i.e., unknown), so that svg_info.bounds will later be set using the image size information from either the svg "canvas" width/height or from the viewbox. Later, variable "page" is set from svg_info->bounds. Then the geometry string in image_info->size gets applied to the (now known) "page" width and height when SvgStartElement() calls GetMagickGeometry(), and the intended result is obtained.
2018-01-24 Greg Wolfe <gregory.wolfe@kodakalaris.com>
- coders/svg.c (SVGStartElement): When the density (DPI) is specified using the ImageInfo::density member, the derived scale factor is incorrectly applied a second time to the width and height members of variable RectangleInfo page. Fixes SourceForge ticket #451.
2018-01-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- magick/static.c: Use a lazy-loader for static modules with the same external interface as the lazy-loader for dynamic modules.
2018-01-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- NEWS.txt: Prepare for 1.3.28 release.
2018-01-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- NEWS.txt: Update with changes since previous release.
2018-01-14 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- PerlMagick/Magick.xs: Compiler warnings reduction.
- magick/pixel_cache.h: Mark GetPixels(), GetIndexes(), and GetOnePixel() as deprecated. Compilers may produce a warning if these functions are used.
- magick/pixel_cache.c (InterpolateColor): Return black pixel if InterpolateViewColor() reports failure.
- coders/png.c (ReadMNGImage): Fix memory leak of chunk and mng_info in error path.
- coders/gif.c (ReadGIFImage): Fix memory leak of global colormap.
2018-01-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- magick/symbols.h: Fix SourceForge issue #538 "13 symbols in common with ImageMagick despite --enable-symbol-prefix".
- coders/bmp.c (ReadBMPImage): Fix non-terminal loop due to unexpected bit-field mask value. Fixes SourceForge issue #541 "Infinite Loop in ReadBMPImage (coders/bmp.c)".
- coders/jpeg.c (JPEGMessageHandler): Revert code added on 2017-07-08 to promote certain warnings from libjpeg to errors. Add code to rationalize claimed image dimensions based on file size. Resolves SourceForge issue #539 "Images with libjpeg warnings result in error".
2018-01-11 Fojtik Jaroslav <JaFojtik@seznam.cz>
- coders/wpg.c Recursive ReadImage could return multiple scenes
- fixed.
2018-01-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- coders/png.c (ReadOnePNGImage): Quit 'passes' loop if we encountered an error
- magick/pixel_cache.c (SetNexus): Fix heap overwrite in AcquireCacheNexus() due to SetNexus() not using an allocated staging area for the pixels like it should. This problem impacts all 1.3.X releases. Resolves SourceForge issues 532 "heap-buffer-overflow bug in ReadWPGImage" and #531 "heap-buffer-overflow in AcquireCacheNexus".
- magick/pixel_cache.c (InterpolateViewColor): Now returns MagickPassFail rather than void. Code using this function is updated to check the return status.
2018-01-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- magick/describe.c (DescribeImage): Discriminate between AcquireImagePixels() returning NULL or finding a transparent pixel. This avoids use of a null pointer in the case where AcquireImagePixels() returns NULL.
2017-12-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- magick/static.c: Change static module initialization to be based on an initialized list rather than a squence of function calls in order to simplify maintenance and possibly address future requirements.
2017-12-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
- Copyright.txt: Bump copyright years and rotate ChangeLog.