git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e984e6
)
Fix trailing garbage in the hbin block.
author
Wilco Baan Hofman
<wilco@baanhofman.nl>
Thu, 8 Oct 2009 10:36:30 +0000
(12:36 +0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Sun, 15 Nov 2009 18:26:50 +0000
(19:26 +0100)
This specifically fixes a problem showing extra bytes of garbage in list and
print in regshell, even though the vk.data_length has the correct size.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
source4/lib/registry/regf.c
patch
|
blob
|
history
diff --git
a/source4/lib/registry/regf.c
b/source4/lib/registry/regf.c
index c5a74c79115916e89a6d3429be5b10cb8c01e3cf..a7fed4205403d3725ef5ee49357105fc357bb7e0 100644
(file)
--- a/
source4/lib/registry/regf.c
+++ b/
source4/lib/registry/regf.c
@@
-261,6
+261,11
@@
static uint32_t hbin_store (struct regf_data *data, DATA_BLOB blob)
memcpy(dest.data, blob.data, blob.length);
+ /* Make sure that we have no tailing garbage in the block */
+ if (dest.length > blob.length) {
+ memset(dest.data + blob.length, 0, dest.length - blob.length);
+ }
+
return ret;
}