git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7f681a
)
r20734: always terminate the string... so that an empty data_blob
author
Stefan Metzmacher
<metze@samba.org>
Sat, 13 Jan 2007 15:39:49 +0000
(15:39 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:40:34 +0000
(14:40 -0500)
gets '\0' as "" string
metze
source/lib/util/data_blob.c
patch
|
blob
|
history
diff --git
a/source/lib/util/data_blob.c
b/source/lib/util/data_blob.c
index 7230aa9d99d4c9daab2cac99b3559bd3d6259672..e04bd653318684a55e10763fe9016242abc0bcaa 100644
(file)
--- a/
source/lib/util/data_blob.c
+++ b/
source/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;
}