Signed-off-by: Kun Yang yangkun@uniontech.com --- dlls/ntdll/tests/reg.c | 2 +- dlls/ntdll/unix/registry.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 2c158be17b4..ab6f7914e4b 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -1831,7 +1831,7 @@ static void test_NtQueryKey(void) pNtClose(key); return; } - todo_wine ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryKey Failed: 0x%08lx\n", status); + ok(status == STATUS_BUFFER_TOO_SMALL, "NtQueryKey Failed: 0x%08lx\n", status); info = HeapAlloc(GetProcessHeap(), 0, length);
/* non-zero buffer size, but insufficient */ diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c index 6628454440a..767fa36302d 100644 --- a/dlls/ntdll/unix/registry.c +++ b/dlls/ntdll/unix/registry.c @@ -321,7 +321,12 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i break; } *result_len = fixed_size + reply->total; - if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW; + if (length < *result_len){ + if(min(length, fixed_size) == 0) + ret = STATUS_BUFFER_TOO_SMALL; + else + ret = STATUS_BUFFER_OVERFLOW; + } } } SERVER_END_REQ;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=116931
Your paranoid android.
=== debian11 (32 bit WoW report) ===
ntdll: change.c:241: Test failed: should be ready