* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* PURPOSE: Computer name functions
- * FILE: lib/kernel32/misc/computername.c
+ * FILE: dll/win32/kernel32/client/compname.c
* PROGRAMER: Eric Kohl
*/
UNICODE_STRING UnicodeString;
ANSI_STRING AnsiString;
BOOL Result;
- PWCHAR TempBuffer = RtlAllocateHeap( RtlGetProcessHeap(), 0, *nSize * sizeof(WCHAR) );
+ PWCHAR TempBuffer;
+ if (!lpBuffer)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ TempBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, *nSize * sizeof(WCHAR));
if (!TempBuffer)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);