From 44cf9c6d2d274eac37502e835155f7e985f1b8e6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Aug 2024 15:30:08 +0200 Subject: Adding upstream version 1.22.7. Signed-off-by: Daniel Baumann --- lib/compat/Makefile.in | 7 +++++-- lib/compat/strnlen.c | 2 ++ lib/compat/vasprintf.c | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'lib/compat') 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 #endif +#include + #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 +#include +#include #include #include #include @@ -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; } -- cgit v1.2.3