summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/schema_syntax.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-08-21 19:24:58 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-08-21 19:24:58 +1000
commit4ad97a1d0593b3401a352407009a99ead23f21f2 (patch)
tree31e546187b08304190e6e2ad579672caccaf02c1 /source4/dsdb/samdb/ldb_modules/schema_syntax.c
parent38f740529803054a3145ad547b3d7de8a25e983a (diff)
downloadsamba-4ad97a1d0593b3401a352407009a99ead23f21f2.tar.gz
samba-4ad97a1d0593b3401a352407009a99ead23f21f2.tar.bz2
samba-4ad97a1d0593b3401a352407009a99ead23f21f2.zip
Don't walk past the end of ldb values.
This is a partial fix towards bugs due to us walking past the end of what we think are strings in ldb. There is much more work to do in this area. Andrew Bartlett (This used to be commit 5805a9a8f35fd90fa4f718f73534817fa3bbdfd2)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/schema_syntax.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/schema_syntax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/schema_syntax.c b/source4/dsdb/samdb/ldb_modules/schema_syntax.c
index d800e4b6d2..ab9f32c913 100644
--- a/source4/dsdb/samdb/ldb_modules/schema_syntax.c
+++ b/source4/dsdb/samdb/ldb_modules/schema_syntax.c
@@ -248,7 +248,7 @@ static int schema_validate_dn(struct ldb_context *ldb, struct ldb_val *val, int
struct ldb_dn *dn;
int ret = LDB_SUCCESS;
- dn = ldb_dn_new(ldb, ldb, (const char *)val->data);
+ dn = ldb_dn_from_ldb_val(ldb, ldb, val);
if ( ! ldb_dn_validate(dn)) {
ret = LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
}