summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2008-09-15 19:21:38 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:40:41 +0200
commitf10227958bef70df7609aeec5dcc834a601bd945 (patch)
treee03f9e700da9b1c8ac61b6a8f34e63bd3b8818e1 /source4/lib
parentf9d7af8569eb7163ab9fe301d759c0c35e68a9bc (diff)
downloadsamba-f10227958bef70df7609aeec5dcc834a601bd945.tar.gz
samba-f10227958bef70df7609aeec5dcc834a601bd945.tar.bz2
samba-f10227958bef70df7609aeec5dcc834a601bd945.zip
Registry server: Fixes up the patch with "type" != NULL (used in "EnumValue" and "QueryValue")
This prevents the server to segfault if the input data type is NULL.
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/ldb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c
index 95851dace0..8d02b3ce02 100644
--- a/source4/lib/registry/ldb.c
+++ b/source4/lib/registry/ldb.c
@@ -289,7 +289,7 @@ static WERROR ldb_get_subkey_by_id(TALLOC_CTX *mem_ctx,
}
static WERROR ldb_get_default_value(TALLOC_CTX *mem_ctx, struct hive_key *k,
- const char** name, uint32_t *data_type,
+ const char **name, uint32_t *data_type,
DATA_BLOB *data)
{
struct ldb_key_data *kd = talloc_get_type(k, struct ldb_key_data);
@@ -797,11 +797,12 @@ static WERROR ldb_get_key_info(TALLOC_CTX *mem_ctx,
}
if (max_valbufsize != NULL) {
+ uint32_t data_type;
DATA_BLOB data;
reg_ldb_unpack_value(mem_ctx,
lp_iconv_convenience(global_loadparm),
kd->values[i], NULL,
- NULL, &data);
+ &data_type, &data);
*max_valbufsize = MAX(*max_valbufsize, data.length);
talloc_free(data.data);
}