Commit bd6e2da8 authored by ivoire's avatar ivoire
Browse files

Fix sizeof mismatch (cid #1049614 and #1049613-12)

parent 3a62db5f
......@@ -354,7 +354,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
int *pi_int = (int*)va_arg( args, int* );
*pi_int = p_sys->titles.size();
*ppp_title = (input_title_t**)malloc( sizeof( input_title_t**) * p_sys->titles.size() );
*ppp_title = (input_title_t**)malloc( sizeof( input_title_t* ) * p_sys->titles.size() );
for( size_t i = 0; i < p_sys->titles.size(); i++ )
(*ppp_title)[i] = vlc_input_title_Duplicate( p_sys->titles[i] );
......
......@@ -505,7 +505,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_EGENERIC;
*pi_int = p_sys->i_attachments;
*ppp_attach = xmalloc( sizeof(input_attachment_t**) * p_sys->i_attachments );
*ppp_attach = xmalloc( sizeof(input_attachment_t*) * p_sys->i_attachments );
for( int i = 0; i < p_sys->i_attachments; i++ )
(*ppp_attach)[i] = vlc_input_attachment_Duplicate( p_sys->attachments[i] );
return VLC_SUCCESS;
......@@ -541,7 +541,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
if( p_sys->i_seekpoints > 0 )
{
*pi_int = 1;
*ppp_title = malloc( sizeof( input_title_t**) );
*ppp_title = malloc( sizeof( input_title_t* ) );
input_title_t *p_title = (*ppp_title)[0] = vlc_input_title_New();
for( int i = 0; i < p_sys->i_seekpoints; i++ )
{
......
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