diff options
author | Richard Jones <rjones@redhat.com> | 2010-01-15 12:41:34 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-02-19 14:54:28 +0000 |
commit | ce5d63efb8d5e14fb0ead1a9b819eb7fd97e5507 (patch) | |
tree | fe1d49c1b0bc965d849bc4d07babf8b7e0af4d3b /hivex/hivex.c | |
parent | a60594265d542b8fc560d9ab7e05b407fec7981a (diff) | |
download | hivex-ce5d63efb8d5e14fb0ead1a9b819eb7fd97e5507.tar.gz hivex-ce5d63efb8d5e14fb0ead1a9b819eb7fd97e5507.tar.xz hivex-ce5d63efb8d5e14fb0ead1a9b819eb7fd97e5507.zip |
hivex: Reenable checksum calculations, but don't check result.
Diffstat (limited to 'hivex/hivex.c')
-rw-r--r-- | hivex/hivex.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hivex/hivex.c b/hivex/hivex.c index 36c6b0e..546ef18 100644 --- a/hivex/hivex.c +++ b/hivex/hivex.c @@ -283,15 +283,16 @@ hivex_open (const char *filename, int flags) if (h->bitmap == NULL) goto error; -#if 0 /* Doesn't work. */ /* Header checksum. */ - uint32_t *daddr = h->addr; + uint32_t *daddr = (uint32_t *) h->addr; size_t i; uint32_t sum = 0; for (i = 0; i < 0x1fc / 4; ++i) { - sum += le32toh (*daddr); + sum ^= le32toh (*daddr); daddr++; } + +#if 0 /* Doesn't work. */ if (sum != le32toh (h->hdr->csum)) { fprintf (stderr, "hivex: %s: bad checksum in hive header\n", filename); errno = EINVAL; |