mirror of
https://github.com/reactos/reactos.git
synced 2024-10-19 23:50:05 +00:00
[ADVAPI32]
- Fix buffer overflow in LookupAccountSidA See issue #6752 for more details. svn path=/trunk/; revision=55678
This commit is contained in:
parent
e5f337a82b
commit
c73d3138d4
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* WINE COPYRIGHT:
|
||||
* WINE COPYRIGHT:
|
||||
* Copyright 1999, 2000 Juergen Schmied <juergen.schmied@debitel.net>
|
||||
* 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)
|
||||
|
|
Loading…
Reference in a new issue