When using pt_util's ubik shim, if we're creating a new ubik label
make sure to zero the whole structure before writing it out to disk.
Otherwise we get a shorts worth of stack garbage in the resulting
file.
Caught by coverity (#986010)
Reviewed-on: http://gerrit.openafs.org/9274
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit
96131593b329a319b22368a9ef37788fb4e5d4f4)
Change-Id: I9b2b22c075bf896a74f4b527354c8a6758ac2865
Reviewed-on: http://gerrit.openafs.org/11013
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
struct ubik_hdr thdr;
if (!init) {
+ memset(&thdr, 0, sizeof(thdr));
thdr.version.epoch = htonl(2);
thdr.version.counter = htonl(0);
thdr.magic = htonl(UBIK_MAGIC);