summaryrefslogtreecommitdiffstats
path: root/source/lib/ldb/common/ldb_msg.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-30 00:43:26 +0000
committerJelmer Vernooij <jelmer@samba.org>2005-08-30 00:43:26 +0000
commit814ea5b90d445b2d59f17f85a53f33ceb39a50ea (patch)
tree05aeb2ad6c740a3c7426889e02170ca029fbda09 /source/lib/ldb/common/ldb_msg.c
parent409cc1555e44c119124b5fd66893b0f7029cd37b (diff)
downloadsamba-814ea5b90d445b2d59f17f85a53f33ceb39a50ea.tar.gz
samba-814ea5b90d445b2d59f17f85a53f33ceb39a50ea.tar.xz
samba-814ea5b90d445b2d59f17f85a53f33ceb39a50ea.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?
Diffstat (limited to 'source/lib/ldb/common/ldb_msg.c')
-rw-r--r--source/lib/ldb/common/ldb_msg.c2
1 files changed, 1 insertions, 1 deletions
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;
}