Don't allow a NULL syntax
authorAndrew Bartlett <abartlet@samba.org>
Thu, 21 Aug 2008 02:51:06 +0000 (12:51 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 21 Aug 2008 02:51:06 +0000 (12:51 +1000)
source/lib/ldb/common/ldb_attributes.c

index 3b9d01682ccc402513a1e5abb1ff97dedd81c77f..747f2417811a9069b1ed4391b70672b6d54f590b 100644 (file)
@@ -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,