salvager: Clear summary in RecordHeader
authorAndrew Deason <adeason@sinenomine.net>
Tue, 21 Jun 2011 23:08:21 +0000 (18:08 -0500)
committerDerrick Brashear <shadow@dementia.org>
Wed, 22 Jun 2011 12:55:30 +0000 (05:55 -0700)
Not every field in the summary header in RecordHeader is set, leaving
some used uninitialized when we copy to the given volumeSummaryp (like
'deleted'). Zero out the header before we do anything.

Change-Id: I94f6e5c8b8c60675de25eb6f8290de9545ff4dd0
Reviewed-on: http://gerrit.openafs.org/4876
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/vol/vol-salvage.c

index 2631176..0f7f0b9 100644 (file)
@@ -1546,6 +1546,8 @@ RecordHeader(struct DiskPartition64 *dp, const char *name,
 
     params = (struct SalvageScanParams *)rock;
 
+    memset(&summary, 0, sizeof(summary));
+
     singleVolumeNumber = params->singleVolumeNumber;
     salvinfo = params->salvinfo;