diff options
author | Volker Lendecke <vl@sernet.de> | 2007-10-28 19:15:08 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-11-09 15:12:30 +0100 |
commit | 5f205ab48d8ac3b7af573ea0be1ce095ab835448 (patch) | |
tree | 5319365d363f5a429e6d79f21b209840b6926e3b /source/lib/util_str.c | |
parent | 814bed029efa391e664ac432d0d68dfeab26381f (diff) | |
download | samba-5f205ab48d8ac3b7af573ea0be1ce095ab835448.tar.gz samba-5f205ab48d8ac3b7af573ea0be1ce095ab835448.tar.xz samba-5f205ab48d8ac3b7af573ea0be1ce095ab835448.zip |
Make base64_encode_data_blob return a talloced string
Diffstat (limited to 'source/lib/util_str.c')
-rw-r--r-- | source/lib/util_str.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 6458ae3e05d..f1078c6383a 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -2528,7 +2528,8 @@ char *base64_encode_data_blob(DATA_BLOB data) out_cnt = 0; len = data.length; output_len = data.length * 2; - result = (char *)SMB_MALLOC(output_len); /* get us plenty of space */ + result = TALLOC_ARRAY(talloc_tos(), char, output_len); /* get us plenty of space */ + SMB_ASSERT(result != NULL); while (len-- && out_cnt < (data.length * 2) - 5) { int c = (unsigned char) *(data.data++); |