mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
DEVEL15-windows-afslogon-null-pointer-deref-20071211
LICENSE MIT 'tokenUser' can be dereferenced when NULL if GetTokenInformation() fails. (cherry picked from commit 8f84815d0d8c9cc0b49eb29bfceeb03a7ae7f04f)
This commit is contained in:
parent
f59669b16a
commit
8cf0381646
@ -1230,7 +1230,7 @@ VOID AFS_Logoff_Event( PWLX_NOTIFICATION_INFO pInfo )
|
||||
/* We can't use pInfo->Domain for the domain since in the cross realm case
|
||||
* this is source domain and not the destination domain.
|
||||
*/
|
||||
if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, pInfo->Domain)) {
|
||||
if (tokenUser && QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, pInfo->Domain)) {
|
||||
WCHAR Domain[64]=L"";
|
||||
GetLocalShortDomain(Domain, sizeof(Domain));
|
||||
if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, Domain)) {
|
||||
@ -1342,7 +1342,7 @@ VOID AFS_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
|
||||
/* We can't use pInfo->Domain for the domain since in the cross realm case
|
||||
* this is source domain and not the destination domain.
|
||||
*/
|
||||
if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, pInfo->Domain)) {
|
||||
if (tokenUser && QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, pInfo->Domain)) {
|
||||
WCHAR Domain[64]=L"";
|
||||
GetLocalShortDomain(Domain, sizeof(Domain));
|
||||
if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, Domain)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user