Richard W.M. Jones wrote:
...
diff --git a/lib/hivex.c b/lib/hivex.c
index 3f4c629..b1f6ea6 100644
--- a/lib/hivex.c
+++ b/lib/hivex.c
@@ -1245,6 +1245,10 @@ hivex_value_value (hive_h *h, hive_value_h value,
fprintf (stderr, "hivex_value_value: warning: declared data length is longer
than the block it is in (data 0x%zx, data len %zu, block len %zu)\n",
data_offset, len, blen);
len = blen - 4;
+
+ /* Return the smaller length to the caller too. */
+ if (len_rtn)
+ *len_rtn = len;
This looks good.