hivexregedit: Low-level tool for merging and export in regedit format.
[hivex.git] / lib / hivex.c
index 91d3b12..74a7f55 100644 (file)
@@ -56,8 +56,8 @@
 #include "byte_conversions.h"
 
 /* These limits are in place to stop really stupid stuff and/or exploits. */
-#define HIVEX_MAX_SUBKEYS       10000
-#define HIVEX_MAX_VALUES         1000
+#define HIVEX_MAX_SUBKEYS       15000
+#define HIVEX_MAX_VALUES        10000
 #define HIVEX_MAX_VALUE_LEN   1000000
 #define HIVEX_MAX_ALLOCATION  1000000
 
@@ -1860,6 +1860,8 @@ allocate_block (hive_h *h, size_t seg_len, const char id[2])
   struct ntreg_hbin_block *blockhdr =
     (struct ntreg_hbin_block *) (h->addr + offset);
 
+  memset (blockhdr, 0, seg_len);
+
   blockhdr->seg_len = htole32 (- (int32_t) seg_len);
   if (id[0] && id[1] && seg_len >= sizeof (struct ntreg_hbin_block)) {
     blockhdr->id[0] = id[0];