Commit 945e16c2 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

kernel32: Enhance bare fd check by checking that the handle is a real console handle.

parent 21498d6c
......@@ -160,7 +160,8 @@ static int get_console_bare_fd(HANDLE hin)
{
int fd;
if (wine_server_handle_to_fd(wine_server_ptr_handle(console_handle_unmap(hin)),
if (is_console_handle(hin) &&
wine_server_handle_to_fd(wine_server_ptr_handle(console_handle_unmap(hin)),
0, &fd, NULL) == STATUS_SUCCESS)
return fd;
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment