[vlc-commits] Fix sizeof mismatch (cid #1049614 and #1049613-12)

Rémi Duraffort git at videolan.org
Sat Jul 20 11:52:39 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 19 21:03:57 2013 +0200| [984a14392a92c5a257a27b442803825c0e94650f] | committer: Jean-Baptiste Kempf

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

(cherry picked from commit bd6e2da843bf861d41d2831998f935d9b76bfb53)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=984a14392a92c5a257a27b442803825c0e94650f
---

 modules/demux/mkv/mkv.cpp |    2 +-
 modules/demux/ogg.c       |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 7dc7e25..890fde6 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -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] );
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index d9312e8..7d9aa35 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -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++ )
                 {



More information about the vlc-commits mailing list