diff options
| author | Richard W.M. Jones <rjones@redhat.com> | 2011-04-13 13:55:49 +0100 |
|---|---|---|
| committer | Richard W.M. Jones <rjones@redhat.com> | 2011-04-13 13:55:49 +0100 |
| commit | c22ed5a6cb58aff70bf74df5b7c1edd33d796ef4 (patch) | |
| tree | 564f2b4c58e39d9550e6b1ee82f306dd6f5216e9 /python | |
| parent | 3e941d7ef4163b8882b1296adfd837c507a81075 (diff) | |
| download | hivex-c22ed5a6cb58aff70bf74df5b7c1edd33d796ef4.tar.gz hivex-c22ed5a6cb58aff70bf74df5b7c1edd33d796ef4.tar.xz hivex-c22ed5a6cb58aff70bf74df5b7c1edd33d796ef4.zip | |
Return real length of buffer from hivex_value_value.
In real registries, often the length declared in the header does not
match the length of the block. In this case hivex_value_value would
only allocate a value with a size which is the shorter of the two
length values, which is correct and safe.
However user code could do:
buf = hivex_value_value (h, v, &t, &len);
memcpy (somewhere, buf, len);
which would copy uninitialized data.
If hivex_value_value truncates a value like this, we also need to
return the shorter length to the user as well.
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions
