Displaying 2 results from an estimated 2 matches for "hivex_name".
Did you mean:
hive_name
2011 Dec 13
1
[hivex] [PATCH 2/2] hivex: Expose embedded hive file name
...e]),
"return the major version of the hive",
"\
diff --git a/lib/hivex.c b/lib/hivex.c
index 455202f..11468f9 100644
--- a/lib/hivex.c
+++ b/lib/hivex.c
@@ -634,6 +634,12 @@ hivex_last_modified (hive_h *h)
return timestamp_check (h, 0, h->last_modified);
}
+char *
+hivex_name (hive_h *h)
+{
+ return (h && h->hdr) ? windows_utf16_to_utf8 (h->hdr->name, 64) : NULL;
+}
+
int32_t
hivex_major_version (hive_h *h)
{
diff --git a/xml/hivexml.c b/xml/hivexml.c
index 3a4d9b7..059da56 100644
--- a/xml/hivexml.c
+++ b/xml/hivexml.c
@@ -160,6 +160,15 @@ main (in...
2011 Dec 13
1
[hivex] [PATCH 1/2] hivex: Expose hive major and minor version
...f (h->bitmap == NULL)
goto error;
@@ -328,11 +338,11 @@ hivex_open (const char *filename, int flags)
h->last_modified = le64toh ((int64_t) h->hdr->last_modified);
if (h->msglvl >= 2) {
- char *name = windows_utf16_to_utf8 (h->hdr->name, 64);
+ char *name = hivex_name (h);
fprintf (stderr,
"hivex_open: header fields:\n"
- " file version %" PRIu32 ".%" PRIu32 "\n"
+ " file version %" PRIi32 ".%" PRIi32 "\n"
&qu...