When converting a volume header from host to network order, make
sure that any unused fields in the structure are zero'd, so we don't
end up filling them with stack garbage in the network version of
the structure.
Caught by coverity (#985956)
Change-Id: I3e039ffcb102a97afeb0e2223de12523f53b0a67
Reviewed-on: http://gerrit.openafs.org/9548
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
{
struct volumeHeader volHdr;
+ memset(&volHdr, 0, sizeof(volHdr));
+
strcpy(volHdr.preamble, hostPtr->preamble);
strcpy(volHdr.postamble, hostPtr->postamble);
strcpy(volHdr.volumeName, hostPtr->volumeName);