diff options
author | Richard Jones <rjones@redhat.com> | 2010-01-21 17:07:42 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-01-28 11:25:31 +0000 |
commit | 64fa7b9db7bd8bd543c2afa413ffbcc488988eab (patch) | |
tree | 936dd0647f748717b7daa0fd0dc7102ed42230ba /hivex/hivex.c | |
parent | c052b36385a56df3017b7e75a610add2b2cdea5a (diff) | |
download | libguestfs-64fa7b9db7bd8bd543c2afa413ffbcc488988eab.tar.gz libguestfs-64fa7b9db7bd8bd543c2afa413ffbcc488988eab.tar.xz libguestfs-64fa7b9db7bd8bd543c2afa413ffbcc488988eab.zip |
hivex: Fix calculation of block size for vk data blocks.
Diffstat (limited to 'hivex/hivex.c')
-rw-r--r-- | hivex/hivex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hivex/hivex.c b/hivex/hivex.c index 81767adb..71d9c29f 100644 --- a/hivex/hivex.c +++ b/hivex/hivex.c @@ -1187,7 +1187,7 @@ hivex_value_value (hive_h *h, hive_value_h value, /* Check that the declared size isn't larger than the block its in. */ size_t blen = block_len (h, data_offset, NULL); - if (len > blen) { + if (len > blen - 4 /* subtract 4 for block header */) { if (h->msglvl >= 2) fprintf (stderr, "hivex_value_value: returning EFAULT because data is longer than its block (data 0x%zx, data len %zu, block len %zu)\n", data_offset, len, blen); |