[PATCH] [Server]: ensure we set proper errors when getting a NULL fd out of a handle

Eric Pouech eric.pouech at orange.fr
Wed Sep 15 15:40:32 CDT 2010


(would hang for example server_get_unix_fd when an improper handle was passed, as no error
was returned from server call)
Fix for #24394.

A+
---

 server/fd.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/server/fd.c b/server/fd.c
index f9a769e..6a57f6a 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2182,6 +2182,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
     if ((obj = get_handle_obj( process, handle, access, NULL )))
     {
         fd = get_obj_fd( obj );
+        if (!fd) set_error( STATUS_OBJECT_TYPE_MISMATCH );
         release_object( obj );
     }
     return fd;






More information about the wine-patches mailing list