advapi32: Prevent buffer overrun.
This commit is contained in:
parent
453d71b9f7
commit
3b5107d063
|
@ -4512,13 +4512,15 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
|
|||
{
|
||||
BOOL bret = FALSE;
|
||||
WCHAR toktype;
|
||||
WCHAR tok[MAX_PATH];
|
||||
WCHAR *tok;
|
||||
LPCWSTR lptoken;
|
||||
LPBYTE lpNext = NULL;
|
||||
DWORD len;
|
||||
|
||||
*cBytes = sizeof(SECURITY_DESCRIPTOR);
|
||||
|
||||
tok = heap_alloc( (lstrlenW(StringSecurityDescriptor) + 1) * sizeof(WCHAR));
|
||||
|
||||
if (SecurityDescriptor)
|
||||
lpNext = (LPBYTE)(SecurityDescriptor + 1);
|
||||
|
||||
|
@ -4640,6 +4642,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
|
|||
bret = TRUE;
|
||||
|
||||
lend:
|
||||
heap_free(tok);
|
||||
return bret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue