Projects
Mega:23.09
libXpm
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
_service:tar_scm:libXpm.spec
Changed
@@ -1,14 +1,14 @@ Name: libXpm -Version: 3.5.16 +Version: 3.5.17 Release: 1 License: MIT Summary: X.Org X11 libXpm runtime library URL: https://www.x.org -Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.gz +Source0: https://www.x.org/pub/individual/lib/%{name}-%{version}.tar.xz BuildRequires: xorg-x11-util-macros autoconf automake libtool BuildRequires: gettext libXau-devel libXext-devel libXt-devel -BuildRequires: ncompress +BuildRequires: ncompress glib2-devel %description X.Org X11 libXpm runtime library @@ -36,6 +36,9 @@ %ldconfig_scriptlets +%check +make check + %files %defattr(-,root,root) %doc AUTHORS @@ -56,6 +59,12 @@ %{_mandir}/man3/*.3* %changelog +* Wed Oct 04 2023 Funda Wang <fundawang@yeah.net> - 3.5.17-1 +- New version 3.5.17 + +* Wed Sep 20 2023 zhangpan <zhangpan103@h-partners.com> - 3.5.16-2 +- enable make check + * Thu Jul 20 2023 zhangpan <zhangpan103@h-partners.com> - 3.5.16-1 - update to 3.5.16
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="url">git@gitee.com:src-openeuler/libXpm.git</param> <param name="scm">git</param> - <param name="revision">openEuler-23.09</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/ChangeLog -> _service:tar_scm:libXpm-3.5.17.tar.xz/ChangeLog
Changed
@@ -1,3 +1,128 @@ +commit a154f12b6e56f131bd5880fc96f11615ff940b29 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Oct 3 08:43:57 2023 -0700 + + libXpm 3.5.17 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 91f887b41bf75648df725a4ed3be036da02e911e +Author: Yair Mizrahi <yairm@jfrog.com> +Date: Thu Sep 7 16:59:07 2023 -0700 + + Avoid CVE-2023-43787 (integer overflow in XCreateImage) + + This doesn't fix the CVE - that has to happen in libX11, this + just tries to avoid triggering it from libXpm, and saves time + in not pretending we can successfully create an X Image for + which the width * depth would overflow the signed int used to + store the bytes_per_line value. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 00348988396c88150f6ddfea3d3195cbf01d60c2 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Sep 7 16:55:25 2023 -0700 + + test: Add test case for CVE-2023-43787 (integer overflow in XCreateImage) + + Provided by Yair Mizrahi of the JFrog Vulnerability Research team + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 84fb14574c039f19ad7face87eb9acc31a50701c +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Wed Sep 6 17:34:33 2023 -0700 + + Avoid CVE-2023-43786: stack exhaustion in XPutImage() + + This doesn't fix the CVE - that has to happen in libX11, this + just tries to avoid triggering it from libXpm, and saves time + in not pretending we can successfully create an X11 pixmap with + dimensions larger than the unsigned 16-bit integers used in the + X11 protocol for the dimensions. + + Reported by Yair Mizrahi of the JFrog Vulnerability Research team + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit edb97396620f019f8d2e707ad3fbaf6bbbd5ed36 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Sep 5 17:01:58 2023 -0700 + + test: Add test case for CVE-2023-43786 (stack exhaustion in PutImage) + + Provided by Yair Mizrahi of the JFrog Vulnerability Research team + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7e21cb63b9a1ca760a06cc4cd9b19bbc3fcd8f51 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 29 18:30:34 2023 -0700 + + Fix CVE-2023-43789: Out of bounds read on XPM with corrupted colormap + + Found with clang's libfuzzer + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit a21e7bcf0ca3d8c1605b2721a545440260870438 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 29 18:29:29 2023 -0700 + + test: Add test case for CVE-2023-43789 (corrupt colormap info) + + Generated by clang's -fsanitize/libfuzzer + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 2fa554b01ef6079a9b35df9332bdc4f139ed67e0 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Apr 29 17:50:39 2023 -0700 + + Fix CVE-2023-43788: Out of bounds read in XpmCreateXpmImageFromBuffer + + When the test case for CVE-2022-46285 was run with the Address Sanitizer + enabled, it found an out-of-bounds read in ParseComment() when reading + from a memory buffer instead of a file, as it continued to look for the + closing comment marker past the end of the buffer. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7f60f3428aa21d5d643eb75bfd9417cfabf48970 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Sep 5 17:35:55 2023 -0700 + + Explicitly mark non-static symbols as export or hidden + + Hides private API from external linkage + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 2695ccda5df58af60ebb15bb17f1570437554adb +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 20 13:47:52 2023 -0700 + + test: use g_pattern_spec_match_string if available + + g_pattern_spec_match_string was introduced in glib 2.70 to replace + g_pattern_match_string which is deprecated in glib 2.70 and later. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 4524c578581b427145ae136844fc655a89e94777 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Mar 27 18:35:46 2023 -0700 + + Set close-on-exec when opening files + + Relies on platforms with O_CLOEXEC support following POSIX requirement + to not copy the close-on-exec flag to the new fd in dup2(), but to leave + it unset instead, since that's how fd's are passed to child processes + to handled compressed files. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + commit f131de92d6c4e2f62934e85b012287276ecf009c Author: Matt Turner <mattst88@gmail.com> Date: Mon Apr 17 15:22:35 2023 -0400 @@ -1666,6 +1791,9 @@ Removed inclusion of unnecessary kernel header on Linux. This may fail in an -ansi environment. +Notes: + Fixes CVE-2004-0687 (integer overflows) and CVE-2004-0688 (stack overflows) + commit 2773a7214e282f6f673483f5233b880505947c3f Author: Egbert Eich <eich@suse.de> Date: Fri Apr 23 18:42:32 2004 +0000
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/aclocal.m4 -> _service:tar_scm:libXpm-3.5.17.tar.xz/aclocal.m4
Changed
@@ -20,9 +20,1137 @@ 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'.)) -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 11 (pkg-config-0.29.1) +# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN(AM_AUTOMAKE_VERSION, +am__api_version='1.16' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if($1, 1.16.5, , + AC_FATAL(Do not call $0, use AM_INIT_AUTOMAKE($1).))dnl +) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define(_AM_AUTOCONF_VERSION, ) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN(AM_SET_CURRENT_AUTOMAKE_VERSION, +AM_AUTOMAKE_VERSION(1.16.5)dnl +m4_ifndef(AC_AUTOCONF_VERSION, + m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl +_AM_AUTOCONF_VERSION(m4_defn(AC_AUTOCONF_VERSION))) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# +# 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. + +# For projects using AC_CONFIG_AUX_DIR(foo), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN(AM_AUX_DIR_EXPAND, +AC_REQUIRE(AC_CONFIG_AUX_DIR_DEFAULT)dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` +) + +# AM_CONDITIONAL -*- Autoconf -*- +# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# +# 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. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN(AM_CONDITIONAL, +AC_PREREQ(2.52)dnl + m4_if($1, TRUE, AC_FATAL($0: invalid condition: $1), + $1, FALSE, AC_FATAL($0: invalid condition: $1))dnl +AC_SUBST($1_TRUE)dnl +AC_SUBST($1_FALSE)dnl +_AM_SUBST_NOTMAKE($1_TRUE)dnl +_AM_SUBST_NOTMAKE($1_FALSE)dnl +m4_define(_AM_COND_VALUE_$1, $2)dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR(conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.) +fi)) + +# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# +# 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. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN(_AM_DEPENDENCIES, +AC_REQUIRE(AM_SET_DEPDIR)dnl +AC_REQUIRE(AM_OUTPUT_DEPENDENCY_COMMANDS)dnl +AC_REQUIRE(AM_MAKE_INCLUDE)dnl +AC_REQUIRE(AM_DEP_TRACK)dnl + +m4_if($1, CC, depcc="$CC" am_compiler_list=, + $1, CXX, depcc="$CXX" am_compiler_list=, + $1, OBJC, depcc="$OBJC" am_compiler_list='gcc3 gcc', + $1, OBJCXX, depcc="$OBJCXX" am_compiler_list='gcc3 gcc', + $1, UPC, depcc="$UPC" am_compiler_list=, + $1, GCJ, depcc="$GCJ" am_compiler_list='gcc3 gcc', + depcc="$$1" am_compiler_list=) + +AC_CACHE_CHECK(dependency style of $depcc, + am_cv_$1_dependencies_compiler_type, +if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\(a-zA-Z0-9*\))$/\1/p' < ./depcomp` + fi + am__universal=false + m4_case($1, CC, + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac, + CXX, + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac)
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/config.guess -> _service:tar_scm:libXpm-3.5.17.tar.xz/config.guess
Changed
@@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-09-17' +timestamp='2023-01-01' # 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 @@ -60,7 +60,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/config.h.in -> _service:tar_scm:libXpm-3.5.17.tar.xz/config.h.in
Changed
@@ -9,6 +9,9 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H +/* Define to 1 if you have the `g_pattern_spec_match_string' function. */ +#undef HAVE_G_PATTERN_SPEC_MATCH_STRING + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/config.sub -> _service:tar_scm:libXpm-3.5.17.tar.xz/config.sub
Changed
@@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2022 Free Software Foundation, Inc. +# Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2022-09-17' +timestamp='2023-01-21' # 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 @@ -76,7 +76,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2022 Free Software Foundation, Inc. +Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -1075,7 +1075,7 @@ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; - pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*) + pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/configure -> _service:tar_scm:libXpm-3.5.17.tar.xz/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libXpm 3.5.16. +# Generated by GNU Autoconf 2.71 for libXpm 3.5.17. # # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxpm/-/issues/>. # @@ -622,8 +622,8 @@ # Identity of this package. PACKAGE_NAME='libXpm' PACKAGE_TARNAME='libXpm' -PACKAGE_VERSION='3.5.16' -PACKAGE_STRING='libXpm 3.5.16' +PACKAGE_VERSION='3.5.17' +PACKAGE_STRING='libXpm 3.5.17' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libxpm/-/issues/' PACKAGE_URL='' @@ -1412,7 +1412,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libXpm 3.5.16 to adapt to many kinds of systems. +\`configure' configures libXpm 3.5.17 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1483,7 +1483,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libXpm 3.5.16:";; + short | recursive ) echo "Configuration of libXpm 3.5.17:";; esac cat <<\_ACEOF @@ -1620,7 +1620,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libXpm configure 3.5.16 +libXpm configure 3.5.17 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1772,7 +1772,7 @@ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (void); below. */ + which can conflict with char $2 (); below. */ #include <limits.h> #undef $2 @@ -1783,7 +1783,7 @@ #ifdef __cplusplus extern "C" #endif -char $2 (void); +char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -1890,7 +1890,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libXpm $as_me 3.5.16, which was +It was created by libXpm $as_me 3.5.17, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2176,7 +2176,9 @@ /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (char **p, int i) +static char *e (p, i) + char **p; + int i; { return pi; } @@ -2227,7 +2229,6 @@ extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); -extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -3164,7 +3165,7 @@ # Define the identity of the package. PACKAGE='libXpm' - VERSION='3.5.16' + VERSION='3.5.17' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -5397,11 +5398,6 @@ lt_cv_sys_max_cmd_len=8192; ;; - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -7362,10 +7358,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - powerpcle-*linux*|powerpc64le-*linux*) + powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; - powerpc-*linux*|powerpc64-*linux*) + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -11393,11 +11389,11 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' @@ -11423,14 +11419,7 @@ *) objformat=elf ;; esac fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - + version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -11442,12 +11431,6 @@ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in @@ -12082,14 +12065,8 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (void); + builtin and then its argument prototype would still apply. */ +char dlopen (); int main (void) { @@ -12150,14 +12127,8 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. - The 'extern "C"' is for builds by C++ compilers; - although this is not generally supported in C code supporting it here - has little cost and some practical benefit (sr 110532). */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (void); + builtin and then its argument prototype would still apply. */ +char shl_load ();
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/configure.ac -> _service:tar_scm:libXpm-3.5.17.tar.xz/configure.ac
Changed
@@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ(2.60) -AC_INIT(libXpm, 3.5.16, +AC_INIT(libXpm, 3.5.17, https://gitlab.freedesktop.org/xorg/lib/libxpm/-/issues/, libXpm) AC_CONFIG_SRCDIR(Makefile.am) AC_CONFIG_HEADERS(config.h) @@ -103,6 +103,9 @@ AC_REQUIRE_AUX_FILE(tap-driver.sh) XORG_ENABLE_UNIT_TESTS XORG_WITH_GLIB(2.46) +if test "x$have_glib" = x"yes"; then + AC_CHECK_FUNCS(g_pattern_spec_match_string) +fi XORG_MEMORY_CHECK_FLAGS AC_CONFIG_FILES(Makefile
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/include/X11/xpm.h -> _service:tar_scm:libXpm-3.5.17.tar.xz/include/X11/xpm.h
Changed
@@ -73,6 +73,7 @@ # ifdef AMIGA # include "amigax.h" # else /* not AMIGA */ +# include <X11/Xfuncproto.h> # include <X11/Xlib.h> # include <X11/Xutil.h> # endif /* not AMIGA */ @@ -275,7 +276,12 @@ /* macros for forward declarations of functions with prototypes */ -#define FUNC(f, t, p) extern t f p +#ifndef _X_EXPORT +# define _X_EXPORT +# define _X_HIDDEN +#endif +#define FUNC(f, t, p) extern _X_EXPORT t f p +#define HFUNC(f, t, p) extern _X_HIDDEN t f p #define LFUNC(f, t, p) static t f p
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/ltmain.sh -> _service:tar_scm:libXpm-3.5.17.tar.xz/ltmain.sh
Changed
@@ -7355,16 +7355,6 @@ *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac - - # As we are forced to pass -nostdlib to g++ during linking, the option - # -pthread{,s} is not in effect; add the -lpthread to $deplist - # explicitly to link correctly. - if test "$tagname" = CXX -a x"$with_gcc" = xyes; then - case "$arg" in - -pthread*) func_append deplibs " -lpthread" ;; - esac - fi - continue ;; @@ -7568,11 +7558,10 @@ # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC # -Wa,* Pass flags directly to the assembler - # -Werror, -Werror=* Report (specified) warnings as errors -64|-mips0-9|-r0-90-9*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t45*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg"
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/m4/libtool.m4 -> _service:tar_scm:libXpm-3.5.17.tar.xz/m4/libtool.m4
Changed
@@ -1415,10 +1415,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - powerpcle-*linux*|powerpc64le-*linux*) + powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; - powerpc-*linux*|powerpc64-*linux*) + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1719,11 +1719,6 @@ lt_cv_sys_max_cmd_len=8192; ;; - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -2661,11 +2656,11 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if($1, , sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib") sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' @@ -2691,14 +2686,7 @@ *) objformat=elf ;; esac fi - # Handle Gentoo/FreeBSD as it was Linux - case $host_vendor in - gentoo) - version_type=linux ;; - *) - version_type=freebsd-$objformat ;; - esac - + version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' @@ -2710,12 +2698,6 @@ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; - linux) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - need_lib_prefix=no - need_version=no - ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/CrPFrBuf.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/CrPFrBuf.c
Changed
@@ -46,7 +46,7 @@ Pixmap *shapemask_return, XpmAttributes *attributes) { - XImage *ximage, *shapeimage; + XImage *ximage = NULL, *shapeimage = NULL; int ErrorStatus; /* initialize return values */ @@ -63,16 +63,34 @@ attributes); if (ErrorStatus < 0) /* fatal error */ - return (ErrorStatus); + goto cleanup; /* create the pixmaps and destroy images */ if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); + if (ErrorStatus < 0) /* fatal error */ + goto cleanup; } if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + } + + cleanup: + if (ximage != NULL) + XDestroyImage(ximage); + if (shapeimage != NULL) XDestroyImage(shapeimage); + if (ErrorStatus < 0) { + if (pixmap_return && *pixmap_return) { + XFreePixmap(display, *pixmap_return); + *pixmap_return = 0; + } + if (shapemask_return && *shapemask_return) { + XFreePixmap(display, *shapemask_return); + *shapemask_return = 0; + } } return (ErrorStatus); }
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/CrPFrDat.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/CrPFrDat.c
Changed
@@ -46,7 +46,7 @@ Pixmap *shapemask_return, XpmAttributes *attributes) { - XImage *ximage, *shapeimage; + XImage *ximage = NULL, *shapeimage = NULL; int ErrorStatus; /* initialize return values */ @@ -63,19 +63,34 @@ attributes); if (ErrorStatus != XpmSuccess) - return (ErrorStatus); - - if (ErrorStatus < 0) /* fatal error */ - return (ErrorStatus); + goto cleanup; /* create the pixmaps and destroy images */ if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); + if (ErrorStatus < 0) /* fatal error */ + goto cleanup; } if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + } + + cleanup: + if (ximage != NULL) + XDestroyImage(ximage); + if (shapeimage != NULL) XDestroyImage(shapeimage); + if (ErrorStatus < 0) { + if (pixmap_return && *pixmap_return) { + XFreePixmap(display, *pixmap_return); + *pixmap_return = 0; + } + if (shapemask_return && *shapemask_return) { + XFreePixmap(display, *shapemask_return); + *shapemask_return = 0; + } } return (ErrorStatus); }
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/CrPFrI.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/CrPFrI.c
Changed
@@ -36,8 +36,9 @@ #include <config.h> #endif #include "XpmI.h" +#include <stdint.h> -void +int xpmCreatePixmapFromImage( Display *display, Drawable d, @@ -47,6 +48,11 @@ GC gc; XGCValues values; + /* X Pixmaps are limited to unsigned 16-bit height/width */ + if ((ximage->width > UINT16_MAX) || (ximage->height > UINT16_MAX)) { + return XpmNoMemory; + } + *pixmap_return = XCreatePixmap(display, d, ximage->width, ximage->height, ximage->depth); /* set fg and bg in case we have an XYBitmap */ @@ -59,4 +65,6 @@ ximage->width, ximage->height); XFreeGC(display, gc); + + return XpmSuccess; }
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/RdFToBuf.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/RdFToBuf.c
Changed
@@ -72,7 +72,7 @@ *buffer_return = NULL; #ifndef VAX11C - fd = open(filename, O_RDONLY); + fd = open(filename, O_RDONLY | O_CLOEXEC); #else fd = open(filename, O_RDONLY, NULL); #endif
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/RdFToI.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/RdFToI.c
Changed
@@ -53,7 +53,7 @@ LFUNC(OpenReadFile, int, (const char *filename, xpmData *mdata)); LFUNC(xpmDataClose, void, (xpmData *mdata)); -FUNC(xpmPipeThrough, FILE*, (int fd, +HFUNC(xpmPipeThrough, FILE*, (int fd, const char *cmd, const char *arg1, const char *mode)); @@ -212,7 +212,7 @@ mdata->stream.file = (stdin); mdata->type = XPMFILE; } else { - int fd = open(filename, O_RDONLY); + int fd = open(filename, O_RDONLY | O_CLOEXEC); #if defined(NO_ZPIPE) if ( fd < 0 ) return XpmOpenFailed; @@ -229,11 +229,11 @@ return (XpmNoMemory); strcpy(compressfile, filename); strcpy(compressfile + len, ext = ".Z"); - fd = open(compressfile, O_RDONLY); + fd = open(compressfile, O_RDONLY | O_CLOEXEC); if ( fd < 0 ) { strcpy(compressfile + len, ext = ".gz"); - fd = open(compressfile, O_RDONLY); + fd = open(compressfile, O_RDONLY | O_CLOEXEC); if ( fd < 0 ) { XpmFree(compressfile);
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/RdFToP.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/RdFToP.c
Changed
@@ -46,7 +46,7 @@ Pixmap *shapemask_return, XpmAttributes *attributes) { - XImage *ximage, *shapeimage; + XImage *ximage = NULL, *shapeimage = NULL; int ErrorStatus; /* initialize return values */ @@ -62,16 +62,34 @@ attributes); if (ErrorStatus < 0) /* fatal error */ - return (ErrorStatus); + goto cleanup; /* create the pixmaps and destroy images */ if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); + if (ErrorStatus < 0) /* fatal error */ + goto cleanup; } if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + } + + cleanup: + if (ximage != NULL) + XDestroyImage(ximage); + if (shapeimage != NULL) XDestroyImage(shapeimage); + if (ErrorStatus < 0) { + if (pixmap_return && *pixmap_return) { + XFreePixmap(display, *pixmap_return); + *pixmap_return = 0; + } + if (shapemask_return && *shapemask_return) { + XFreePixmap(display, *shapemask_return); + *shapemask_return = 0; + } } return (ErrorStatus); }
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/WrFFrBuf.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/WrFFrBuf.c
Changed
@@ -45,7 +45,7 @@ char *buffer) { size_t fcheck, len; - FILE *fp = fopen(filename, "w"); + FILE *fp = fopen(filename, "w" FOPEN_CLOEXEC); if (!fp) return XpmOpenFailed;
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/WrFFrI.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/WrFFrI.c
Changed
@@ -315,7 +315,7 @@ #ifndef NO_ZPIPE -FUNC(xpmPipeThrough, FILE*, (int fd, +HFUNC(xpmPipeThrough, FILE*, (int fd, const char* cmd, const char* arg1, const char* mode)); @@ -336,7 +336,7 @@ #ifndef NO_ZPIPE size_t len; #endif - int fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644); + int fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644); if ( fd < 0 ) return(XpmOpenFailed); #ifndef NO_ZPIPE
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/XpmI.h -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/XpmI.h
Changed
@@ -103,6 +103,13 @@ # endif #endif +#ifdef O_CLOEXEC +# define FOPEN_CLOEXEC "e" +#else +# define FOPEN_CLOEXEC "" +# define O_CLOEXEC 0 +#endif + #define XPMMAXCMTLEN BUFSIZ typedef struct { unsigned int type; @@ -144,7 +151,7 @@ const char *Eoa; /* string ending assignment */ } xpmDataType; -extern xpmDataType xpmDataTypes; +extern _X_HIDDEN xpmDataType xpmDataTypes; /* * rgb values and ascii names (from rgb text file) rgb values, @@ -158,7 +165,7 @@ /* Maximum number of rgb mnemonics allowed in rgb text file. */ #define MAX_RGBNAMES 1024 -extern const char *xpmColorKeys; +extern _X_HIDDEN const char *xpmColorKeys; #define TRANSPARENT_COLOR "None" /* this must be a string! */ @@ -167,31 +174,31 @@ /* XPM internal routines */ -FUNC(xpmParseData, int, (xpmData *data, XpmImage *image, XpmInfo *info)); -FUNC(xpmParseDataAndCreate, int, (Display *display, xpmData *data, +HFUNC(xpmParseData, int, (xpmData *data, XpmImage *image, XpmInfo *info)); +HFUNC(xpmParseDataAndCreate, int, (Display *display, xpmData *data, XImage **image_return, XImage **shapeimage_return, XpmImage *image, XpmInfo *info, XpmAttributes *attributes)); -FUNC(xpmFreeColorTable, void, (XpmColor *colorTable, int ncolors)); +HFUNC(xpmFreeColorTable, void, (XpmColor *colorTable, int ncolors)); -FUNC(xpmInitAttributes, void, (XpmAttributes *attributes)); +HFUNC(xpmInitAttributes, void, (XpmAttributes *attributes)); -FUNC(xpmInitXpmImage, void, (XpmImage *image)); +HFUNC(xpmInitXpmImage, void, (XpmImage *image)); -FUNC(xpmInitXpmInfo, void, (XpmInfo *info)); +HFUNC(xpmInitXpmInfo, void, (XpmInfo *info)); -FUNC(xpmSetInfoMask, void, (XpmInfo *info, XpmAttributes *attributes)); -FUNC(xpmSetInfo, void, (XpmInfo *info, XpmAttributes *attributes)); -FUNC(xpmSetAttributes, void, (XpmAttributes *attributes, XpmImage *image, +HFUNC(xpmSetInfoMask, void, (XpmInfo *info, XpmAttributes *attributes)); +HFUNC(xpmSetInfo, void, (XpmInfo *info, XpmAttributes *attributes)); +HFUNC(xpmSetAttributes, void, (XpmAttributes *attributes, XpmImage *image, XpmInfo *info)); #if !defined(FOR_MSW) && !defined(AMIGA) -FUNC(xpmCreatePixmapFromImage, void, (Display *display, Drawable d, +HFUNC(xpmCreatePixmapFromImage, int, (Display *display, Drawable d, XImage *ximage, Pixmap *pixmap_return)); -FUNC(xpmCreateImageFromPixmap, void, (Display *display, Pixmap pixmap, +HFUNC(xpmCreateImageFromPixmap, void, (Display *display, Pixmap pixmap, XImage **ximage_return, unsigned int *width, unsigned int *height)); @@ -211,10 +218,10 @@ xpmHashAtom *atomTable; } xpmHashTable; -FUNC(xpmHashTableInit, int, (xpmHashTable *table)); -FUNC(xpmHashTableFree, void, (xpmHashTable *table)); -FUNC(xpmHashSlot, xpmHashAtom *, (xpmHashTable *table, char *s)); -FUNC(xpmHashIntern, int, (xpmHashTable *table, char *tag, void *data)); +HFUNC(xpmHashTableInit, int, (xpmHashTable *table)); +HFUNC(xpmHashTableFree, void, (xpmHashTable *table)); +HFUNC(xpmHashSlot, xpmHashAtom *, (xpmHashTable *table, char *s)); +HFUNC(xpmHashIntern, int, (xpmHashTable *table, char *tag, void *data)); #if defined(_MSC_VER) && defined(_M_X64) #define HashAtomData(i) ((void *)(long long)i) @@ -227,45 +234,45 @@ /* I/O utility */ -FUNC(xpmNextString, int, (xpmData *mdata)); -FUNC(xpmNextUI, int, (xpmData *mdata, unsigned int *ui_return)); -FUNC(xpmGetString, int, (xpmData *mdata, char **sptr, unsigned int *l)); +HFUNC(xpmNextString, int, (xpmData *mdata)); +HFUNC(xpmNextUI, int, (xpmData *mdata, unsigned int *ui_return)); +HFUNC(xpmGetString, int, (xpmData *mdata, char **sptr, unsigned int *l)); #define xpmGetC(mdata) \ ((!mdata->type || mdata->type == XPMBUFFER) ? \ (*mdata->cptr++) : (getc(mdata->stream.file))) -FUNC(xpmNextWord, unsigned int, +HFUNC(xpmNextWord, unsigned int, (xpmData *mdata, char *buf, unsigned int buflen)); -FUNC(xpmGetCmt, int, (xpmData *mdata, char **cmt)); -FUNC(xpmParseHeader, int, (xpmData *mdata)); -FUNC(xpmParseValues, int, (xpmData *data, unsigned int *width, +HFUNC(xpmGetCmt, int, (xpmData *mdata, char **cmt)); +HFUNC(xpmParseHeader, int, (xpmData *mdata)); +HFUNC(xpmParseValues, int, (xpmData *data, unsigned int *width, unsigned int *height, unsigned int *ncolors, unsigned int *cpp, unsigned int *x_hotspot, unsigned int *y_hotspot, unsigned int *hotspot, unsigned int *extensions)); -FUNC(xpmParseColors, int, (xpmData *data, unsigned int ncolors, +HFUNC(xpmParseColors, int, (xpmData *data, unsigned int ncolors, unsigned int cpp, XpmColor **colorTablePtr, xpmHashTable *hashtable)); -FUNC(xpmParseExtensions, int, (xpmData *data, XpmExtension **extensions, +HFUNC(xpmParseExtensions, int, (xpmData *data, XpmExtension **extensions, unsigned int *nextensions)); /* RGB utility */ -FUNC(xpmReadRgbNames, int, (const char *rgb_fname, xpmRgbName *rgbn)); -FUNC(xpmGetRgbName, char *, (xpmRgbName *rgbn, int rgbn_max, +HFUNC(xpmReadRgbNames, int, (const char *rgb_fname, xpmRgbName *rgbn)); +HFUNC(xpmGetRgbName, char *, (xpmRgbName *rgbn, int rgbn_max, int red, int green, int blue)); -FUNC(xpmFreeRgbNames, void, (xpmRgbName *rgbn, int rgbn_max)); +HFUNC(xpmFreeRgbNames, void, (xpmRgbName *rgbn, int rgbn_max)); #ifdef FOR_MSW -FUNC(xpmGetRGBfromName,int, (char *name, int *r, int *g, int *b)); +HFUNC(xpmGetRGBfromName,int, (char *name, int *r, int *g, int *b)); #endif #ifndef AMIGA -FUNC(xpm_xynormalizeimagebits, void, (register unsigned char *bp, +HFUNC(xpm_xynormalizeimagebits, void, (register unsigned char *bp, register XImage *img)); -FUNC(xpm_znormalizeimagebits, void, (register unsigned char *bp, +HFUNC(xpm_znormalizeimagebits, void, (register unsigned char *bp, register XImage *img)); /* @@ -313,7 +320,7 @@ #endif /* not AMIGA */ #ifdef NEED_STRDUP -FUNC(xpmstrdup, char *, (char *s1)); +HFUNC(xpmstrdup, char *, (char *s1)); #else #undef xpmstrdup #define xpmstrdup strdup @@ -321,14 +328,14 @@ #endif #ifdef NEED_STRCASECMP -FUNC(xpmstrcasecmp, int, (char *s1, char *s2)); +HFUNC(xpmstrcasecmp, int, (char *s1, char *s2)); #else #undef xpmstrcasecmp #define xpmstrcasecmp strcasecmp #include <strings.h> #endif -FUNC(xpmatoui, unsigned int, +HFUNC(xpmatoui, unsigned int, (char *p, unsigned int l, unsigned int *ui_return)); #endif
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/create.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/create.c
Changed
@@ -997,6 +997,11 @@ *image_return = NULL; return XpmNoMemory; } + if (width != 0 && (*image_return)->bits_per_pixel >= INT_MAX / width) { + XDestroyImage(*image_return); + *image_return = NULL; + return XpmNoMemory; + } /* now that bytes_per_line must have been set properly alloc data */ if((*image_return)->bytes_per_line == 0 || height == 0) { XDestroyImage(*image_return); @@ -1652,7 +1657,7 @@ Pixmap *shapemask_return, XpmAttributes *attributes) { - XImage *ximage, *shapeimage; + XImage *ximage = NULL, *shapeimage = NULL; int ErrorStatus; /* initialize return values */ @@ -1668,16 +1673,34 @@ &shapeimage : NULL), attributes); if (ErrorStatus < 0) - return (ErrorStatus); + goto cleanup; /* create the pixmaps and destroy images */ if (pixmap_return && ximage) { - xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); - XDestroyImage(ximage); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, ximage, pixmap_return); + if (ErrorStatus < 0) /* fatal error */ + goto cleanup; } if (shapemask_return && shapeimage) { - xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + ErrorStatus = + xpmCreatePixmapFromImage(display, d, shapeimage, shapemask_return); + } + + cleanup: + if (ximage != NULL) + XDestroyImage(ximage); + if (shapeimage != NULL) XDestroyImage(shapeimage); + if (ErrorStatus < 0) { + if (pixmap_return && *pixmap_return) { + XFreePixmap(display, *pixmap_return); + *pixmap_return = 0; + } + if (shapemask_return && *shapemask_return) { + XFreePixmap(display, *shapemask_return); + *shapemask_return = 0; + } } return (ErrorStatus); }
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/data.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/data.c
Changed
@@ -108,7 +108,7 @@ n++; s2++; } while (c == *s2 && *s2 != '\0' && c); - if (*s2 == '\0') { + if (*s2 == '\0' || c == '\0') { /* this is the end of the comment */ notend = 0; data->cptr--; @@ -259,13 +259,13 @@ int c; if (!data->type || data->type == XPMBUFFER) { - while (isspace(c = *data->cptr) && c != data->Eos) + while ((c = *data->cptr) && isspace(c) && (c != data->Eos)) data->cptr++; do { c = *data->cptr++; *buf++ = c; n++; - } while (!isspace(c) && c != data->Eos && n < buflen); + } while (c && !isspace(c) && (c != data->Eos) && (n < buflen)); n--; data->cptr--; } else {
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/src/rgb.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/src/rgb.c
Changed
@@ -66,7 +66,7 @@ xpmRgbName *rgb; /* Open the rgb text file. Abort if error. */ - if ((rgbf = fopen(rgb_fname, "r")) == NULL) + if ((rgbf = fopen(rgb_fname, "r" FOPEN_CLOEXEC)) == NULL) return 0; /* Loop reading each line in the file. */
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/test/TestAllFiles.h -> _service:tar_scm:libXpm-3.5.17.tar.xz/test/TestAllFiles.h
Changed
@@ -32,6 +32,12 @@ #include "config.h" +/* g_pattern_spec_match_string is available in glib 2.70 and later, + to replace the deprecated g_pattern_match_string */ +#ifdef HAVE_G_PATTERN_SPEC_MATCH_STRING +#define g_pattern_match_string g_pattern_spec_match_string +#endif + #define DEFAULT_TIMEOUT 10 /* maximum seconds for each file */ static sigjmp_buf jump_env;
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/test/XpmRead.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/test/XpmRead.c
Changed
@@ -33,6 +33,10 @@ #include "TestAllFiles.h" +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif + #ifndef g_assert_no_errno /* defined in glib 2.66 & later */ #define g_assert_no_errno(n) g_assert_cmpint(n, >=, 0) #endif @@ -147,7 +151,7 @@ g_assert_nonnull(buffer); /* Read file ourselves and verify the data matches */ - g_assert_no_errno(fd = open(filepath, O_RDONLY)); + g_assert_no_errno(fd = open(filepath, O_RDONLY | O_CLOEXEC)); while ((rd = read(fd, readbuf, sizeof(readbuf))) > 0) { g_assert_cmpmem(b, rd, readbuf, rd); b += rd;
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/test/XpmWrite.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/test/XpmWrite.c
Changed
@@ -38,6 +38,10 @@ #include "TestAllFiles.h" #include "CompareXpmImage.h" +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif + #ifndef g_assert_no_errno /* defined in glib 2.66 & later */ #define g_assert_no_errno(n) g_assert_cmpint(n, >=, 0) #endif @@ -295,7 +299,7 @@ ssize_t rd; /* Read file ourselves and verify the data matches */ - g_assert_no_errno(fd = open(newfilepath, O_RDONLY)); + g_assert_no_errno(fd = open(newfilepath, O_RDONLY | O_CLOEXEC)); while ((rd = read(fd, readbuf, sizeof(readbuf))) > 0) { g_assert_cmpmem(b, rd, readbuf, rd); b += rd;
View file
_service:tar_scm:libXpm-3.5.16.tar.gz/test/rgb.c -> _service:tar_scm:libXpm-3.5.17.tar.xz/test/rgb.c
Changed
@@ -23,7 +23,7 @@ #include "config.h" -#include "../src/XpmI.h" +#include "../src/rgb.c" #include <glib.h> /*
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2