summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/common/attrib_handlers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c
index da2d945419..412146360c 100644
--- a/source4/lib/ldb/common/attrib_handlers.c
+++ b/source4/lib/ldb/common/attrib_handlers.c
@@ -38,7 +38,7 @@ int ldb_handler_copy(struct ldb_context *ldb, void *mem_ctx,
const struct ldb_val *in, struct ldb_val *out)
{
*out = ldb_val_dup(mem_ctx, in);
- if (out->data == NULL) {
+ if (in->length > 0 && out->data == NULL) {
ldb_oom(ldb);
return -1;
}