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