ntdll: Set the DataLength field of the information field in NtQueryValueKey to how much data should be returned, not what was actually returned.

This commit is contained in:
Rob Shearman 2007-12-29 12:14:19 +00:00 committed by Alexandre Julliard
parent 05fbee5e2d
commit ec3448ff8c
2 changed files with 1 additions and 5 deletions

View File

@ -505,7 +505,7 @@ NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name,
if (!(ret = wine_server_call( req )))
{
copy_key_value_info( info_class, info, length, reply->type,
0, wine_server_reply_size(reply) );
name->Length, reply->total );
*result_len = fixed_size + reply->total;
if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW;
}

View File

@ -480,9 +480,7 @@ static void test_NtQueryValueKey(void)
ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status);
ok(partial_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", partial_info->Type);
ok(partial_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", partial_info->Type);
todo_wine
ok(partial_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", partial_info->DataLength);
todo_wine
ok(len == FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data[partial_info->DataLength]), "NtQueryValueKey returned wrong len %d\n", len);
HeapFree(GetProcessHeap(), 0, partial_info);
@ -492,9 +490,7 @@ static void test_NtQueryValueKey(void)
ok(status == STATUS_BUFFER_OVERFLOW, "NtQueryValueKey should have returned STATUS_BUFFER_OVERFLOW instead of 0x%08x\n", status);
ok(full_info->TitleIndex == 0, "NtQueryValueKey returned wrong TitleIndex %d\n", full_info->Type);
ok(full_info->Type == REG_DWORD, "NtQueryValueKey returned wrong Type %d\n", full_info->Type);
todo_wine
ok(full_info->DataLength == 4, "NtQueryValueKey returned wrong DataLength %d\n", full_info->DataLength);
todo_wine
ok(full_info->NameLength == 20, "NtQueryValueKey returned wrong NameLength %d\n", full_info->NameLength);
todo_wine
ok(len == FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name[0]) + full_info->DataLength + full_info->NameLength,