server: Return STATUS_BUFFER_TOO_SMALL instead of STATUS_BUFFER_OVERFLOW from get_directory_entry.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-04-10 23:29:51 -05:00 committed by Alexandre Julliard
parent ccf706b456
commit 2d147ce985
2 changed files with 2 additions and 2 deletions

View File

@ -2637,7 +2637,7 @@ static void test_query_directory(void)
size = 0xdeadbeef;
memset( buffer, 0xcc, sizeof(buffer) );
status = NtQueryDirectoryObject( dir, info, needed_size - 1, TRUE, TRUE, &context, &size );
todo_wine ok( status == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", status );
ok( status == STATUS_BUFFER_TOO_SMALL, "got %#lx\n", status );
todo_wine ok( size == needed_size, "expected size %lu, got %lu\n", needed_size, size );
status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, &context, NULL );

View File

@ -556,7 +556,7 @@ DECL_HANDLER(get_directory_entry)
memcpy( (char *)ptr + name_len, type_name->str, type_name->len );
}
}
else set_error( STATUS_BUFFER_OVERFLOW );
else set_error( STATUS_BUFFER_TOO_SMALL );
release_object( obj );
}