When we extend a file, we write a single byte of data to it - tlen
is used as a source for this single byte. However, in the current
code, tlen is used uninitialised. Set it to 0, so we don't write a
byte of stack garbage.
Caught by coverity (#986015)
Change-Id: I11480a5ba0a5544437e18a6b314ff98ba6256df0
Reviewed-on: http://gerrit.openafs.org/9271
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
/* Set the file's length; we've already done an lseek to the right
* spot above.
*/
+ tlen = 0; /* Just a source of data for the write */
nBytes = FDH_PWRITE(fdP, &tlen, 1, Pos);
if (nBytes != 1) {
errorCode = -1;