diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
commit | 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch) | |
tree | 9532e637f47d6ff7246ccbabb62d4e2b4b5908df /lib/compat | |
parent | Adding debian version 1.22.6. (diff) | |
download | dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip |
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/compat')
-rw-r--r-- | lib/compat/Makefile.in | 7 | ||||
-rw-r--r-- | lib/compat/strnlen.c | 2 | ||||
-rw-r--r-- | lib/compat/vasprintf.c | 6 |
3 files changed, 12 insertions, 3 deletions
diff --git a/lib/compat/Makefile.in b/lib/compat/Makefile.in index 9b3c41c..3f3ccbb 100644 --- a/lib/compat/Makefile.in +++ b/lib/compat/Makefile.in @@ -105,8 +105,8 @@ host_triplet = @host@ @HAVE_UNSETENV_FALSE@am__append_15 = unsetenv.c subdir = lib/compat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/dpkg-arch.m4 \ - $(top_srcdir)/m4/dpkg-build.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/build-to-host.m4 \ + $(top_srcdir)/m4/dpkg-arch.m4 $(top_srcdir)/m4/dpkg-build.m4 \ $(top_srcdir)/m4/dpkg-compiler.m4 \ $(top_srcdir)/m4/dpkg-coverage.m4 \ $(top_srcdir)/m4/dpkg-funcs.m4 \ @@ -353,6 +353,7 @@ PACKAGE_RELEASE_DATE = @PACKAGE_RELEASE_DATE@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VCS_ID = @PACKAGE_VCS_ID@ PACKAGE_VCS_TYPE = @PACKAGE_VCS_TYPE@ PACKAGE_VCS_URL = @PACKAGE_VCS_URL@ PACKAGE_VCS_WEB = @PACKAGE_VCS_WEB@ @@ -434,6 +435,8 @@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ +localedir_c = @localedir_c@ +localedir_c_make = @localedir_c_make@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ diff --git a/lib/compat/strnlen.c b/lib/compat/strnlen.c index d02bb4b..288a298 100644 --- a/lib/compat/strnlen.c +++ b/lib/compat/strnlen.c @@ -20,6 +20,8 @@ # include <config.h> #endif +#include <string.h> + #include "compat.h" /* Find the length of STRING, but scan at most MAXLEN characters. diff --git a/lib/compat/vasprintf.c b/lib/compat/vasprintf.c index 9d53a32..b5a2783 100644 --- a/lib/compat/vasprintf.c +++ b/lib/compat/vasprintf.c @@ -19,6 +19,8 @@ #include <config.h> +#include <errno.h> +#include <limits.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -36,7 +38,9 @@ vasprintf(char **strp, char const *fmt, va_list args) needed = vsnprintf(NULL, 0, fmt, args_copy); va_end(args_copy); - if (needed < 0) { + if (needed < 0 || needed >= INT_MAX) { + if (needed >= INT_MAX) + errno = EOVERFLOW; *strp = NULL; return -1; } |