Make sure buffer isnt NULL. fixes bug 1102.
authorBrandon Turner <turnerb7@msu.edu>
Sun, 11 Dec 2005 06:01:32 +0000 (06:01 +0000)
committerBrandon Turner <turnerb7@msu.edu>
Sun, 11 Dec 2005 06:01:32 +0000 (06:01 +0000)
svn path=/trunk/; revision=20053

reactos/lib/kernel32/misc/dllmain.c

index f4d1544..0709797 100644 (file)
@@ -348,6 +348,10 @@ DllMain(HANDLE hDll,
         SystemDirectory.Buffer = RtlAllocateHeap(hProcessHeap,
                                                  0,
                                                  SystemDirectory.MaximumLength);
+        if(SystemDirectory.Buffer == NULL)
+        {
+           return FALSE;
+        }
         wcscpy(SystemDirectory.Buffer, WindowsDirectory.Buffer);
         wcscat(SystemDirectory.Buffer, L"\\System32");