Commit bf3c2a06 authored by Bernhard Loos's avatar Bernhard Loos Committed by Alexandre Julliard

server: Check for STATUS_OBJECT_TYPE_MISMATCH before STATUS_ACCESS_DENIED in get_handle_obj.

parent 872c07a9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment