2020-06-06  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/wpg.c (UnpackWPGRaster): Fix oss-fuzz 23042
	"Heap-buffer-overflow in ImportGrayQuantumType" and oss-fuzz
	"Heap-buffer-overflow in InsertRow" which are both from the same
	cause.

2020-06-01  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/pixel_cache.c (ClipCacheNexus): Change x and y variables
	to unsigned type.

2020-05-31  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/tiff.c (WriteTIFFImage): WebP compression only supports a
	depth of 8.  Fixes oss-fuzz 22560 "Use-of-uninitialized-value in
	GammaToLinear".

2020-05-30  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/wpg.c (ReadWPGImage): Terminate reading when a pixel
	cache resource limit is hit rather than moving on to heap buffer
	overflow.  Fixes oss-fuzz 20045, 20318, 21956

	* coders/png.c (ReadMNGImage): If the image width is 1, then X
	magnification is done by by simple pixel replication.  If the
	image height is 1, then Y magnification is done by simple pixel
	replication.  Fixes oss-fuzz issue 19025 "Heap-buffer-overflow in
	ReadMNGImage" and oss-fuzz issue 19026 "ASSERT: yy < (long)
	large_image->rows". It appears that CERT has assigned
	CVE-2020-12672 for oss-fuzz issue 19025.  Note that the heap
	overwrite is only one byte.

2020-05-01  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* NEWS.txt: Update with changes up to 2020-04-23.

2020-04-23  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/dpx.c (ReadDPXImage): Support dpx:swap-samples-read
	define which behaves similar to dpx:swap-samples, but is only
	applied when reading.  This provides for use when there is both
	reading and writing in the same operation.
	(WriteDPXImage): Support dpx:swap-samples-write define which
	behaves similar to dpx:swap-samples, but is only applied when
	writing.  This provides for use when there is both reading and
	writing in the same operation.

2020-04-18  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick: Fix remaining GCC 10 warnings.

2020-04-17  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/transform.c (GetImageMosaicDimensions): Mark function as pure.

	* magick/effect.c (GetNonpeakMedianList): Mark function as pure.

	* coders/fits.c (InsertRowHDU): Fix scary-sounding GCC 10 warning,
	which is actually benign.

	* config/config.sub: Update to latest config.sub

	* config/config.guess: Update to latest config.guess.

	* Makefile.am: Update to Automake 1.16.2

2020-04-04  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/dpx.c (ReadRowSamples): Simplify 10-bit packed decoding.
	(WriteRowSamples): Simplify 10-bit packed encoding.

	* coders/locale.c (ReadConfigureFile): Ignore comment element if
	it was not found or is too short.

	* magick/pixel_cache.c (ReadCacheIndexes): If SetNexus() has
	previously failed to allocate the staging buffer and thus reported
	an exception to the user, then ReadCacheIndexes() should report an
	error rather than blundering into copying indexes data to a null
	pointer.

	* magick/effect.c (AdaptiveThresholdImage): Assure that we don't
	attempt to write to output pixels if they have not been selected
	yet.

	* magick/utility.c (ExpandFilenames): Properly handle NULL
	filelist and NULL filelist entries.
	(GetGeometry): Assure that there is no one-character stack read
	overflow when reading the geometry buffer.

2020-03-29  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* fuzzing/oss-fuzz-build.sh: Restore xz to oss-fuzz build due to
	build problems getting worked out.

2020-03-28  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* fuzzing/oss-fuzz-build.sh (MAGICK_LIBS): Remove mention of
	liblzma.a in the oss-fuzz build until its build problems get
	worked out.

2020-03-27  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* fuzzing/oss-fuzz-build.sh: Skip building xz in the oss-fuzz
	build until its build problems get worked out.

2020-03-25  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/log.c (InitializeLogInfoPost): Don't load log.mgk if
	logging is already configured to use MethodOutput.

2020-03-24  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/log.c (InitializeLogInfoPost): Mark that logging is
	configured, regardless of if "log.mgk" was discovered.

