hivex: Don't die on valid registries which have bad declared data lengths.
authorRichard Jones <rjones@redhat.com>
Thu, 4 Feb 2010 13:26:04 +0000 (13:26 +0000)
committerRichard Jones <rjones@redhat.com>
Fri, 19 Feb 2010 15:01:34 +0000 (15:01 +0000)
commit0ebcc228ab2bf8554a1b2c091d86b98c7040948f
treeef7bf048c4e41c766eeb606158b87980dda90c71
parenta72a61b02d1eda599efda8645570d04434a39fa2
hivex: Don't die on valid registries which have bad declared data lengths.

Some apparently valid registries contain value data length
declarations which exceed the allocated block size for the
value.

Previously the code would return EFAULT for such registries.
However since these appear to be otherwise valid registries,
turn this into a warning and just use the allocated block size
as the data length (in other words, truncate the value).
hivex/hivex.c