summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-06-19 15:34:38 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-06-19 15:34:38 +0200
commitac4da6e38018d49903988df0f80c0b0ffbe85bb9 (patch)
treeeef9f210e57be8756cfa34db9584e0249aaf5491
parent4d5cbaf57d74caa997c1439cabc3018c9c3fe797 (diff)
downloadvdr-ac4da6e38018d49903988df0f80c0b0ffbe85bb9.tar.gz
vdr-ac4da6e38018d49903988df0f80c0b0ffbe85bb9.tar.bz2
Fixed a possible access to characters after the terminating zero of strings in cDoneRecordings::Contains(), in case there are fuzzy characters at the end of a string
-rw-r--r--HISTORY3
-rw-r--r--recording.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 6a1884ca..fefc27af 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9726,3 +9726,6 @@ Video Disk Recorder Revision History
(with help from Helmut Binder).
- If an error occurs while recording, the respective entry in the list of recordings is
now updated immediately (reported by Matthias Senzel).
+- Fixed a possible access to characters after the terminating zero of strings in
+ cDoneRecordings::Contains(), in case there are fuzzy characters at the end of a
+ string.
diff --git a/recording.c b/recording.c
index 2cf1c888..f25cc4f1 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 5.9 2021/05/25 20:09:29 kls Exp $
+ * $Id: recording.c 5.10 2021/06/19 15:34:38 kls Exp $
*/
#include "recording.h"
@@ -3150,6 +3150,8 @@ bool cDoneRecordings::Contains(const char *Title) const
while (*s && *t) {
s = SkipFuzzyChars(s);
t = SkipFuzzyChars(t);
+ if (!*s || !*t)
+ break;
if (*s != *t)
break;
s++;