[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH v3 0/2] hivex: handle corrupted hives better



The following patches address issues when dealing with hives that have
corrupted data in them but are otherwise readable/writable. Those were
found on some rather rare Windows installations that seem to work fine
but current hivex fails to even open.

Those patches change hivex to simply log and ignore such "corrupted"
regions instead of aborting because the caller might be looking at keys
that are perfectly readable/writable (e.g. to identify Windows version
from HKLM/Software/Microsoft/Windows NT/CurrentVersion) and other
"corrupted" and irrelevant keys might prevent one from doing so.

Changes in v3:
 * rebase on current master
 * fix GCC7 -Wunsafe-loop-optimizations warning by incrementing the "off"
   variable by 1 rather than 0x1000, the latter was assuming "garbage" data
   in between "hbins" would be aligned on 4096 bytes which does not have to
   be true and GCC7 is correct.

Regards,

Dawid Zamirski (2):
  lib: change how hbin sections are read.
  lib: allow to walk registry with corrupted blocks

 lib/handle.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++---------
 lib/node.c   | 21 ++++++++++++---------
 2 files changed, 58 insertions(+), 18 deletions(-)

-- 
2.9.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]