Author: ekohl
Date: Thu May 29 15:19:30 2014
New Revision: 63494
URL:
http://svn.reactos.org/svn/reactos?rev=63494&view=rev
Log:
[ADVAPI32][MSGINA]
Fix overflow of TokenSource.SourceName.
CORE-8272 #resolve
Modified:
trunk/reactos/dll/win32/advapi32/misc/logon.c
trunk/reactos/dll/win32/msgina/lsa.c
Modified: trunk/reactos/dll/win32/advapi32/misc/logon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/misc/lo…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/misc/logon.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/misc/logon.c [iso-8859-1] Thu May 29 15:19:30 2014
@@ -463,7 +463,7 @@
SE_GROUP_ENABLED_BY_DEFAULT;
/* Set the token source */
- strcpy(TokenSource.SourceName, "LogonUser");
+ strncpy(TokenSource.SourceName, "Advapi ",
sizeof(TokenSource.SourceName));
AllocateLocallyUniqueId(&TokenSource.SourceIdentifier);
Status = LsaLogonUser(LsaHandle,
Modified: trunk/reactos/dll/win32/msgina/lsa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/lsa.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/msgina/lsa.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/lsa.c [iso-8859-1] Thu May 29 15:19:30 2014
@@ -192,7 +192,7 @@
SE_GROUP_ENABLED_BY_DEFAULT;
/* Set the token source */
- strcpy(TokenSource.SourceName, "LogonUser");
+ strncpy(TokenSource.SourceName, "User32 ",
sizeof(TokenSource.SourceName));
AllocateLocallyUniqueId(&TokenSource.SourceIdentifier);
Status = LsaLogonUser(LsaHandle,