Bernhard Loos : server: Check for STATUS_OBJECT_TYPE_MISMATCH before STATUS_ACCESS_DENIED in get_handle_obj .
Alexandre Julliard
julliard at winehq.org
Wed Jul 20 12:54:40 CDT 2011
Module: wine
Branch: master
Commit: bf3c2a06f58a32cd58a019eff95774eea8305ee2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf3c2a06f58a32cd58a019eff95774eea8305ee2
Author: Bernhard Loos <bernhardloos at googlemail.com>
Date: Tue Jul 19 13:20:39 2011 +0200
server: Check for STATUS_OBJECT_TYPE_MISMATCH before STATUS_ACCESS_DENIED in get_handle_obj.
---
server/handle.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/server/handle.c b/server/handle.c
index 9d91f16..c7cd417 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -403,14 +403,19 @@ struct object *get_handle_obj( struct process *process, obj_handle_t handle,
set_error( STATUS_INVALID_HANDLE );
return NULL;
}
+ obj = entry->ptr;
+ if (ops && (obj->ops != ops))
+ {
+ set_error( STATUS_OBJECT_TYPE_MISMATCH ); /* not the right type */
+ return NULL;
+ }
if ((entry->access & access) != access)
{
set_error( STATUS_ACCESS_DENIED );
return NULL;
}
- obj = entry->ptr;
}
- if (ops && (obj->ops != ops))
+ else if (ops && (obj->ops != ops))
{
set_error( STATUS_OBJECT_TYPE_MISMATCH ); /* not the right type */
return NULL;
More information about the wine-cvs
mailing list