vol: initialize FdHandle_t stack objects

In namei_create() a temporary FdHandle_t is allocated on
the stack but was never initialized.  Depending on what
prior data was on the stack the FdHandle_t could result
in subsequent operations failing in unpredictable ways.

Change-Id: I6246930adc87cf84ad9c0913cda2d00e6f851bc1
Reviewed-on: http://gerrit.openafs.org/3667
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Jeffrey Altman 2011-01-15 11:39:39 -05:00 committed by Jeffrey Altman
parent 714b3ffb22
commit 05d5f012e0

View File

@ -754,6 +754,7 @@ namei_icreate(IHandle_t * lh, char *part, afs_uint32 p1, afs_uint32 p2, afs_uint
b32_string_t str1;
memset((void *)&tmp, 0, sizeof(IHandle_t));
memset(&tfd, 0, sizeof(FdHandle_t));
tmp.ih_dev = nt_DriveToDev(part);
if (tmp.ih_dev == -1) {
@ -879,6 +880,7 @@ namei_icreate(IHandle_t * lh, char *part, afs_uint32 p1, afs_uint32 p2, afs_uint
int ogm_parm;
memset((void *)&tmp, 0, sizeof(IHandle_t));
memset(&tfd, 0, sizeof(FdHandle_t));
tmp.ih_dev = volutil_GetPartitionID(part);
if (tmp.ih_dev == -1) {