r2713: better handling of binary values in index key creation
authorAndrew Tridgell <tridge@samba.org>
Tue, 28 Sep 2004 09:34:49 +0000 (09:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:25 +0000 (12:59 -0500)
(This used to be commit b0c92616fb69d8139f66dc8144cfcc88ea6825dc)

source4/lib/ldb/ldb_tdb/ldb_index.c

index e23ae1e7dd020be7daad6f62a939ecd9c940f066..cfd097e36170765fb98b09e94fab3e354de28bcb 100644 (file)
@@ -70,7 +70,7 @@ static char *ldb_dn_key(struct ldb_context *ldb,
                return ret;
        }
 
-       ldb_asprintf(ldb, &ret, "%s:%s:%s", LTDB_INDEX, attr, (char *)value->data);
+       ldb_asprintf(ldb, &ret, "%s:%s:%.*s", LTDB_INDEX, attr, value->length, (char *)value->data);
        return ret;
 }