STABLE14-windows-misc-20060826

(1) verify uidp before use

(2) initialize variables before use
This commit is contained in:
Jeffrey Altman 2006-08-26 17:13:43 +00:00
parent c348fd8953
commit 38f543b2d6
2 changed files with 9 additions and 7 deletions

View File

@ -268,7 +268,7 @@ configureBackConnectionHostNames(void)
HKEY hkMSV10; HKEY hkMSV10;
HKEY hkClient; HKEY hkClient;
DWORD dwType; DWORD dwType;
DWORD dwSize, dwAllocSize; DWORD dwSize = 0, dwAllocSize = 0;
DWORD dwValue; DWORD dwValue;
PBYTE pHostNames = NULL, pName = NULL; PBYTE pHostNames = NULL, pName = NULL;
BOOL bNameFound = FALSE; BOOL bNameFound = FALSE;

View File

@ -879,12 +879,14 @@ long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
lock_ReleaseMutex(&unp->mx); lock_ReleaseMutex(&unp->mx);
uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE); uidp = smb_FindUID(vcp, newUid, SMB_FLAG_CREATE);
lock_ObtainMutex(&uidp->mx); if (uidp) {
uidp->unp = unp; lock_ObtainMutex(&uidp->mx);
osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",(int)vcp,vcp->lana,vcp->lsn,newUid,osi_LogSaveString(smb_logp, usern)); uidp->unp = unp;
osi_Log4(smb_logp,"smb_ReceiveV3SessionSetupX MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d]",vcp,vcp->lana,vcp->lsn,newUid); osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d],TicketKTCName[%s]",(int)vcp,vcp->lana,vcp->lsn,newUid,osi_LogSaveString(smb_logp, usern));
lock_ReleaseMutex(&uidp->mx); osi_Log4(smb_logp,"smb_ReceiveV3SessionSetupX MakeNewUser:VCP[%x],Lana[%d],lsn[%d],userid[%d]",vcp,vcp->lana,vcp->lsn,newUid);
smb_ReleaseUID(uidp); lock_ReleaseMutex(&uidp->mx);
smb_ReleaseUID(uidp);
}
} }
/* Return UID to the client */ /* Return UID to the client */