Merge pull request #43 from s3fs-fuse/fixbug#41

Fixed a bug issue #41
This commit is contained in:
Takeshi Nakatani 2014-06-29 02:26:10 +09:00
commit 08929696f7

View File

@ -35,7 +35,7 @@ char* s3fs_base64(unsigned char* input, size_t length)
static const char* base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
char* result;
if(!input || '\0' == input[0] || 0 >= length){
if(!input || 0 >= length){
return NULL;
}
if(NULL == (result = (char*)malloc((((length / 3) + 1) * 4 + 1) * sizeof(char)))){