From c0293aa7159c8b5c9f1a1b13f64af08e5a55ad6a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 30 Aug 2005 00:43:26 +0000 Subject: 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) --- source4/lib/ldb/common/ldb_attributes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/ldb/common/ldb_attributes.c') diff --git a/source4/lib/ldb/common/ldb_attributes.c b/source4/lib/ldb/common/ldb_attributes.c index a915666d78..3973fc515c 100644 --- a/source4/lib/ldb/common/ldb_attributes.c +++ b/source4/lib/ldb/common/ldb_attributes.c @@ -66,7 +66,7 @@ static int ldb_default_copy(struct ldb_context *ldb, { *out = ldb_val_dup(mem_ctx, in); - if (out->length == 0) { + if (out->data == NULL && in->data != NULL) { return -1; } -- cgit