Displaying 1 result from an estimated 1 matches for "hivex_minor_version".
Did you mean:
hive_minor_version
2011 Dec 13
1
[hivex] [PATCH 1/2] hivex: Expose hive major and minor version
...) {
fprintf (stderr,
"hivex: %s: hive file major version %" PRIu32 " (expected 1)\n",
@@ -312,6 +312,16 @@ hivex_open (const char *filename, int flags)
goto error;
}
+ /* Check minor version; if unable to decode, terminate. */
+ int32_t minor_ver = hivex_minor_version (h);
+ if (minor_ver < 0) {
+ fprintf (stderr,
+ "hivex: %s: could not decode hive minor version\n",
+ filename);
+ errno = EINVAL;
+ goto error;
+ }
+
h->bitmap = calloc (1 + h->size / 32, 1);
if (h->bitmap == NULL)
goto error;
@@...