[vlc-devel] commit: Fix NULL pointer dereferencing due to c58a5af7401735b50fa058fe5ab83d8ae911de4c . (Antoine Cellerier )

git version control git at videolan.org
Sat Feb 27 22:58:37 CET 2010


vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Feb 27 23:00:12 2010 +0100| [67cfc81471993023209c2bdb907295a0a451c5ff] | committer: Antoine Cellerier 

Fix NULL pointer dereferencing due to c58a5af7401735b50fa058fe5ab83d8ae911de4c.

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

 modules/misc/lua/libs/misc.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules/misc/lua/libs/misc.c b/modules/misc/lua/libs/misc.c
index 4460e12..10d1424 100644
--- a/modules/misc/lua/libs/misc.c
+++ b/modules/misc/lua/libs/misc.c
@@ -162,14 +162,13 @@ static int vlclua_datadir_list( lua_State *L )
 {
     const char *psz_dirname = luaL_checkstring( L, 1 );
     char **ppsz_dir_list = NULL;
-    char **ppsz_dir = ppsz_dir_list;
     int i = 1;
 
     if( vlclua_dir_list( vlclua_get_this( L ), psz_dirname, &ppsz_dir_list )
         != VLC_SUCCESS )
         return 0;
     lua_newtable( L );
-    for( ; *ppsz_dir; ppsz_dir++ )
+    for( char **ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
     {
         lua_pushstring( L, *ppsz_dir );
         lua_rawseti( L, -2, i );




More information about the vlc-devel mailing list