Commit 803983ec authored by Rémi Duraffort's avatar Rémi Duraffort

access_dvd: fix sizeof mismatch

parent a743b5e8
......@@ -499,7 +499,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*va_arg( args, int* ) = 1; /* Chapter offset */
/* Duplicate title infos */
*ppp_title = malloc( sizeof( input_title_t ** ) * p_sys->i_title );
*ppp_title = malloc( p_sys->i_title * sizeof( input_title_t * ) );
for( i = 0; i < p_sys->i_title; i++ )
{
(*ppp_title)[i] = vlc_input_title_Duplicate( p_sys->title[i] );
......
......@@ -394,7 +394,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
/* Duplicate title infos */
*pi_int = p_sys->i_titles;
*ppp_title = malloc( sizeof(input_title_t **) * p_sys->i_titles );
*ppp_title = malloc( p_sys->i_titles * sizeof(input_title_t *) );
for( i = 0; i < p_sys->i_titles; i++ )
{
(*ppp_title)[i] = vlc_input_title_Duplicate(p_sys->titles[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