On Sun, Jun 1, 2008 at 11:28 AM, Andrew Talbot
<andrew.talbot(a)talbotville.com> wrote:
> Like native.
>
> -- Andy.
> ---
> Changelog:
> advapi32: RegEnumKeyEx() should return "ERROR_INVALID_PARAMETER" if name_len is NULL.
>
> diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
> index 9ce3da0..41ef3bf 100644
> --- a/dlls/advapi32/registry.c
> +++ b/dlls/advapi32/registry.c
> @@ -473,7 +473,7 @@ LSTATUS WINAPI RegEnumKeyExW( HKEY hkey, DWORD index, LPWSTR name, LPDWORD name_
> TRACE( "(%p,%d,%p,%p(%d),%p,%p,%p,%p)\n", hkey, index, name, name_len,
> name_len ? *name_len : -1, reserved, class, class_len, ft );
>
> - if (reserved) return ERROR_INVALID_PARAMETER;
> + if (!name_len || reserved) return ERROR_INVALID_PARAMETER;
> if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
>
> status = NtEnumerateKey( hkey, index, KeyNodeInformation,
> @@ -537,7 +537,7 @@ LSTATUS WINAPI RegEnumKeyExA( HKEY hkey, DWORD index, LPSTR name, LPDWORD name_l
> TRACE( "(%p,%d,%p,%p(%d),%p,%p,%p,%p)\n", hkey, index, name, name_len,
> name_len ? *name_len : -1, reserved, class, class_len, ft );
>
> - if (reserved) return ERROR_INVALID_PARAMETER;
> + if (!name_len || reserved) return ERROR_INVALID_PARAMETER;
> if (!(hkey = get_special_root_hkey( hkey ))) return ERROR_INVALID_HANDLE;
>
> status = NtEnumerateKey( hkey, index, KeyNodeInformation,
>
Please add a test.
--
James Hawkins