[vlc-commits] access_dvd: fix sizeof mismatch
Rémi Duraffort
git at videolan.org
Sun Dec 15 22:03:31 CET 2013
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Dec 14 11:03:01 2013 +0100| [803983ecb79972d5a35acc819d0f58eb171b437a] | committer: Rémi Duraffort
access_dvd: fix sizeof mismatch
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=803983ecb79972d5a35acc819d0f58eb171b437a
---
modules/access/dvdnav.c | 2 +-
modules/access/dvdread.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 4c6eccf..002fb38 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -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] );
diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index a239053..bfefb1e 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -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]);
More information about the vlc-commits
mailing list