Commit c6184533 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: ts: fix peek use after free

parent e0fe3ddb
......@@ -262,6 +262,7 @@ static int DetectPVRHeadersAndHeaderSize( demux_t *p_demux, unsigned *pi_header_
vlc_stream_Peek( p_demux->s, &p_peek, TOPFIELD_HEADER_SIZE + TS_PACKET_SIZE_MAX )
== TOPFIELD_HEADER_SIZE + TS_PACKET_SIZE_MAX )
{
const int i_service = GetWBE(&p_peek[18]);
i_packet_size = DetectPacketSize( p_demux, pi_header_size, TOPFIELD_HEADER_SIZE );
if( i_packet_size != -1 )
{
......@@ -329,7 +330,7 @@ static int DetectPVRHeadersAndHeaderSize( demux_t *p_demux, unsigned *pi_header_
msg_Dbg( p_demux, "extended event text=%s", psz_ext_text );
// 52 bytes reserved Bslbf
#endif
p_vdr->i_service = GetWBE(&p_peek[18]);
p_vdr->i_service = i_service;
return i_packet_size;
//return TS_PACKET_SIZE_188;
......
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