From bc959bfc362edaa3332953b6e5904fe303b0d2f6 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 28 Nov 2023 19:48:21 +0100 Subject: [PATCH 1/2] configure: Avoid an implicit int in the IPv6 test Otherwise, the test fails unconditionally with compilers that do not support implicit ints (a language feature that was removed with the C99 language revision). --- config/amanda/ipv6.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/amanda/ipv6.m4 b/config/amanda/ipv6.m4 index 9d76979339..d91ab95ab9 100644 --- a/config/amanda/ipv6.m4 +++ b/config/amanda/ipv6.m4 @@ -85,7 +85,7 @@ AC_DEFUN([AMANDA_CHECK_IPV6], #include #include -main() +int main(void) { int aa; aa = socket(AF_INET6, SOCK_STREAM, 0); From 2979ce97a70e5f7007b0ed04f58cc2c87bf99c21 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 28 Nov 2023 19:48:21 +0100 Subject: [PATCH 2/2] Fix C type safety issue in CVE-2023-30547 change The types char ** and const char ** are distinct according to the C language. Future compilers will treat pointer type mismatches as errors. --- client-src/runtar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-src/runtar.c b/client-src/runtar.c index 454e9b9a9b..4d2451dc84 100644 --- a/client-src/runtar.c +++ b/client-src/runtar.c @@ -54,7 +54,7 @@ main( { #ifdef GNUTAR int i; - char **j; + const char **j; char *e; char *dbf; char *cmdline; @@ -255,7 +255,7 @@ check_whitelist( gchar* option) { bool result = TRUE; - char** i; + const char** i; for(i=whitelisted_args; *i; i++) { if (g_str_has_prefix(option, *i)) {