mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
winnt-initialize-variables-and-memory-before-use-20010906
initialize a variable false when assumed; also some memset(...,0
This commit is contained in:
parent
11b021e1b1
commit
653b001612
@ -398,7 +398,7 @@ BOOL AfsClass_RestartService (LPIDENT lpiRestart, ULONG *pStatus)
|
||||
lpServer->Close();
|
||||
}
|
||||
|
||||
BOOL fRestartAll;
|
||||
BOOL fRestartAll = FALSE;
|
||||
if (!lpiRestart->fIsService())
|
||||
fRestartAll = TRUE;
|
||||
|
||||
|
@ -129,6 +129,7 @@ cm_space_t *cm_GetSpace(void)
|
||||
cm_spaceListp = tsp->nextp;
|
||||
}
|
||||
else tsp = (cm_space_t *) malloc(sizeof(cm_space_t));
|
||||
(void) memset(tsp, 0, sizeof(cm_space_t);
|
||||
lock_ReleaseWrite(&cm_utilsLock);
|
||||
|
||||
return tsp;
|
||||
|
@ -149,6 +149,10 @@ void smb_IoctlPrepareWrite(smb_fid_t *fidp, smb_ioctl_t *ioctlp)
|
||||
if (!ioctlp->inAllocp) ioctlp->inAllocp = malloc(SMB_IOCTL_MAXDATA);
|
||||
if (!ioctlp->outAllocp) ioctlp->outAllocp = malloc(SMB_IOCTL_MAXDATA);
|
||||
|
||||
/* Fixes fs la problem. We do a StrToOEM later and if this data isn't initialized we get memory issues. */
|
||||
(void) memset(ioctlp->inAllocp, 0, SMB_IOCTL_MAXDATA);
|
||||
(void) memset(ioctlp->outAllocp, 0, SMB_IOCTL_MAXDATA);
|
||||
|
||||
/* and make sure that we've reset our state for the new incoming request */
|
||||
if (!(ioctlp->flags & SMB_IOCTLFLAG_DATAIN)) {
|
||||
ioctlp->inCopied = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user