summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_msg.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-30 00:43:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:59 -0500
commitc0293aa7159c8b5c9f1a1b13f64af08e5a55ad6a (patch)
treee0169e5c93e4d7aaca99124b95dfb02ff250b207 /source4/lib/ldb/common/ldb_msg.c
parent7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22 (diff)
downloadsamba-c0293aa7159c8b5c9f1a1b13f64af08e5a55ad6a.tar.gz
samba-c0293aa7159c8b5c9f1a1b13f64af08e5a55ad6a.tar.bz2
samba-c0293aa7159c8b5c9f1a1b13f64af08e5a55ad6a.zip
r9771: - Prevent ldb crash when a invalid DN is added
- Don't silently drop records with empty attributes tridge/simo: Could you please verify this patch is correct? (This used to be commit 505c9b1d3d39475da141d3b3c156a7e5ba06790c)
Diffstat (limited to 'source4/lib/ldb/common/ldb_msg.c')
-rw-r--r--source4/lib/ldb/common/ldb_msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index 197c42ddb5..f65c944eab 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -99,7 +99,7 @@ struct ldb_val ldb_val_dup(void *mem_ctx, const struct ldb_val *v)
{
struct ldb_val v2;
v2.length = v->length;
- if (v->length == 0) {
+ if (v->data == NULL) {
v2.data = NULL;
return v2;
}