diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-08-21 19:24:58 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-08-21 19:24:58 +1000 |
commit | 4ad97a1d0593b3401a352407009a99ead23f21f2 (patch) | |
tree | 31e546187b08304190e6e2ad579672caccaf02c1 /source4/dsdb/samdb/ldb_modules/normalise.c | |
parent | 38f740529803054a3145ad547b3d7de8a25e983a (diff) | |
download | samba-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/normalise.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/normalise.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/normalise.c b/source4/dsdb/samdb/ldb_modules/normalise.c index 8de9e33002..3306fd3c33 100644 --- a/source4/dsdb/samdb/ldb_modules/normalise.c +++ b/source4/dsdb/samdb/ldb_modules/normalise.c @@ -112,7 +112,7 @@ static int normalise_search_callback(struct ldb_context *ldb, void *context, str } for (j = 0; j < ares->message->elements[i].num_values; j++) { const char *dn_str; - struct ldb_dn *dn = ldb_dn_new(mem_ctx, ldb, (const char *)ares->message->elements[i].values[j].data); + struct ldb_dn *dn = ldb_dn_from_ldb_val(mem_ctx, ldb, &ares->message->elements[i].values[j]); if (!dn) { talloc_free(mem_ctx); return LDB_ERR_OPERATIONS_ERROR; |