[vlc-commits] libvlc: fix NULL dereference

Rémi Denis-Courmont git at videolan.org
Mon Feb 6 21:48:53 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Feb  6 22:46:21 2017 +0200| [b0ac3e5cae06086429d63392f07e66f3dad1c70a] | committer: Rémi Denis-Courmont

libvlc: fix NULL dereference

The vlc_custom_create() macro assumes that the first parameter is a
valid pointer by way of the VLC_OBJECT() macro. So call the
vlc_custom_create() function instead.

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

 src/libvlc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index d3ce702..34f24ba 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -95,8 +95,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
     libvlc_priv_t *priv;
 
     /* Allocate a libvlc instance object */
-    p_libvlc = vlc_custom_create( (vlc_object_t *)NULL, sizeof (*priv),
-                                  "libvlc" );
+    p_libvlc = (vlc_custom_create)( NULL, sizeof (*priv), "libvlc" );
     if( p_libvlc == NULL )
         return NULL;
 



More information about the vlc-commits mailing list