Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50791 Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com --- dlls/ntdll/tests/om.c | 15 +++++++++++++++ dlls/ntdll/unix/file.c | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index e93f11e1126..e0988769c9c 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -1379,6 +1379,7 @@ static void test_query_object(void) char buffer[1024]; NTSTATUS status; ULONG len, expected_len; + OBJECT_BASIC_INFORMATION info; OBJECT_ATTRIBUTES attr; UNICODE_STRING path, target, *str; char dir[MAX_PATH], tmp_path[MAX_PATH], file1[MAX_PATH + 16]; @@ -1390,6 +1391,20 @@ static void test_query_object(void)
handle = CreateEventA( NULL, FALSE, FALSE, "test_event" );
+ status = pNtQueryObject( handle, ObjectBasicInformation, NULL, 0, NULL ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); + + status = pNtQueryObject( handle, ObjectBasicInformation, &info, 0, NULL ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); + + status = pNtQueryObject( handle, ObjectBasicInformation, NULL, 0, &len ); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); + + len = 0; + status = pNtQueryObject( handle, ObjectBasicInformation, &info, sizeof(OBJECT_BASIC_INFORMATION), &len ); + ok( status == STATUS_SUCCESS, "NtQueryObject failed %x\n", status ); + ok( len >= sizeof(OBJECT_BASIC_INFORMATION), "unexpected len %u\n", len ); + len = 0; status = pNtQueryObject( handle, ObjectNameInformation, buffer, 0, &len ); ok( status == STATUS_INFO_LENGTH_MISMATCH, "NtQueryObject failed %x\n", status ); diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index b4d834b7855..488f7485ad8 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -6734,7 +6734,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas { OBJECT_BASIC_INFORMATION *p = ptr;
- if (len < sizeof(*p)) return STATUS_INVALID_BUFFER_SIZE; + if (len < sizeof(*p)) return STATUS_INFO_LENGTH_MISMATCH;
SERVER_START_REQ( get_object_info ) {
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=88886
Your paranoid android.
=== debiant2 (32 bit report) ===
ntdll: om.c:2305: Test failed: got 88