mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 04:13:35 +00:00
[ADVAPI32]
- Fix buffer overflow in LookupAccountSidA See issue #6752 for more details. svn path=/trunk/; revision=55678
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* WINE COPYRIGHT:
|
||||
* WINE COPYRIGHT:
|
||||
* Copyright 1999, 2000 Juergen Schmied <[email protected]>
|
||||
* Copyright 2003 CodeWeavers Inc. (Ulrich Czekalla)
|
||||
* Copyright 2006 Robert Reif
|
||||
@@ -808,7 +808,7 @@ LookupAccountSidA(LPCSTR lpSystemName,
|
||||
/* allocate buffers for the unicode strings to receive */
|
||||
if (dwName > 0)
|
||||
{
|
||||
NameBuffer = (PWSTR)LocalAlloc(LMEM_FIXED, dwName);
|
||||
NameBuffer = LocalAlloc(LMEM_FIXED, dwName * sizeof(WCHAR));
|
||||
if (NameBuffer == NULL)
|
||||
{
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
@@ -820,7 +820,7 @@ LookupAccountSidA(LPCSTR lpSystemName,
|
||||
|
||||
if (dwReferencedDomainName > 0)
|
||||
{
|
||||
ReferencedDomainNameBuffer = (PWSTR)LocalAlloc(LMEM_FIXED, dwReferencedDomainName);
|
||||
ReferencedDomainNameBuffer = LocalAlloc(LMEM_FIXED, dwReferencedDomainName * sizeof(WCHAR));
|
||||
if (ReferencedDomainNameBuffer == NULL)
|
||||
{
|
||||
if (dwName > 0)
|
||||
|
||||
Reference in New Issue
Block a user