From cc4e5c8beb95e67d91add0334807ada6eea8f9b7 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 21 Mar 2010 14:10:17 +0100 Subject: s4:registry - "LDB backend" - don't test for "0" as string termination on binary and unknown typed values --- source4/lib/registry/ldb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index b21ca8e27b..5f1a06c501 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -302,8 +302,7 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, case REG_BINARY: default: - if ((data.length > 0) && (data.data != NULL) - && (data.data[0] != '\0')) { + if ((data.length > 0) && (data.data != NULL)) { ret = ldb_msg_add_value(msg, "data", &data, NULL); } else { ret = ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); -- cgit