[vlc-commits] Win32: fix uninitialised variable and double free in drive letters mode
Hannes Domani
git at videolan.org
Sat Mar 14 11:31:49 CET 2015
vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | 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 <jb at videolan.org>
> 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++)
More information about the vlc-commits
mailing list