[PATCH] [Kernel32]: enhance bare fd check by checking that the handle is a real console handle
Eric Pouech
eric.pouech at orange.fr
Fri Feb 17 14:57:38 CST 2012
(#29883)
A+
---
dlls/kernel32/console.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 08bac68..757dd14 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -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;
More information about the wine-patches
mailing list