From: Jeffrey Altman Date: Sun, 20 Sep 2009 15:06:07 +0000 (-0400) Subject: Windows: uninitialized variable in cm_GetBuffer X-Git-Tag: openafs-devel-1_5_64~5 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=10706d8208df865ac0bc89f6d83a5779b9794128;p=packages%2Fo%2Fopenafs.git Windows: uninitialized variable in cm_GetBuffer Initialize code and code1 to zero. Otherwise, a non-zero value on the stack can result in an incorrect error value being passed to cm_Analyze(). LICENSE MIT Reviewed-on: http://gerrit.openafs.org/473 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_dcache.c b/src/WINNT/afsd/cm_dcache.c index ab5411e88..dc7ca1b27 100644 --- a/src/WINNT/afsd/cm_dcache.c +++ b/src/WINNT/afsd/cm_dcache.c @@ -1389,7 +1389,7 @@ void cm_ReleaseBIOD(cm_bulkIO_t *biop, int isStore, long code, int scp_locked) long cm_GetBuffer(cm_scache_t *scp, cm_buf_t *bufp, int *cpffp, cm_user_t *userp, cm_req_t *reqp) { - long code, code1; + long code=0, code1=0; afs_uint32 nbytes; /* bytes in transfer */ afs_uint32 nbytes_hi = 0; /* high-order 32 bits of bytes in transfer */ afs_uint64 length_found = 0;