GraphicsMagick: Fixes for many issues discovered by Clang Analyzer
GraphicsMagick Commits <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.16374.1668285871.1459.graphicsmagick-commit@lists.sourceforge.net> |
changeset cebad674f368 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=cebad674f368 summary: Fixes for many issues discovered by Clang Analyzer diffstat: ChangeLog | 16 ++++++++ Makefile.am | 24 ++++++++++-- Makefile.in | 28 +++++++++++--- aclocal.m4 | 101 +--------------------------------------------------- coders/locale.c | 26 +++++++++---- coders/meta.c | 8 +-- coders/msl.c | 6 ++- config/config.guess | 8 +++- config/config.sub | 27 +++++++++++-- magick/floats.c | 8 ++-- magick/xwindow.c | 2 +- www/Changelog.html | 10 +++++ 12 files changed, 129 insertions(+), 135 deletions(-) diffs (truncated from 611 to 500 lines): diff -r 1d0727a50c9a -r cebad674f368 ChangeLog --- a/ChangeLog Sat Nov 12 10:40:23 2022 -0600 +++ b/ChangeLog Sat Nov 12 14:44:13 2022 -0600 @@ -1,5 +1,21 @@ 2022-11-12 Bob Friesenhahn <[email protected]> + * coders/msl.c (ProcessMSLScript): Handle parser creation failure. + + * coders/meta.c (GetIPTCStream): Assure that offset is initialized. + + * magick/floats.c (_Gm_convert_fp32_to_fp16): Fix Clang Analyzer + complaints. + + * magick/xwindow.c (MagickXGetWindowColor): Assure that crop_info + is initialized. + + * Makefile.am (scan-build): Added a scan-build target to help run + Clang Analyzer. + + * coders/locale.c (WriteLOCALEImage): Fix Clang Analyzer + complaints. + * ALL: Replace strcpy() with strlcpy(), replace strcat() with strlcat(), replace sprintf() with snprintf(). Prefer using bounded string functions. diff -r 1d0727a50c9a -r cebad674f368 Makefile.am --- a/Makefile.am Sat Nov 12 10:40:23 2022 -0600 +++ b/Makefile.am Sat Nov 12 14:44:13 2022 -0600 @@ -8,6 +8,8 @@ # # +.PHONY: www srpm rpm profile scan-build + # Don't require all the GNU mandated files # Use XZ_OPT (a environment variable) to tune xz compression levels (e.g. XZ_OPT=-8e) # nostdinc @@ -201,7 +203,6 @@ $(WWWWANDAPI_MAINTAINER_TARGETS) # Target to build just the web pages. -.PHONY: www www : $(WWW_MAINTAINER_TARGETS) $(WWWAPI_MAINTAINER_TARGETS) $(WWWWANDAPI_MAINTAINER_TARGETS) endif @@ -330,7 +331,6 @@ if HAS_RPM DIST_ARCHIVE_SRPM=$(distdir)-1.src.rpm -.PHONY: srpm $(DIST_ARCHIVE_SRPM) srpm: $(distdir).tar.bz2 rm -f $(DIST_ARCHIVE_SRPM) $(RPM) --define="_sourcedir `pwd`" --define="_srcrpmdir `pwd`" --nodeps -bs GraphicsMagick.spec @@ -348,7 +348,6 @@ $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-devel-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-1.$(RPMARCH).rpm \ $(RPMDIR)/$(RPMARCH)/$(PACKAGE_NAME)-perl-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM)-1.$(RPMARCH).rpm -.PHONY: rpm rpm: rm -rf $(RPMDIR) $(MKDIR_P) $(RPMDIR) @@ -448,7 +447,6 @@ $(RM) -rf $(COVERITY_COV_INT) # Rules for a profiled build (according to Paolo Bonzini <[email protected]>) -#.PHONY: profile #profile: # $(MAKE) clean # $(MAKE) CFLAGS="$(CFLAGS) -fprofile-generate" @@ -477,3 +475,21 @@ $(GPG) --output $${file}.asc --armor --detach-sig $${file} ; \ sha256sum $${file} > $${file}.sum ; \ done + +# Run Clang analyzer on the project. +# In order for this to work, you must have first installed the 'clang' +# and 'clang-tools' packages on your system. +# The project should have been configured to use clang. +# -enable-checker security.insecureAPI.DeprecatedOrUnsafeBufferHandling +scan-build: + scan-build-12 -k --html-title='GraphicsMagick' \ + -maxloop 100 \ + -disable-checker deadcode.DeadStores \ + -enable-checker security.insecureAPI.bcmp \ + -enable-checker security.insecureAPI.bcopy \ + -enable-checker security.insecureAPI.bzero \ + -enable-checker security.insecureAPI.strcpy \ + -enable-checker valist.CopyToSelf \ + -enable-checker valist.Uninitialized \ + -enable-checker valist.Unterminated \ + --use-cc $(CC) $(MAKE) diff -r 1d0727a50c9a -r cebad674f368 Makefile.in --- a/Makefile.in Sat Nov 12 10:40:23 2022 -0600 +++ b/Makefile.in Sat Nov 12 14:44:13 2022 -0600 @@ -225,8 +225,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/pkg.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ @@ -4931,7 +4931,6 @@ COVERITY_COV_INT = 'cov-int' # Rules for a profiled build (according to Paolo Bonzini <[email protected]>) -#.PHONY: profile #profile: # $(MAKE) clean # $(MAKE) CFLAGS="$(CFLAGS) -fprofile-generate" @@ -11047,6 +11046,8 @@ .PRECIOUS: Makefile + +.PHONY: www srpm rpm profile scan-build magick-install-data-local: $(mkinstalldirs) $(DESTDIR)$(magickincdir) $(INSTALL_HEADER) magick/magick_config_api.h $(DESTDIR)$(magickincdir)/magick_config.h @@ -11325,7 +11326,6 @@ @WITH_PERL_FALSE@distclean-perl: # Target to build just the web pages. -@[email protected]: www @MAINTAINER_MODE_TRUE@www : $(WWW_MAINTAINER_TARGETS) $(WWWAPI_MAINTAINER_TARGETS) $(WWWWANDAPI_MAINTAINER_TARGETS) all-local: $(MAGICKPP_LOCAL_TARGETS) \ @@ -11422,7 +11422,6 @@ @HAS_P7ZIP_TRUE@ $(P7ZIP) a -t7z -mx=9 $(DIST_WINDOWS_SRC_7ZIP) $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) @HAS_P7ZIP_TRUE@ chmod 644 $(DIST_WINDOWS_SRC_7ZIP) rm -rf $(PACKAGE_NAME)-$(PACKAGE_VERSION)$(PACKAGE_VERSION_ADDENDUM) -@[email protected]: srpm @HAS_RPM_TRUE@$(DIST_ARCHIVE_SRPM) srpm: $(distdir).tar.bz2 @HAS_RPM_TRUE@ rm -f $(DIST_ARCHIVE_SRPM) @HAS_RPM_TRUE@ $(RPM) --define="_sourcedir `pwd`" --define="_srcrpmdir `pwd`" --nodeps -bs GraphicsMagick.spec @@ -11430,7 +11429,6 @@ @HAS_RPM_TRUE@ @echo $(DIST_ARCHIVE_SRPM) is ready for distribution. @HAS_RPM_TRUE@ @echo ============================================================== -@[email protected]: rpm @HAS_RPM_TRUE@rpm: @HAS_RPM_TRUE@ rm -rf $(RPMDIR) @HAS_RPM_TRUE@ $(MKDIR_P) $(RPMDIR) @@ -11508,6 +11506,24 @@ sha256sum $${file} > $${file}.sum ; \ done +# Run Clang analyzer on the project. +# In order for this to work, you must have first installed the 'clang' +# and 'clang-tools' packages on your system. +# The project should have been configured to use clang. +# -enable-checker security.insecureAPI.DeprecatedOrUnsafeBufferHandling +scan-build: + scan-build-12 -k --html-title='GraphicsMagick' \ + -maxloop 100 \ + -disable-checker deadcode.DeadStores \ + -enable-checker security.insecureAPI.bcmp \ + -enable-checker security.insecureAPI.bcopy \ + -enable-checker security.insecureAPI.bzero \ + -enable-checker security.insecureAPI.strcpy \ + -enable-checker valist.CopyToSelf \ + -enable-checker valist.Uninitialized \ + -enable-checker valist.Unterminated \ + --use-cc $(CC) $(MAKE) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -r 1d0727a50c9a -r cebad674f368 aclocal.m4 --- a/aclocal.m4 Sat Nov 12 10:40:23 2022 -0600 +++ b/aclocal.m4 Sat Nov 12 14:44:13 2022 -0600 @@ -20,106 +20,6 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -# serial 5 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) - # Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -1271,5 +1171,6 @@ m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) m4_include([m4/pkg.m4]) m4_include([acinclude.m4]) diff -r 1d0727a50c9a -r cebad674f368 coders/locale.c --- a/coders/locale.c Sat Nov 12 10:40:23 2022 -0600 +++ b/coders/locale.c Sat Nov 12 14:44:13 2022 -0600 @@ -822,7 +822,7 @@ text[MaxTextExtent], path[MaxTextExtent]; - int + unsigned int index; register char @@ -834,6 +834,8 @@ p=path+strlen(path)-1; if (*p == '/') *p='\0'; + for (index=0; index < ArraySize(fields) ; index++) + fields[index]=""; for (index=0; (index < 4) && (p > path); p--) { if (*p == '/') @@ -873,8 +875,10 @@ text[MaxTextExtent], path[MaxTextExtent]; + unsigned int + index; + int - index, severityindex; size_t @@ -902,7 +906,8 @@ p=path+strlen(path)-1; if (*p == '/') *p='\0'; - fields[0]=""; /* this one may not exist */ + for (index=0; index < ArraySize(fields) ; index++) + fields[index]=""; for (index=0; (index < TREE_LEVELS_SUPPORTED) && (p > path); p--) { if (*p == '/') @@ -942,7 +947,8 @@ p=path+strlen(path)-1; if (*p == '/') *p='\0'; - fields[0]=""; /* this one may not exist */ + for (index=0; index < ArraySize(fields) ; index++) + fields[index]=""; for (index=0; (index < TREE_LEVELS_SUPPORTED) && (p > path); p--) { if (*p == '/') @@ -994,7 +1000,8 @@ p=path+strlen(path)-1; if (*p == '/') *p='\0'; - fields[0]=""; /* this one may not exist */ + for (index=0; index < ArraySize(fields) ; index++) + fields[index]=""; for (index=0; (index < TREE_LEVELS_SUPPORTED) && (p > path); p--) { if (*p == '/') @@ -1040,7 +1047,8 @@ p=path+strlen(path)-1; if (*p == '/') *p='\0'; - fields[0]=""; /* this one may not exist */ + for (index=0; index < ArraySize(fields) ; index++) + fields[index]=""; for (index=0; (index < TREE_LEVELS_SUPPORTED) && (p > path); p--) { if (*p == '/') @@ -1075,7 +1083,8 @@ p=path+strlen(path)-1; if (*p == '/') *p='\0'; - fields[0]=""; /* this one may not exist */ + for (index=0; index < ArraySize(fields) ; index++) + fields[index]=""; for (index=0; (index < TREE_LEVELS_SUPPORTED) && (p > path); p--) { if (*p == '/') @@ -1112,7 +1121,8 @@ p=path+strlen(path)-1; if (*p == '/') *p='\0'; - fields[0]=""; /* this one may not exist */ + for (index=0; index < ArraySize(fields) ; index++) + fields[index]=""; for (index=0; (index < TREE_LEVELS_SUPPORTED) && (p > path); p--) { if (*p == '/') diff -r 1d0727a50c9a -r cebad674f368 coders/meta.c --- a/coders/meta.c Sat Nov 12 10:40:23 2022 -0600 +++ b/coders/meta.c Sat Nov 12 14:44:13 2022 -0600 @@ -1665,12 +1665,12 @@ tag_length, blob_remaining; + *offset=0; p=blob; blob_remaining=blob_length; if ((*p == 0x1c) && (*(p+1) == 0x02)) { /* This looks like a plain IPTC record 2 block so drop through */ - *offset=0; return blob_length; } @@ -2384,11 +2384,9 @@ ThrowWriterException(CoderError,NoIPTCProfileAvailable,image); status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception); length=GetIPTCStream(profile,profile_length,&iptc_offset); + if (length == 0) + ThrowWriterException(CoderError,NoIPTCInfoWasFound,image); info=profile+iptc_offset; - if (length == 0) - { - ThrowWriterException(CoderError,NoIPTCInfoWasFound,image); - } (void) WriteBlob(image,length,info); CloseBlob(image); return MagickPass; diff -r 1d0727a50c9a -r cebad674f368 coders/msl.c --- a/coders/msl.c Sat Nov 12 10:40:23 2022 -0600 +++ b/coders/msl.c Sat Nov 12 14:44:13 2022 -0600 @@ -4629,7 +4629,9 @@ msl_image->filename); if (msl_info.parser == (xmlParserCtxtPtr) NULL) { - /* FIXME: Handle failure! */ + ThrowException3(exception,ResourceLimitError, + MemoryAllocationFailed,UnableToInterpretMSLImage); + goto parser_alloc_failure; } while (ReadBlobString(msl_image,message) != (char *) NULL) { @@ -4709,6 +4711,8 @@ } } + parser_alloc_failure: + /* FIXME: May also need to handle group destruction similar to in MSLEndElement() if libxml2 does not process an end element. diff -r 1d0727a50c9a -r cebad674f368 config/config.guess --- a/config/config.guess Sat Nov 12 10:40:23 2022 -0600 +++ b/config/config.guess Sat Nov 12 14:44:13 2022 -0600 @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-08-01' +timestamp='2022-09-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -966,6 +966,12 @@ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; + x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-pc-managarm-mlibc" + ;; + *:[Mm]anagarm:*:*) + GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" + ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; diff -r 1d0727a50c9a -r cebad674f368 config/config.sub --- a/config/config.sub Sat Nov 12 10:40:23 2022 -0600 +++ b/config/config.sub Sat Nov 12 14:44:13 2022 -0600 @@ -4,7 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-08-01' +timestamp='2022-09-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -145,7 +145,7 @@ nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ - | storm-chaos* | os2-emx* | rtmk-nova*) + | storm-chaos* | os2-emx* | rtmk-nova* | managarm-*) basic_machine=$field1 basic_os=$maybe_os ;; @@ -1341,6 +1341,10 @@ kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; + managarm*) + kernel=managarm + os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` + ;; *) kernel= os=$basic_os @@ -1754,7 +1758,7 @@ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* ) + | fiwix* | mlibc* ) ;; # This one is extra strict with allowed versions