summaryrefslogtreecommitdiff
path: root/lib/util/base64.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2016-05-03 15:56:37 +0200
committerJeremy Allison <jra@samba.org>2016-05-04 01:28:23 +0200
commit9ec33323499cae77dba1ea3ff659d3cf59e9e2d4 (patch)
treeb3a96a4c96118fbb14a733ccf1eadd79a621aa26 /lib/util/base64.c
parentcf5a81013d2dbc62cacaa0141c9ee6b53e13cb39 (diff)
downloadsamba-9ec33323499cae77dba1ea3ff659d3cf59e9e2d4.tar.gz
lib: Remove SMB_ASSERT from base64_encode_data_blob
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/util/base64.c')
-rw-r--r--lib/util/base64.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util/base64.c b/lib/util/base64.c
index a4ce6fa324d..e01fb6d35e2 100644
--- a/lib/util/base64.c
+++ b/lib/util/base64.c
@@ -114,7 +114,9 @@ _PUBLIC_ char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data)
* random but should be enough for
* the = and \0 */
result = talloc_array(mem_ctx, char, output_len); /* get us plenty of space */
- SMB_ASSERT(result != NULL);
+ if (result == NULL) {
+ return NULL;
+ }
while (len--) {
int c = (unsigned char) *(data.data++);