Allow the lpTemplateDirectory parameter to be NULL in
CreateDirectoryExA.
Modified: trunk/reactos/lib/kernel32/file/dir.c
_____
Modified: trunk/reactos/lib/kernel32/file/dir.c
--- trunk/reactos/lib/kernel32/file/dir.c 2005-03-20 13:06:11 UTC
(rev 14218)
+++ trunk/reactos/lib/kernel32/file/dir.c 2005-03-20 13:10:11 UTC
(rev 14219)
@@ -50,11 +50,12 @@
LPCSTR lpNewDirectory,
LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{
- PWCHAR TemplateDirectoryW;
- PWCHAR NewDirectoryW;
+ PWCHAR TemplateDirectoryW = NULL;
+ PWCHAR NewDirectoryW = NULL;
BOOL ret;
- if (!(TemplateDirectoryW = FilenameA2W(lpTemplateDirectory, FALSE)))
+ if (TemplateDirectoryW != NULL &&
+ !(TemplateDirectoryW = FilenameA2W(lpTemplateDirectory, FALSE)))
return FALSE;
if (!(NewDirectoryW = FilenameA2W(lpNewDirectory, TRUE)))
Show replies by date