summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/ldb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 62c55fa9af..4dff5e3987 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -89,7 +89,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
if (val->data[0] != '\0') {
/* The data is a plain DWORD */
uint32_t tmp = strtoul((char *)val->data, NULL, 0);
- data->data = talloc_size(mem_ctx, sizeof(uint32_t) + 1);
+ data->data = talloc_size(mem_ctx, sizeof(uint32_t));
if (data->data != NULL) {
SIVAL(data->data, 0, tmp);
}
@@ -116,7 +116,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx,
if (val->data[0] != '\0') {
/* The data is a plain QWORD */
uint64_t tmp = strtoull((char *)val->data, NULL, 0);
- data->data = talloc_size(mem_ctx, sizeof(uint64_t) + 1);
+ data->data = talloc_size(mem_ctx, sizeof(uint64_t));
if (data->data != NULL) {
SBVAL(data->data, 0, tmp);
}