Fix assorted memory and static analysis errors

This commit is contained in:
Felipe Zimmerle
2017-01-31 17:15:31 -03:00
committed by Felipe Zimmerle
parent 8d0583eda4
commit e95efa05cc
62 changed files with 209 additions and 189 deletions

View File

@@ -29,7 +29,7 @@ namespace Utils {
std::string Base64::encode(const std::string& data) {
size_t encoded_len = 0;
unsigned char *d = NULL;
unsigned char *d;
std::string ret;
mbedtls_base64_encode(NULL, 0, &encoded_len,
@@ -64,7 +64,7 @@ std::string Base64::decode(const std::string& data, bool forgiven) {
std::string Base64::decode(const std::string& data) {
size_t decoded_len = 0;
unsigned char *d = NULL;
unsigned char *d;
std::string ret;
size_t len = strlen(data.c_str());
@@ -90,7 +90,7 @@ std::string Base64::decode(const std::string& data) {
std::string Base64::decode_forgiven(const std::string& data) {
size_t decoded_len = 0;
unsigned char *d = NULL;
unsigned char *d;
std::string ret;
decode_forgiven_engine(NULL, 0, &decoded_len,