mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-12-23 09:18:55 +00:00
commit
08929696f7
@ -35,7 +35,7 @@ char* s3fs_base64(unsigned char* input, size_t length)
|
|||||||
static const char* base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
static const char* base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
||||||
char* result;
|
char* result;
|
||||||
|
|
||||||
if(!input || '\0' == input[0] || 0 >= length){
|
if(!input || 0 >= length){
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if(NULL == (result = (char*)malloc((((length / 3) + 1) * 4 + 1) * sizeof(char)))){
|
if(NULL == (result = (char*)malloc((((length / 3) + 1) * 4 + 1) * sizeof(char)))){
|
||||||
|
Loading…
Reference in New Issue
Block a user