From 2c69649549fe9723ba0c4f9fcb8b1f3a98f7236a Mon Sep 17 00:00:00 2001 From: Anton Bobrov Date: Wed, 12 Jul 2023 13:53:48 +0200 Subject: [PATCH] Resolves: #2051849 Explicitly include an uncommmited upstream patch from https://github.com/codership/galera/pull/617 remove duplicate va_end call --- galera-va_end.patch | 16 ++++++++++++++++ galera.spec | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 galera-va_end.patch diff --git a/galera-va_end.patch b/galera-va_end.patch new file mode 100644 index 0000000..167b3b1 --- /dev/null +++ b/galera-va_end.patch @@ -0,0 +1,16 @@ +This is an upstream patch for https://github.com/codership/galera/pull/617 +"remove duplicate va_end call" that originates from BZ #2051849 covscan +results. The upstream has not addressed the issue for over a year so this +is the reason to cover it as separate patch here. + +--- galera-25.3.37/galerautils/src/gu_dbug.c 2022-05-31 17:05:23.000000000 +0200 ++++ ../../galera-25.3.37/galerautils/src/gu_dbug.c 2023-07-10 17:09:58.969599380 +0200 +@@ -1040,7 +1040,6 @@ _gu_db_doprnt_(const char *format, ...) + } + (void) fprintf(_gu_db_fp_, "%s: ", state->u_keyword); + (void) vfprintf(_gu_db_fp_, format, args); +- va_end(args); + (void) fputc('\n', _gu_db_fp_); + dbug_flush(state); + errno = save_errno; + diff --git a/galera.spec b/galera.spec index 0defbe9..2fc9600 100644 --- a/galera.spec +++ b/galera.spec @@ -16,6 +16,7 @@ Source1: garbd.service Source2: garbd-wrapper Patch0: cmake_paths.patch +Patch1: galera-va_end.patch BuildRequires: boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel Requires(pre): /usr/sbin/useradd @@ -38,6 +39,7 @@ replication engine see http://www.codership.com. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{set_build_flags}