Re: [Patch] crashes with old recordings without info file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03.04.2011 12:23, Mika Laitio wrote:
I have some old recordings made on 2005 which does not have info file. This caused vdr 1.7.17 to crash because
in tools.c line 1194 there is no check whether the file parameter passed is NULL or not. Real cause for the crash is in the vdrrip plugins which
should handle the case where the info file does not exist on setLengthVDR method on movie.c.
Anyway, it's propably good idea also to has the NULL check's in vdr's own code. Patches attached for tools.c and recording.c.

I wonder who is actually calling cRecordingInfo::Read(FILE *f) with
a NULL pointer? In VDR's own code all calls to that function are
made sure to get a non-NULL pointer:


bool cRecordingInfo::Read(void)
{
  bool Result = false;
  if (fileName) {
     FILE *f = fopen(fileName, "r");
     if (f) {
        if (Read(f))


cRecording::cRecording(const char *FileName)
{
  ...
     FILE *f = fopen(InfoFileName, "r");
     if (f) {
        if (!info->Read(f))


Since it doesn't make any sense to call cRecordingInfo::Read(FILE *f)
from outside cRecordingInfo, I made that function private now.
This may break some plugin, but that should have called
cRecordingInfo::Read(void), anyway.

Klaus

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux