From: Andrew Bartlett Date: Thu, 21 Aug 2008 02:51:06 +0000 (+1000) Subject: Don't allow a NULL syntax X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=505a0c2b702b696b91dab683626bb25b14a49c38;p=samba.git Don't allow a NULL syntax --- diff --git a/source/lib/ldb/common/ldb_attributes.c b/source/lib/ldb/common/ldb_attributes.c index 3b9d01682cc..747f2417811 100644 --- a/source/lib/ldb/common/ldb_attributes.c +++ b/source/lib/ldb/common/ldb_attributes.c @@ -51,6 +51,10 @@ int ldb_schema_attribute_add_with_syntax(struct ldb_context *ldb, int i, n; struct ldb_schema_attribute *a; + if (!syntax) { + return LDB_ERR_OPERATIONS_ERROR; + } + n = ldb->schema.num_attributes + 1; a = talloc_realloc(ldb, ldb->schema.attributes,