Mailing List archive

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

[vdr] Re: Aborted - a test case



Am Montag, 13. September 2004 17:31 schrieb Stefan Huelswitt:
> On 13 Sep 2004 Marcel Wiesweg <marcel.wiesweg@gmx.de> wrote:
> > It would be great if I had the original data in a binary file. Does
> > someone know an elegant way to convert the printout below to a binary
> > file, or to save it directly from gdb?
>
> I just mailed you the data in binary format.

Ok, I have analyzed the data and as I had suspected it is broken, but quite 
skillfully so. The outer structure, the section and the event loop size is 
all right with correct size, CRC and all. The event in the loop however is 
truncated. It says to be of size 40xx (which is reasonable, EIT sections are 
limited to 4096). I assume it has had that size sometimes in the past, was 
then taken, truncated and correctly packed in a new section.

Currently, libsi is putting some trust in the data. After all, it is error 
checked twice, and stations won't send malicious data over the air.
Currently it will read the full 4050 or so bytes, which leads to a segfault if 
not to the observed abort() occurs before.

The only elegant way I currently see to solve that  is to use C++ exceptions.
I hope Klaus does not object to the use of exeptions?
There are two approaches, the exceptions can guaranteed to be caught inside 
libsi (some functions would be boolean then, and parsing of a section in VDR 
must be stopped if they return false), or the exceptions are caught inside 
VDR.

Marcel




Home | Main Index | Thread Index