* uinfo.cc (pwdgrp::fetch_account_from_windows): Fix potential SEGV
referencing NULL pointer.
This commit is contained in:
parent
ed2cfab440
commit
81f9ce0734
|
@ -1,4 +1,9 @@
|
|||
2014-05-20 Corinna Vinschen <corinna@vinschen.de>
|
||||
2014-05-22 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* uinfo.cc (pwdgrp::fetch_account_from_windows): Fix potential SEGV
|
||||
referencing NULL pointer.
|
||||
|
||||
2014-05-22 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* libc/bsdlib.cc (forkpty): Close master and slave if fork fails to
|
||||
avoid resource leak (CID 59997).
|
||||
|
|
|
@ -1441,17 +1441,17 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
|
|||
else
|
||||
{
|
||||
/* Some trusted domain? */
|
||||
PDS_DOMAIN_TRUSTSW td = NULL;
|
||||
PDS_DOMAIN_TRUSTSW td = NULL, this_td = NULL;
|
||||
|
||||
for (ULONG idx = 0; (td = cygheap->dom.trusted_domain (idx)); ++idx)
|
||||
{
|
||||
fetch_posix_offset (td, cldap);
|
||||
if (td->PosixOffset > posix_offset && td->PosixOffset <= arg.id)
|
||||
posix_offset = td->PosixOffset;
|
||||
posix_offset = (this_td = td)->PosixOffset;
|
||||
}
|
||||
if (posix_offset)
|
||||
if (this_td)
|
||||
{
|
||||
cygpsid tsid (td->DomainSid);
|
||||
cygpsid tsid (this_td->DomainSid);
|
||||
PWCHAR s = tsid.pstring (sidstr);
|
||||
__small_swprintf (s, L"-%u", arg.id - posix_offset);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue