]> sourceware.org Git - newlib-cygwin.git/commit
Allocate temporary TOKEN_GROUP arrays using TLS
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 23 Mar 2016 16:40:24 +0000 (17:40 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 23 Mar 2016 16:40:24 +0000 (17:40 +0100)
commit155a1ec5fb27dcbbc2e6464bc6e5d8b08c0b03e5
tree5d96ee61f3abcab54ceb23e49b0e169699fdf093
parent117737a7fa6c8611d049f74dd9407ba5ab1ca425
Allocate temporary TOKEN_GROUP arrays using TLS

A user token can be up to 64K in size.  The group list might take a lot
of that so use tmp_pathbuf allocated space rather than stack space
allocted via alloca.  In create_token the TOKEN_GROUP was allocated via
malloc, but the code is needlessly complicated.  Simplify by using
tmp_pathbuf as well.

* sec_auth.cc (verify_token): Allocate TOKEN_GROUP via tmp_pathbuf.
(create_token): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/sec_auth.cc
This page took 0.031246 seconds and 5 git commands to generate.