From 814ea5b90d445b2d59f17f85a53f33ceb39a50ea 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? --- source/lib/ldb/common/ldb_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/lib/ldb/common/ldb_msg.c') diff --git a/source/lib/ldb/common/ldb_msg.c b/source/lib/ldb/common/ldb_msg.c index 197c42ddb5b..f65c944eab9 100644 --- a/source/lib/ldb/common/ldb_msg.c +++ b/source/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; } -- cgit