vlc | branch: master | Hannes Domani <[email protected]> | Fri Mar 13 18:01:23 2015 +0100| [3ca2ce1e87a85a924c0f7ef45324d31c65a986cd] | committer: Jean-Baptiste Kempf
Win32: fix uninitialised variable and double free in drive letters mode Close #14140 Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ca2ce1e87a85a924c0f7ef45324d31c65a986cd --- src/win32/filesystem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/win32/filesystem.c b/src/win32/filesystem.c index 824a708..045ad99 100644 --- a/src/win32/filesystem.c +++ b/src/win32/filesystem.c @@ -149,6 +149,7 @@ DIR *vlc_opendir (const char *dirname) free (wpath); p_dir->wdir = NULL; p_dir->u.drives = GetLogicalDrives (); + p_dir->entry = NULL; return (void *)p_dir; } #endif @@ -180,7 +181,10 @@ char *vlc_readdir (DIR *dir) { DWORD drives = p_dir->u.drives; if (drives == 0) + { + p_dir->entry = NULL; return NULL; /* end */ + } unsigned int i; for (i = 0; !(drives & 1); i++) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
