summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-13 15:39:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:40:34 -0500
commitc186fb94637f2cd502327c38d95c6d7a2b2dbd11 (patch)
treebcb853235ae13a6e9b870f9a0a3bd217f38df93e /source4
parent43063d5b14d4142ce1088a255107677462622fcb (diff)
downloadsamba-c186fb94637f2cd502327c38d95c6d7a2b2dbd11.tar.gz
samba-c186fb94637f2cd502327c38d95c6d7a2b2dbd11.tar.bz2
samba-c186fb94637f2cd502327c38d95c6d7a2b2dbd11.zip
r20734: always terminate the string... so that an empty data_blob
gets '\0' as "" string metze (This used to be commit 4f5daa830a3c02a05ba1bc7f32eedbe1d52640a1)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/util/data_blob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source4/lib/util/data_blob.c b/source4/lib/util/data_blob.c
index 7230aa9d99..e04bd65331 100644
--- a/source4/lib/util/data_blob.c
+++ b/source4/lib/util/data_blob.c
@@ -163,6 +163,7 @@ _PUBLIC_ char *data_blob_hex_string(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob)
for (i = 0; i < blob->length; i++)
slprintf(&hex_string[i*2], 3, "%02X", blob->data[i]);
+ hex_string[(blob->length*2)] = '\0';
return hex_string;
}