From bb8f5c93ee3369e112d99d4d3497dc803abdbf76 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 18 Sep 2005 10:46:21 +0000 Subject: r10303: check no attribute is given empty (This used to be commit f0ad9495e45ee0d41ef8ca182984599c8e11cabb) --- source4/lib/ldb/common/ldb_ldif.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- cgit