[Libguestfs] [hivex PATCH 2/5] Return real length of buffer from hivex_value_value.
Jim Meyering
jim at meyering.net
Wed Apr 13 13:46:10 UTC 2011
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.
More information about the Libguestfs
mailing list