[mythtv-commits] Ticket #1482: add some validation for sections readed by dvbsiparser

MythTV mythtv at cvs.mythtv.org
Fri Mar 10 09:17:11 UTC 2006


#1482: add some validation for sections readed by dvbsiparser
--------------------------------------------+-------------------------------
 Reporter:  Janne <janne-mythtv at grunau.be>  |        Owner:  danielk
     Type:  defect                          |       Status:  new    
 Priority:  minor                           |    Milestone:  0.20   
Component:  dvb                             |      Version:  head   
 Severity:  medium                          |   Resolution:         
--------------------------------------------+-------------------------------
Changes (by stuarta):

  * milestone:  => 0.20
  * version:  => head

Comment:

 In the case where we get 0 - 7 bytes, we should be
 doing further reads into the buffer starting at the end of
 the previous read. So something like

 {{{
 if (rsz >0 && rsz < MIN_SIZE)
   partial packet.

 if (partial packet)
     read (fd, &buffer[old_rsz+1], MAX_SIZE - old_rsz)
 }}}

 I also think we should be doing that if the whole packet
 is incomplete. So when we get enough data for the header
 we can check the header length to find out the packet size
 and not attempt to parse it till we have sufficient data
 for a complete packet.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/1482>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list