summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2005-09-18 10:46:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:15 -0500
commitbb8f5c93ee3369e112d99d4d3497dc803abdbf76 (patch)
tree7c1fbc7e73e48b661d1185dfda97782622e66a71 /source4/lib/ldb/common
parenteebe0c269e241404b69e385fbc135018acb5cb5e (diff)
downloadsamba-bb8f5c93ee3369e112d99d4d3497dc803abdbf76.tar.gz
samba-bb8f5c93ee3369e112d99d4d3497dc803abdbf76.tar.bz2
samba-bb8f5c93ee3369e112d99d4d3497dc803abdbf76.zip
r10303: check no attribute is given empty
(This used to be commit f0ad9495e45ee0d41ef8ca182984599c8e11cabb)
Diffstat (limited to 'source4/lib/ldb/common')
-rw-r--r--source4/lib/ldb/common/ldb_ldif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c
index a5768b9796..b268cca578 100644
--- a/source4/lib/ldb/common/ldb_ldif.c
+++ b/source4/lib/ldb/common/ldb_ldif.c
@@ -658,6 +658,11 @@ struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
if (ret != 0) {
goto failed;
}
+ if (value.length == 0) {
+ ldb_debug(ldb, LDB_DEBUG_ERROR,
+ "Error: Attribute value cannot be empty for attribute '%s'\n", el->name);
+ goto failed;
+ }
if (value.data != el->values[el->num_values].data) {
talloc_steal(el->values, el->values[el->num_values].data);
}