mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 02:10:36 +03:00
Fix assorted memory and static analysis errors
This commit is contained in:
committed by
Felipe Zimmerle
parent
8d0583eda4
commit
e95efa05cc
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user