[vlc-devel] commit: LUA: don't look for scripts in . ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jul 5 12:53:55 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jul  5 13:53:52 2008 +0300| [7291c4595b9c85d2986afa6863fafc6d490f5986]

LUA: don't look for scripts in .

First, this would re-introduce the security issue we just fixed in
0.8.6f. Second, using share/ is not even the right path anyway.

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

 modules/misc/lua/vlc.c |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/modules/misc/lua/vlc.c b/modules/misc/lua/vlc.c
index 32cc2ab..ad5c0b5 100644
--- a/modules/misc/lua/vlc.c
+++ b/modules/misc/lua/vlc.c
@@ -135,23 +135,9 @@ int vlclua_dir_list( const char *luadirname, char **ppsz_dir_list )
 
     }
 #   else
-    if( asprintf( &ppsz_dir_list[i],
-                  "share" DIR_SEP "lua" DIR_SEP "%s", luadirname ) < 0 )
+    if( asprintf( &ppsz_dir_list[i], "%s" DIR_SEP "lua" DIR_SEP "%s",
+                  config_GetDataDir (), luadirname ) < 0 )
         return VLC_ENOMEM;
-
-#   ifdef HAVE_SYS_STAT_H
-    {
-        struct stat stat_info;
-        if( ( utf8_stat( ppsz_dir_list[i], &stat_info ) == -1 )
-            || !S_ISDIR( stat_info.st_mode ) )
-        {
-            free(ppsz_dir_list[i]);
-            if( asprintf( &ppsz_dir_list[i], "%s" DIR_SEP "lua" DIR_SEP "%s",
-                          config_GetDataDir (), luadirname ) < 0 )
-                return VLC_ENOMEM;
-        }
-    }
-#   endif
     i++;
 #   endif
     return VLC_SUCCESS;




More information about the vlc-devel mailing list