Commit in reactos/lib/ntdll/rtl on MAIN
path.c+11-61.26 -> 1.27
RtlGetFullPathName_U() is supposed to check the parameter buf, it could be NULL

reactos/lib/ntdll/rtl
path.c 1.26 -> 1.27
diff -u -r1.26 -r1.27
--- path.c	30 Nov 2003 20:48:07 -0000	1.26
+++ path.c	13 Mar 2004 22:23:14 -0000	1.27
@@ -1,4 +1,4 @@
-/* $Id: path.c,v 1.26 2003/11/30 20:48:07 gdalsnes Exp $
+/* $Id: path.c,v 1.27 2004/03/13 22:23:14 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -575,7 +575,8 @@
 		len--;
 	if (FilePart)
 		*FilePart = NULL;
-	*buf = 0;
+	if (buf)
+		*buf = 0;
 
 CHECKPOINT;
 	/* check for DOS device name */
@@ -586,8 +587,11 @@
 		sz &= 0x0000FFFF;
 		if (sz + 8 >= size)
 		    return sz + 10;
-		wcscpy (buf, L"\\\\.\\");
-		wcsncat (buf, DosName + offs, sz / sizeof(WCHAR));
+		if (buf)
+		{
+			wcscpy (buf, L"\\\\.\\");
+			wcsncat (buf, DosName + offs, sz / sizeof(WCHAR));
+		}
 		return sz + 8;
 	}
 
@@ -721,10 +725,11 @@
 
 	if (len < (size / sizeof(WCHAR)))
 	{
-		memcpy (buf, TempFullPathName, (len + 1) * sizeof(WCHAR));
+		if (buf)
+			memcpy (buf, TempFullPathName, (len + 1) * sizeof(WCHAR));
 
 		/* find file part */
-		if (FilePart)
+		if (FilePart && buf)
 		{
 #if 0
 			*FilePart = wcsrchr(buf, L'\\');
CVSspam 0.2.8