From 62b97b01561e332d3b566c4f70cc2601e2d7fcac Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 28 Oct 2007 19:15:08 +0100 Subject: Make base64_encode_data_blob return a talloced string (This used to be commit 5f205ab48d8ac3b7af573ea0be1ce095ab835448) --- source3/lib/util_str.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/lib/util_str.c') diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 6458ae3e05..f1078c6383 100644 --- a/source3/lib/util_str.c +++ b/source3/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++); -- cgit