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

Alexandre Julliard julliard at winehq.org
Mon Dec 31 12:32:31 CST 2007


Module: wine
Branch: master
Commit: ec3448ff8ca5880d72ca8d45135d370275fc7c83
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ec3448ff8ca5880d72ca8d45135d370275fc7c83

Author: Rob Shearman <rob at codeweavers.com>
Date:   Sat Dec 29 12:14:19 2007 +0000

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

---

 dlls/ntdll/reg.c       |    2 +-
 dlls/ntdll/tests/reg.c |    4 ----
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index a095ee3..7620bdd 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -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;
         }
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 0a58d68..4a559a5 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -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,




More information about the wine-cvs mailing list