[PATCH] advapi32: Return error from RegCreateKeyEx[AW] if the key name is null

Alexandre Julliard julliard at winehq.org
Tue Nov 6 03:34:29 CST 2018


Alex Henrie <alexhenrie24 at gmail.com> writes:

> @@ -371,6 +371,7 @@ LSTATUS WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR
>      UNICODE_STRING nameW, classW;
>  
>      if (reserved) return ERROR_INVALID_PARAMETER;
> +    if (!name) return ERROR_BADKEY;
>      if (!(hkey = get_special_root_hkey( hkey, access ))) return ERROR_INVALID_HANDLE;

You are also changing RegCreateKeyExW, but the tests only cover
RegCreateKeyExA. It would be good to test both.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list