kernel32: Enhance bare fd check by checking that the handle is a real console handle.
This commit is contained in:
parent
21498d6c11
commit
945e16c281
|
@ -160,7 +160,8 @@ static int get_console_bare_fd(HANDLE hin)
|
||||||
{
|
{
|
||||||
int fd;
|
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)
|
0, &fd, NULL) == STATUS_SUCCESS)
|
||||||
return fd;
|
return fd;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue