diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-10-27 13:32:23 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-11-04 16:06:56 +1100 |
commit | 9381a78c391bcccd5eddc159a5d3a3e12d19fde3 (patch) | |
tree | 81d9b89532c4e6019e3417b864f68b127fbb71ac /source4/lib/ldb/common/ldb_match.c | |
parent | adf016e11946a354a140b1c0ed7789160e3af2aa (diff) | |
download | samba-9381a78c391bcccd5eddc159a5d3a3e12d19fde3.tar.gz samba-9381a78c391bcccd5eddc159a5d3a3e12d19fde3.tar.bz2 samba-9381a78c391bcccd5eddc159a5d3a3e12d19fde3.zip |
Use ldb_dn_from_ldb_val to avoid possible over-run of the value.
The ldb_val is length-limited, and while normally NULL terminated,
this avoids the chance that this particular value might not be, as
well as avoiding a cast.
Andrew Bartlett
Diffstat (limited to 'source4/lib/ldb/common/ldb_match.c')
-rw-r--r-- | source4/lib/ldb/common/ldb_match.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_match.c b/source4/lib/ldb/common/ldb_match.c index 64d0e54761..4cde739d67 100644 --- a/source4/lib/ldb/common/ldb_match.c +++ b/source4/lib/ldb/common/ldb_match.c @@ -147,7 +147,7 @@ static int ldb_match_equality(struct ldb_context *ldb, int ret; if (ldb_attr_dn(tree->u.equality.attr) == 0) { - valuedn = ldb_dn_new(ldb, ldb, (char *)tree->u.equality.value.data); + valuedn = ldb_dn_from_ldb_val(ldb, ldb, &tree->u.equality.value); if (valuedn == NULL) { return 0; } |