[vdr] [Patch] crashes with old recordings without info file

Mika Laitio lamikr at pilppa.org
Sun Apr 3 12:23:00 CEST 2011


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.

#0  0x00007ffff640e8ff in getdelim () from /lib64/libc.so.6
#1  0x00000000004fcd48 in getline (this=0x7fffffffde30, f=0x0) at 
/usr/include/bits/stdio.h:118
#2  cReadLine::Read (this=0x7fffffffde30, f=0x0) at tools.c:1194
#3  0x00000000004cc383 in cRecordingInfo::Read (this=0xc29bc0, f=0x0) at 
recording.c:419
#4  0x00007fffef0397a0 in cMovie::setLengthVDR() () from 
./PLUGINS/lib/libvdr-vdrrip.so.1.7.17
#5  0x00007fffef03af00 in cMovie::cMovie(char const*, char const*) () 
from ./PLUGINS/lib/libvdr-vdrrip.so.1.7.17
#6  0x00007fffef0367d7 in cMenuVdrripMovie::cMenuVdrripMovie(char 
const*, char const*) () from ./PLUGINS/lib/libvdr-vdrrip.so.1.7.17
#7  0x00007fffef03807d in cMenuVdrripEncode::ProcessKey(eKeys) () from 
./PLUGINS/lib/libvdr-vdrrip.so.1.7.17

[lamikr at tinka Prisma:_Einstein_ja_kaiken_teoria]$ ls -la 
2005-04-21.20\:58.50.99.rec/
total 1338080
drwxr-xr-x 2 76 76       4096 2008-05-17 17:48 ./
drwxr-xr-x 3 76 76       4096 2008-05-17 17:46 ../
-rw-r--r-- 1 76 76 1369418800 2008-05-17 17:48 001.vdr
-rw-r--r-- 1 76 76     727968 2008-05-17 17:48 index.vdr
-rw-r--r-- 1 76 76          4 2008-05-17 17:48 resume.vdr
-rw-r--r-- 1 76 76        441 2008-05-17 17:48 summary.vdr


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-NULL-pointer-check-to-cReadline.read-in-tools.c.patch
URL: <http://www.linuxtv.org/pipermail/vdr/attachments/20110403/dceffbd4/attachment.txt>


More information about the vdr mailing list