[ADVAPI32] Do not fail on creating a registry key if the security attributes have an invalid length. (#5230)

Provide graceful handling of RegCreateKeyExW when lpSecurityAttributes->nLength is zero.
This reverts commit cc0716b65 (SVN r24491).
JIRA issue: CORE-15471
This commit is contained in:
Doug Lyons 2023-04-08 21:04:04 -05:00 committed by GitHub
parent 96c7fe4ccd
commit bfc6a119c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1108,9 +1108,6 @@ RegCreateKeyExW(
TRACE("RegCreateKeyExW() called\n");
if (lpSecurityAttributes && lpSecurityAttributes->nLength != sizeof(SECURITY_ATTRIBUTES))
return ERROR_INVALID_USER_BUFFER;
/* get the real parent key */
Status = MapDefaultKey(&ParentKey,
hKey);