Displaying 2 results from an estimated 2 matches for "a3cbcf7".
2014 Oct 30
0
Re: [libhivex] Undefined behavior when accessing invalid (too small) registry hives
...e valid hives, since they don't contain a full header
page and at least a single page of data (in other words they couldn't
contain a root node).
Thanks: Mahmoud Al-Qudsi
---
lib/handle.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/handle.c b/lib/handle.c
index 62a8644..a3cbcf7 100644
--- a/lib/handle.c
+++ b/lib/handle.c
@@ -104,6 +104,13 @@ hivex_open (const char *filename, int flags)
h->size = statbuf.st_size;
+ if (h->size < 0x2000) {
+ SET_ERRNO (EINVAL,
+ "%s: file is too small to be a Windows NT Registry hive file",
+...
2014 Oct 30
4
Re: [libhivex] Undefined behavior when accessing invalid (too small) registry hives
On Oct 29, 2014, at 3:39 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
>
>> Or is it expected that certain sanity checks would be performed prior to
>> passing along any files to libhivex? What would those checks be?
>
> No, hivex should definitely have those checks.
>
> I'll have a proper look at this in the morning.
>
> Thanks,
>
> Rich.