Commit 0bf1c22c authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

server: Handle failure of mem_alloc in duplicate_token.

parent 9e0d0563
......@@ -1031,6 +1031,12 @@ DECL_HANDLER(duplicate_token)
{
size_t size = FIELD_OFFSET( struct sid_and_attributes, sid.SubAuthority[group->sid.SubAuthorityCount] );
struct sid_and_attributes *newgroup = mem_alloc( size );
if (!newgroup)
{
release_object( token );
release_object( src_token );
return;
}
memcpy( newgroup, group, size );
list_add_tail( &token->groups, &newgroup->entry );
}
......
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