diff options
author | Fox Caminiti <fox@foxcam.net> | 2022-11-18 23:40:08 -0500 |
---|---|---|
committer | Fox Caminiti <fox@foxcam.net> | 2022-11-18 23:40:08 -0500 |
commit | 990bd319c696c2b65fa858b40fd75279fec2a13b (patch) | |
tree | 0ba0e29e2a1af31e7257d3cc48198f244415d120 /lib | |
parent | bb4d634962cdf97affd041a81b12c3d2c8d46bf7 (diff) |
txt2img functional
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base64.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/base64.c b/lib/base64.c index 1e7e192..b6a8e5d 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -1,3 +1,5 @@ +// Slightly moulded by Fox to better suit his (poor?) tastes. + /* The compilation of software known as FreeBSD is distributed under the following terms: @@ -122,7 +124,7 @@ void base64_encode(const unsigned char *src, size_t len, * Caller is responsible for freeing the returned buffer. */ unsigned char * base64_decode(const unsigned char *src, size_t len, - size_t *out_len) + unsigned char *out_buffer, size_t *out_len) { unsigned char dtable[256], *out, *pos, block[4], tmp; size_t i, count, olen; @@ -148,11 +150,8 @@ unsigned char * base64_decode(const unsigned char *src, size_t len, return NULL; olen = count / 4 * 3; - // pos = out = os_malloc(olen); - pos = out = NULL; - Assert(0); - if (out == NULL) - return NULL; + pos = out = out_buffer; + Assert(out != NULL) count = 0; for (i = 0; i < len; i++) { |