2020-03-23  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* VisualMagick/magick/magick_config.h.in: ProvideDllMain is now
	disabled by default since it causes InitializeMagick() to be
	invoked prior to when the program's main() routine is called,
	thereby blocking configuration activities or use of
	InitializeMagickEx().  With this change it is even more imperative
	that InitializeMagick() be explicitly invoked by all programs
	using GraphicsMagick.

	* magick/log.c (LogMagickEventList): Always use/respect the
	configured log format as might be obtained from "log.mgk" or
	SetLogDefaultFormat().

	* magick/utility.c (MagickFormatString): Return the size of the
	formatted string.
	(MagickFormatStringList): Return the size of the formatted string.
	(FormatString): Return the size of the formatted string.
	(FormatStringList): Return the size of the formatted string.

2020-03-22  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* www/api/types.rst: Improved types documentation and added more
	hyperlinks.

	* scripts/format_c_api_doc.py: Add hyperlinks for 'LogMethod' and
	'LogOutputType' type documentation.

	* Magick++/lib/Image.cpp (SetLogDefaultEventType): New C++ function to
	forward to C interface.
	(SetLogDefaultGenerations): New C++ function to forward to C
	interface.
	(SetLogDefaultLimit): New C++ function to forward to C interface.
	(SetLogDefaultFormat(): New C++ function to forward to C
	interface.
	(SetLogDefaultLogMethod): New C++ function to forward to C
	interface.
	(SetLogDefaultFileName): New C++ function to forward to C
	interface.
	(SetLogDefaultOutputType): New C++ function to forward to C
	interface.

	* magick/log.c (SetLogDefaultEventType): New function to support
	setting the default set of events which will result in a log
	event.
	(SetLogDefaultGenerations): New function to specify the maximum
	number of log files maintain before circulating back to overwrite
	the first name.
	(SetLogDefaultLimit): New function to specify the maximum number
	of logging events which may occur before creating a new log file.
	(SetLogDefaultLogMethod): New function to provide a call-back
	function to be invoked for each log event when the logging method
	type is MethodOutput.
	(SetLogDefaultOutputType): New function to set the logging output
	destination.
	(SetLogDefaultFormat): New function to provide the format of the
	logging output.
	(SetLogDefaultFileName): New function to provide the file name,
	or file path, to be written to for each log event.
	(InitializeLogInfo): If a default logging callback was provided
	via SetLogDefaultLogMethod() then skip searching for "log.mgk".
	In this case it is assumed that the API user has already changed
	any other logging default which would have been updated by
	"log.mgk" so it would be harmful to search for it, or read from
	it.

2020-03-10  Troy Patteson  <troyp@ieee.org>

	* coders/png.c (WriteOnePNGImage): Don't skip optional Exif
	identifier code if it isn't present.

2020-03-08  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/pixel_cache.c (ModifyCache): Destroy clone_image.cache if
	ClonePixelCache() reports failure.  Fixes oss-fuzz 20871
	"graphicsmagick:coder_MVG_fuzzer: Direct-leak in
	MagickMallocAligned".

	* magick/log.c (LogMagickEventList): Prepare source module base
	name more efficiently.  Move MethodOutput implementation to the
	front so it is not filtered by other active blocks.
	(LogMagickEventList): Cache broken-down time structure in LogInfo
	and recompute only when needed.

2020-03-07  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/resize.c (HorizontalFilter): Improve tracing.
	(VerticalFilter): Improve tracing.
	(ResizeImage): Improve tracing.

	* www/api/api.rst: Add functions from log.c and render.c.

	* magick/log.c (DestroyLogInfo): DestroyLogInfo is no longer
	marked MagickExport.

2020-03-04  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/api.h: Add "magick/enum_strings.h" to API headers.
	Requested by Przemysław Sobala via posting to the
	graphicsmagick-help mailing list on 2020-02-27.

	* scripts/html_fragments.py: Automatically generate HTML footer
	content and include commented HTML fragment which may be
	substituted with SF tracker for SourceForge web site.

2020-02-23  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* version.sh: Updates in preparation for the 1.3.35 release.

	* www/INSTALL-windows.rst: Update Windows installation and build
	documentation.

2020-02-22  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* NEWS.txt: Update with News since previous release.

	* magick/magick.c (InitializeMagickSignalHandlers): This private
	implementation function is now a static function as it should have
	been.
	(InitializeMagickEx): New function which may be used in place of
	InitializeMagick() to initialize GraphicsMagick.  This
	initialization function returns an error status value, may update
	a passed ExceptionInfo structure with error information, and
	provides an options parameter which supports simple bit-flags to
	tailor initialization.  The signal handler registrations are
	skipped if the MAGICK_OPT_NO_SIGNAL_HANDER flag is set in the
	options.

2020-02-19  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/magick.c (MagickToMime): Add a MIME translation for
	"jpg".  Issue reported by Pro Turm.

2020-02-18  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* www/INSTALL-windows.rst: Add quoting to avoid losing backslashes
	in Windows paths.

2020-02-16  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/common.h: Add missing unsupported handling for some
	recently added GCC/Clang attributes.

	* magick/: Move all remaining private implementation code in
	public headers which is guarded by MAGICK_IMPLEMENTATION into
	private headers, which are never installed.

2020-02-15  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/tiff.c (WriteTIFFImage): Evidence suggests that large
	strip sizes improve performance by reducing the number of I/Os.
	The defaults suggested by libtiff are way to small for today's
	images and computers.  Default TIFF strip sizes so that each
	uncompressed strip consumes up to 1MiB of memory, or 4MiB for FAX
	oriented codecs, or based on LZMA compression level when using
	LZMA compression.  The default size may be adjusted via the
	TIFF_BYTES_PER_STRIP preprocessor definition.

2020-02-09  Fojtik Jaroslav  <JaFojtik@seznam.cz>

	* coders/wpg.c ZeroFillMissing data will never been triggered when
	y>=image->rows.

2020-02-09  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/render.c (DrawImage): Limit pattern dimensions by
	LONG_MAX rather than ULONG_MAX since this seems more likely to
	avoid arithmetic overflows later on.

2020-02-09  Fojtik Jaroslav  <JaFojtik@seznam.cz>

	* coders/wpg.c Check for exception in image.

2020-02-09  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/command.c (VersionCommand): Add Google perftools tcmalloc
	to the available feature support.

	* www/INSTALL-unix.rst: Include some information about building
	with MSYS2.

	* coders/png.c (ReadOnePNGImage): Eliminate compilation warnings
	about signed/unsigned comparisons.

	* magick/image.c: Remove private global string constants, and one
	private global unsigned long constant, from the library ABI.
	Since the global constants were declared via a private header and
	only used within the GraphicsMagick build, removing these does not
	impact the public ABI.  The globals removed are BackgroundColor,
	BorderColor, DefaultTileFrame, DefaultTileGeometry,
	DefaultTileLabel, ForegroundColor, HighlightColor, MatteColor,
	PSDensityGeometry, PSPageGeometry, and DefaultCompressionQuality.

2020-02-08  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/render.c (DrawImage): Apply draconian pattern
	specification offset and dimension validations.  Hopefully there
	is no impact to usability.  If so please report it as a bug.
	Fixes oss-fuzz 20586 "graphicsmagick:coder_MVG_fuzzer:
	Integer-overflow in DrawPolygonPrimitive".

	* coders/svg.c (ReadSVGImage): Fix dereference of NULL pointer
	when stopping image timer.

2020-02-06  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/pict.c (DecodeImage): Allocate extra scanline memory to
	allow small RLE overrun.  Fixes oss-fuzz 20271
	"graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
	ExpandBuffer" and 20272 "graphicsmagick:coder_PICT_fuzzer:
	Heap-buffer-overflow in DecodeImage".

	* PerlMagick/t/wmf/read.t: Update WMF reference images.  Relax
	test requirements for ski.wmf.

	* locale/C.mgk: Correct error message associated with
	"UnsupportedNumberOfRows".  Patch was submitted by Thorsten
	Alteholz via private email on 2020-02-05.

2020-02-04  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/topol.c: Include magick/magick_endian.h.

2020-02-03  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick, coders, wand: Added copious casts to avoid possible
	integer overflows in the Microsoft Windows 64-bit build, where
	sizeof(long) < sizeof(size_t).

2020-01-26  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/render.h ("PrimitiveInfo"): Change PrimitiveInfo
	coordinates from type 'unsigned long' to 'size_t'.

2020-01-24  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/gradient.c (GradientImage): Warnings reduction, plus note
	about incorrect diagonal gradients math.

2020-01-20  Fojtik Jaroslav  <JaFojtik@seznam.cz>

	* VisualMagick\configure\configure.cpp Option /arch:SSE2 is
	available only for 32 bit build.

2020-01-19  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/pcd.c (DecodeImage): Assure that pcd_length gets
	initialized with something.

	* Magick++/lib/Options.cpp (strokeDashArray): Add needless check
	for _drawInfo->dash_pattern null in order to make static analysis
	happy.

	* magick/render.c (DestroyPolygonInfo): Make sure to not
	dereference a null edges pointer.

	* coders/pdb.c (WritePDBImage): Make sure that null comment value
	is not dereferenced.

	* coders/vid.c (ReadVIDImage): Make sure that
	ThrowVIDReaderException does not dereference a null pointer.

	* magick/quantize.c (ClassifyImageColors): Fix error handling so a
	null pointer won't be consumed after a memory allocation failure.
	Changed the location of some variable declarations and added some
	comments.

2020-01-18  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/caption.c (ReadCAPTIONImage): Assure that metrics are
	initialized.

	* magick/pixel_cache.c (DestroyThreadViewSet): Check if views
	pointer is not null before destroying views.

	* coders/xpm.c (ReadXPMImage): Properly detect the case where the
	XPM colormap is not fully initialized.

	* coders/pict.c (DecodeImage): Fix heap buffer over-reads. Fixes
	oss-fuzz issue 20053 "graphicsmagick:coder_PICT_fuzzer:
	Heap-buffer-overflow in ExpandBuffer" and oss-fuzz issue 20048
	"graphicsmagick:coder_PICT_fuzzer: Heap-buffer-overflow in
	DecodeImage".  Both of these oss-fuzz issues appeared due to
	recent changes since the last release.

	* coders/meta.c (WriteMETAImage): Assure that 'iptc_offset' is
	initialized and valid.

	* coders/jpeg.c (ReadJPEGImage): Assure that evaluating the
	embedded profile length does not suffer from undefined behavior.

2020-01-12  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/render.c (DrawImage): Add more MVG parser validations.

2020-01-11  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/histogram.c (WriteHISTOGRAMImage): Histogram coder was
	relying on the previously removed '@' file inclusion feature to
	insert the histogram comment text.  Write a PseudoClass MIFF image
	with RLE compression.  Fixes SourceForge issue #622 "Histogram
	produces incorrect color table attribute ".

	* magick/pixel_cache.c (ModifyCache): Re-open the pixel cache if
	the cache rows/columns do not match the owning image rows/columns.

	* magick/transform.c (TransformImage): TransformImage now returns
	a MagickPassFail return status value rather than void.

	* coders/pict.c (ReadPICTImage): Fix some over-strict validations
	which were preventing some PICT files which were previously read
	successfully from being accepted. Fix problems which occurred when
	the clipping rectangle changed the image size. Improve reading
	embedded JPEG blobs.  Now successfully reads all raster PICT files
	I have available.

2020-01-08  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/pict.c (ReadPICTImage): Be more strict about PICT
	rectangle by treating rectangle dimensions as if they are a 16-bit
	signed type and not allowing negative values.  Avoid GCC warnings
	which sprung up similar to "warning: comparison is always false
	due to limited range of data type".

2020-01-05  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/sfw.c (ReadSFWImage): Restore a DestroyImage() statement
	which was accidentally deleted by recent edits.  Fixes oss-fuzz
	"Issue 19819 in oss-fuzz: graphicsmagick:coder_SFW_fuzzer:
	Indirect-leak in AllocateImage".

	* coders/png.c (WriteOneJNGImage): Detect when JPEG encoder has
	failed, and throw exception.  Fix image dimension limit
	validations.  Stop discarding exception report.  Fixes SourceForge
	bug #621 "Assertion in WriteBlob at magick/blob.c:4937" which was
	reported by Suhwan Song.

	* coders/pict.c (WritePICTImage): Eliminating small buffer overrun
	when run-length encoding pixels.  Fixes SourceForge bug #620
	"heap-buffer-overflow in EncodeImage at coders/pict.c:1114" which
	was reported by Suhwan Song.

	* coders/logo.c (ReadLOGOImage): PATTERN error handling was
	incomplete.  Add appropriate error handling.
	(ReadLOGOImage): Switch to using ConstituteTextureImage() rather
	than TextureImage() since it is more appropriate for this purpose.
	(ReadLOGOImage): Oops!  Accidental change of behavior. When size
	is not supplied, simply return the pattern image.

2020-01-04  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/*.c (ReadFOOImage): Stop image timer just before
	returning from reader so that reported timings are correct when
	used in the future.

2020-01-03  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* magick/timer.c (StartTimer): Expose previously existing
	StartTimer() function.
	(StopTimer): Expose previously existing StartTimer() function.

	* magick/constitute.c (WriteImage): Don't over-write time-stamp
	when output is to INFO format.

2020-01-03  Fojtik Jaroslav  <JaFojtik@seznam.cz>

	* VisualMagick\configure\configure.exe: Should not depend on mfcr90.dll.
	It is too bad when end user cannot run this tool because of missing DLL.

	* VisualMagick\configure\configure.cpp Make speed optimisation as default
	option.

	* VisualMagick\configure\configure.vcproj Give different filename to debug
	build to avoid accidental committing debug build to repository.

2020-01-01  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>

	* coders/dpx.c (GenerateDPXTimeStamp): Use reentrant localtime_r()
	function if it is available.

	* magick/log.c (LogMagickEventList): Use reentrant
	localtime_r() function if it is available.

	* coders/cineon.c (GenerateCineonTimeStamp): Use reentrant
	localtime_r() function if it is available.

	* coders/mat.c (WriteMATLABImage): Use reentrant localtime_r()
	function if it is available.

	* coders/pdf.c (WritePDFImage): Use reentrant localtime_r()
	function if it is available.

	* coders/ps.c (WritePSImage): Use reentrant ctime_r() function
	if it is available.

	* coders/ps2.c (WritePS2Image): Use reentrant ctime_r() function
	if it is available.

	* coders/ps3.c (WritePS3Image): Use reentrant ctime_r() function
	if it is available.

	* configure.ac: Test for getpwnam_r().

	* magick/utility.c (ExpandFilename): Use reentrant getpwnam_r()
	function if it is available.

	* magick/magick.c (InitializeMagickSignalHandlers): Use the normal
	termination signal handler for SIGXCPU and SIGXFSZ so that ulimit
	or setrlimit(2) may be used to apply CPU (RLIMIT_CPU) and output
	file size (RLIMIT_FSIZE) limits with the normal cleanup, and
	without dumping core.  Note that any output files currently being
	written may be truncated and files being written by external
	programs (e.g. Ghostscript) might be left behind unless they are
	to a temporary file assigned by GraphicsMagick.

	* coders/xpm.c (ReadXPMImage): Promote a color-lookup
	warning to an error.

	* coders/xc.c (ReadXCImage): Promote a color-lookup
	warning to an error.

	* coders/null.c (ReadNULLImage): Promote a color-lookup
	warning to an error.

	* Makefile.am: Rotate ChangeLogs for the new year.

	* coders/gradient.c (ReadGRADIENTImage): Promote a color-lookup
	warning to an error.
