[vdr] [PATCH] dxr3plugin fix to prevent segv for some corrupt streams

Jon Burgess jburgess at uklinux.net
Sat Apr 30 01:53:17 CEST 2005

I tracked down a small problem in the dxr3pesframes code which was 
causing a segv to occur while trying to play some corrupted streams.

dxr3pesframe.c contains the following loop which is used to find the 
start of the first pes header:

   for (; pos + 9 < length && !IsPesHeader(pesArray.SubArray(pos, 4)); 

With corrupted streams loop may reach the end of the buffer without 
finding a valid header and the subsequent code tries to decode the bogus 
header data often causing a segv. The patch detects this condition and 
causes the bad data to be dropped.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dxr3-corrupt-pes2.patch
Type: text/x-patch
Size: 453 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/vdr/attachments/20050430/b07a947e/dxr3-corrupt-pes2.bin

More information about the vdr mailing list