Author: dchapyshev
Date: Sat Sep 12 14:04:39 2009
New Revision: 43033
URL:
http://svn.reactos.org/svn/reactos?rev=43033&view=rev
Log:
- Add NULL pointer check. Found by Amine Khaldi.
Modified:
trunk/reactos/dll/win32/advapi32/sec/misc.c
Modified: trunk/reactos/dll/win32/advapi32/sec/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/mis…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/misc.c [iso-8859-1] Sat Sep 12 14:04:39 2009
@@ -1200,8 +1200,11 @@
else
{
*pdwDomainName = dwSrcLen;
- RtlCopyMemory ( pDomainName, ReferencedDomain->Domains[0].Name.Buffer,
ReferencedDomain->Domains[0].Name.Length );
- pDomainName[ReferencedDomain->Domains[0].Name.Length /
sizeof(WCHAR)] = L'\0';
+ if (pDomainName)
+ {
+ RtlCopyMemory ( pDomainName, ReferencedDomain->Domains[0].Name.Buffer,
ReferencedDomain->Domains[0].Name.Length );
+ pDomainName[ReferencedDomain->Domains[0].Name.Length / sizeof(WCHAR)] =
L'\0';
+ }
}
}
}