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 v2:
* fixed code formatting
* added more debug statements
* do not depend on bad_root_block variable, instead report error and
exit if root block is corrupted
* handle the missed case where check_child_is_nk_block was still
returning instead of skipping faulty block with debug message
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