vlc/vlc-2.2 | branch: master | Hannes Domani <[email protected]> | Fri Mar 13 18:01:23 2015 +0100| [7c28c94a6195074b30ed0c05a76296456684ed83] | 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]> (cherry picked from commit 3ca2ce1e87a85a924c0f7ef45324d31c65a986cd) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=7c28c94a6195074b30ed0c05a76296456684ed83 --- src/win32/filesystem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/win32/filesystem.c b/src/win32/filesystem.c index 7f29c8f..a6afcf0 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
