ntdll: While requesting TokenGroups calculate required user buffer size in server (try2)
Alexandre Julliard
julliard at winehq.org
Mon Aug 22 10:31:00 CDT 2011
Nikolay Sivov <nsivov at codeweavers.com> writes:
> + SERVER_START_REQ( get_token_groups )
> {
> - need_more_memory = FALSE;
> + TOKEN_GROUPS *groups = tokeninfo;
> + void *buffer;
>
> - SERVER_START_REQ( get_token_groups )
> - {
> - TOKEN_GROUPS *groups = tokeninfo;
> + /* reply buffer is always shorter than output one */
> + buffer = tokeninfolength ? RtlAllocateHeap(GetProcessHeap(), 0, tokeninfolength) : NULL;
Please avoid complex operation like heap allocations inside a server
request block.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list