Commit 22e6c0c1 authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

mux/mpeg: BuildPMT: prevent allocation of unnecessary data

pi_service_types is of type pointer-to-uint8_t, so the previous
implementation would allocate far more memory (as a pointer is bigger
than uint8_t) than what is actually required.
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <>
parent 4c23a7d0
......@@ -374,7 +374,7 @@ void BuildPMT( dvbpsi_t *p_dvbpsi, vlc_object_t *p_object,
if( p_sdt )
dvbpsi_sdt_init( &sdtpsi, 0x42, i_tsid, 1, true, p_sdt->i_netid );
pi_service_types = calloc( i_programs * 2, sizeof(uint8_t *) );
pi_service_types = calloc( i_programs * 2, sizeof *pi_service_types );
if( !pi_service_types )
free( dvbpmt );
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