diff options
author | Erich Eckner <git@eckner.net> | 2022-05-15 20:37:24 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-05-15 20:37:24 +0200 |
commit | be0c5051d4a60a727267e5dd0a91446539f0f890 (patch) | |
tree | b9381934386954bf1b3101dae27b92c05e2dbac9 /bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch | |
parent | c40fa275ebbba925c1c5da8d782ae284d4fbb7c9 (diff) | |
download | archlinuxewe-be0c5051d4a60a727267e5dd0a91446539f0f890.tar.xz |
bareos: use proper fix
Diffstat (limited to 'bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch')
-rw-r--r-- | bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch b/bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch new file mode 100644 index 000000000..ca899fd0d --- /dev/null +++ b/bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch @@ -0,0 +1,38 @@ +From ce3339d28623b8bb771e5e0aa139168df5963c4b Mon Sep 17 00:00:00 2001 +From: Andreas Rogge <andreas.rogge@bareos.com> +Date: Wed, 2 Feb 2022 19:41:25 +0100 +Subject: [PATCH] lib: fix use-after-free in timer_thread + +--- + core/src/lib/timer_thread.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/core/src/lib/timer_thread.cc b/core/src/lib/timer_thread.cc +index 7ec8021989..1624ddd4f0 100644 +--- a/core/src/lib/timer_thread.cc ++++ b/core/src/lib/timer_thread.cc +@@ -2,7 +2,7 @@ + BAREOSĀ® - Backup Archiving REcovery Open Sourced + + Copyright (C) 2002-2011 Free Software Foundation Europe e.V. +- Copyright (C) 2019-2019 Bareos GmbH & Co. KG ++ Copyright (C) 2019-2022 Bareos GmbH & Co. KG + + This program is Free Software; you can redistribute it and/or + modify it under the terms of version three of the GNU Affero General Public +@@ -204,6 +204,7 @@ static bool RunOneItem(TimerThread::Timer* p, + = std::chrono::steady_clock::now(); + + bool remove_from_list = false; ++ next_timer_run = min(p->scheduled_run_timepoint, next_timer_run); + if (p->is_active && last_timer_run_timepoint > p->scheduled_run_timepoint) { + LogMessage(p); + p->user_callback(p); +@@ -215,7 +216,6 @@ static bool RunOneItem(TimerThread::Timer* p, + p->scheduled_run_timepoint = last_timer_run_timepoint + p->interval; + } + } +- next_timer_run = min(p->scheduled_run_timepoint, next_timer_run); + return remove_from_list; + } + |