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

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

 



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:

Yes, the real reason is in the vdrrip plugin that I cloned from
http://projects.vdr-developer.org/git/

It has this kind of code which always assumes that info file always exist.

void cMovie::setLengthVDR() {
        char *infoFile = NULL;
asprintf(&infoFile, "%s%s", Dir, OldRecording ? "/info.vdr" : "/info");
        dsyslog ("[vdrrip] reading recording info %s ",infoFile);
        cRecordingInfo *crec = new cRecordingInfo(Dir);
        FILE *f = fopen(infoFile, "r");
        if (crec->Read(f)) {

I just thought that it would be good to fix that in vdr code also.
But I think putting the metod now private will also quarantee NULL pointer check :-)

Mika

_______________________________________________
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