From bfc6a119c57c367f8cb6a8e782ec2c81901719a0 Mon Sep 17 00:00:00 2001 From: Doug Lyons Date: Sat, 8 Apr 2023 21:04:04 -0500 Subject: [PATCH] [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 --- dll/win32/advapi32/reg/reg.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dll/win32/advapi32/reg/reg.c b/dll/win32/advapi32/reg/reg.c index 904ca010eca..58515793c4e 100644 --- a/dll/win32/advapi32/reg/reg.c +++ b/dll/win32/advapi32/reg/reg.c @@ -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);