Commit e84cbe56 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

dvdnav: no need to check for 6 bytes before ps_pkt_size() anymore

This mostly reverts commit 8a497301.
parent ef2f7b9d
...@@ -1153,9 +1153,8 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t *pkt, int i_pkt ) ...@@ -1153,9 +1153,8 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t *pkt, int i_pkt )
demux_sys_t *p_sys = p_demux->p_sys; demux_sys_t *p_sys = p_demux->p_sys;
const uint8_t *p = pkt; const uint8_t *p = pkt;
while( (p - pkt) <= (i_pkt - 6) ) while( p < &pkt[i_pkt] )
{ {
/* ps_pkt_size() needs at least 6 bytes */
int i_size = ps_pkt_size( p, &pkt[i_pkt] - p ); int i_size = ps_pkt_size( p, &pkt[i_pkt] - p );
if( i_size <= 0 ) if( i_size <= 0 )
{ {
......
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