summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-09-16 13:30:59 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2020-09-16 13:30:59 +0200
commit46b480c798c2d5f4acb8874f25e5129f2cf7f224 (patch)
treebb40c9139814ac59ce743aad7fe2fc58fd08c622
parentb4a6c36215c6ecab80c3f3c3b03897816008c4ef (diff)
downloadvdr-46b480c798c2d5f4acb8874f25e5129f2cf7f224.tar.gz
vdr-46b480c798c2d5f4acb8874f25e5129f2cf7f224.tar.bz2
Fixed checking the return value of the Open() call in cFileName::SetOffset()
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY4
-rw-r--r--recording.c6
3 files changed, 8 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index d56cf15e..3c1a5830 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2763,6 +2763,8 @@ Winfried Köhler <w_koehl@gmx.de>
for adding a device hook for detecting whether a device provides EIT data
for improving deleting plugins in case the plugin uses its own memory management
for reporting a bug in handling newline characters in ci.c's CopyString()
+ for reporting a bug in checking the return value of the Open() call in
+ cFileName::SetOffset()
Hans-Werner Hilse <hilse@web.de>
for adding the command line option --userdump to enable core dumps in case VDR
diff --git a/HISTORY b/HISTORY
index c34373d0..040d080d 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9513,7 +9513,9 @@ Video Disk Recorder Revision History
with the main menu open.
- Official release.
-2020-08-17:
+2020-09-16:
- Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed handling newline characters in ci.c's CopyString() (reported by Winfried Köhler).
+- Fixed checking the return value of the Open() call in cFileName::SetOffset() (reported
+ by Winfried Köhler).
diff --git a/recording.c b/recording.c
index 810ef809..1fc34cdd 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 4.27 2019/05/28 21:47:32 kls Exp $
+ * $Id: recording.c 4.28 2020/09/16 13:30:59 kls Exp $
*/
#include "recording.h"
@@ -3025,8 +3025,8 @@ cUnbufferedFile *cFileName::SetOffset(int Number, off_t Offset)
}
// found a non existing file suffix
}
- if (Open() >= 0) {
- if (!record && Offset >= 0 && file && file->Seek(Offset, SEEK_SET) != Offset) {
+ if (Open()) {
+ if (!record && Offset >= 0 && file->Seek(Offset, SEEK_SET) != Offset) {
LOG_ERROR_STR(fileName);
return NULL;
}