Eric Pouech : kernel32: Enhance bare fd check by checking that the handle is a real console handle .
Module: wine Branch: master Commit: 945e16c281fc8bc3d6ead7ba95b34b24af39d1d3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=945e16c281fc8bc3d6ead7ba95... Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Fri Feb 17 21:57:38 2012 +0100 kernel32: Enhance bare fd check by checking that the handle is a real console handle. --- 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 6d429f0..4410a31 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;
participants (1)
-
Alexandre Julliard