Commit 8d6c1cb3 authored by Jean-Paul Saman's avatar Jean-Paul Saman

examples/get_pcr_pid.c: Fix out-of-bounds write (CID: 17266)

The value of i_nb_programs could exceed the MAX_PROGRAMS limit and thus
produce a buffer overrun.
parent 3fb4b208
......@@ -116,7 +116,7 @@ static void PATCallback( void *_unused, dvbpsi_pat_t *p_pat )
return;
}
for( p_program = p_pat->p_first_program; p_program != NULL;
for( p_program = p_pat->p_first_program; p_program != NULL && i_nb_programs < MAX_PROGRAMS;
p_program = p_program->p_next )
{
if( p_program->i_number != 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