NUL terminate decoded base64 string
For consistency with encoded strings.
This commit is contained in:
@ -362,6 +362,7 @@ unsigned char* s3fs_decode64(const char* input, size_t* plength)
|
||||
}
|
||||
result[wpos++] = ((parts[2] << 6) & 0xc0) | (parts[3] & 0x3f);
|
||||
}
|
||||
result[wpos] = '\0';
|
||||
*plength = wpos;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user