1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

Fix trailing garbage in the hbin block.

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>
This commit is contained in:
Wilco Baan Hofman 2009-10-08 12:36:30 +02:00 committed by Jelmer Vernooij
parent 1e984e6630
commit 45bb24e939

View File

@ -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;
}