Commit b1aa0a1a authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

dvdread: minimum value for ps_pkt_size is 6

parent d044c1d8
......@@ -603,10 +603,15 @@ static int DemuxBlock( demux_t *p_demux, uint8_t *pkt, int i_pkt )
demux_sys_t *p_sys = p_demux->p_sys;
uint8_t *p = pkt;
while( p < &pkt[i_pkt] )
while( p && p < &pkt[i_pkt] )
{
int i_size = ps_pkt_size( p, &pkt[i_pkt] - p );
block_t *p_pkt;
int i_size = &pkt[i_pkt] - p;
if( i_size < 6 )
break;
i_size = ps_pkt_size( p, i_size );
if( i_size <= 0 )
{
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment