ntohs ubik header size

The 'size' field in the ubik header is only 16-bits wide, so we should
be using ntohs to read it, not ntohl. The database checking utilities
for the prdb and kadb were still using ntohl (vldb was fixed by
591f9b6de9ab3dc5c17ad41af0241527f7f04b31).

Reviewed-on: http://gerrit.openafs.org/5466
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit e69714739f64475d71633fd4cb3523bc1ae143bb)

Change-Id: Id4f677cddcedba3008d349bcf9740168129f8496
Reviewed-on: http://gerrit.openafs.org/6314
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Andrew Deason 2011-09-19 11:05:59 -04:00 committed by Derrick Brashear
parent 1aaf64bac4
commit 4bdded24ec
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ readUbikHeader(void)
}
uheader.magic = ntohl(uheader.magic);
uheader.size = ntohl(uheader.size);
uheader.size = ntohs(uheader.size);
uheader.version.epoch = ntohl(uheader.version.epoch);
uheader.version.counter = ntohl(uheader.version.counter);

View File

@ -217,7 +217,7 @@ readUbikHeader(struct misc_data *misc)
}
uheader.magic = ntohl(uheader.magic);
uheader.size = ntohl(uheader.size);
uheader.size = ntohs(uheader.size);
uheader.version.epoch = ntohl(uheader.version.epoch);
uheader.version.counter = ntohl(uheader.version.counter);