diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 352b24c6..d2cf51e0 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2202,6 +2202,7 @@ Marko M for reporting a problem with the video directory not being set correctly with --edit for reporting a compiler warning about the use of strncpy() in strreplace() for adding support for kernel based LIRC driver + for reporting a possible heap-use-after-free in cDvbTuner::Action() Patrick Rother for reporting a bug in defining timers that only differ in the day of week diff --git a/HISTORY b/HISTORY index 64758305..b80c34aa 100644 --- a/HISTORY +++ b/HISTORY @@ -9816,9 +9816,10 @@ Video Disk Recorder Revision History - Added missing rounding when dividing frequencies in processing the NIT (thanks to Winfried Köhler). -2022-12-01: +2022-12-05: - Fixed a compiler warning. - Fixed generating the index file in the cutter (reported by Christoph Haubrich). - Fixed a faulty 'Timer still recording' query when canceling an editing job. - Added code for the 'qks' audio track (thanks to Johann Friedrichs). +- Fixed a possible heap-use-after-free in cDvbTuner::Action() (reported by Marko Mäkelä). diff --git a/dvbdevice.c b/dvbdevice.c index 51331485..69f1082f 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 5.2 2022/11/14 16:31:08 kls Exp $ + * $Id: dvbdevice.c 5.3 2022/12/05 14:04:10 kls Exp $ */ #include "dvbdevice.h" @@ -1858,16 +1858,16 @@ cDvbDevice::cDvbDevice(int Adapter, int Frontend) // We only check the devices that must be present - the others will be checked before accessing them://XXX - dvbTuner = new cDvbTuner(this, adapter, frontend); - StartSectionHandler(); + + dvbTuner = new cDvbTuner(this, adapter, frontend); } cDvbDevice::~cDvbDevice() { - StopSectionHandler(); delete dvbTuner; delete ciAdapter; + StopSectionHandler(); UnBond(); // We're not explicitly closing any device files here, since this sometimes // caused segfaults. Besides, the program is about to terminate anyway...