diff --git a/amanda-c99.patch b/amanda-c99.patch new file mode 100644 index 0000000..6db3c84 --- /dev/null +++ b/amanda-c99.patch @@ -0,0 +1,30 @@ +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. + +Submitted upstream: + +diff --git a/client-src/runtar.c b/client-src/runtar.c +index 454e9b9a9b96449b..4d2451dc84840fa9 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)) { diff --git a/amanda.spec b/amanda.spec index fce8145..043a607 100644 --- a/amanda.spec +++ b/amanda.spec @@ -41,6 +41,7 @@ Patch5: patch-tirpc # https://bugzilla.redhat.com/show_bug.cgi?id=1671117 Patch6: patch-xfsrestore-housekeeping Patch7: amanda-configure-c99.patch +Patch8: amanda-c99.patch License: BSD-3-Clause AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only URL: http://www.amanda.org