From 00934d4c2fd449493ad52127616445673f0de5b5 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 15 Mar 2010 11:51:42 +0100 Subject: s4:registry - fix up the output of hexadecimal values Use a fixed-length representation to avoid platform-specific issues. --- source4/lib/registry/ldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/lib/registry/ldb.c') diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 5c52cb238f..6676193ef4 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -225,7 +225,7 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, if (data.length == sizeof(uint32_t)) { char *conv_str; - conv_str = talloc_asprintf(msg, "0x%x", IVAL(data.data, 0)); + conv_str = talloc_asprintf(msg, "0x%8.8x", IVAL(data.data, 0)); if (conv_str == NULL) { talloc_free(msg); return NULL; @@ -263,7 +263,7 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, if (data.length == sizeof(uint64_t)) { char *conv_str; - conv_str = talloc_asprintf(msg, "0x%llx", BVAL(data.data, 0)); + conv_str = talloc_asprintf(msg, "0x%16.16llx", BVAL(data.data, 0)); if (conv_str == NULL) { talloc_free(msg); return NULL; -- cgit