mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Merge pull request #3220 from eduar-hte/string-null
Creating a std::string with a null pointer is undefined behaviour
This commit is contained in:
commit
7bdc3c825c
@ -333,9 +333,9 @@ class RulesSetProperties {
|
||||
case FalseConfigBoolean:
|
||||
return "False";
|
||||
case PropertyNotSetConfigBoolean:
|
||||
default:
|
||||
return "Not set";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ std::string UrlEncode::url_enc(const char *input,
|
||||
len = input_len * 3 + 1;
|
||||
d = rval = reinterpret_cast<char *>(malloc(len));
|
||||
if (rval == NULL) {
|
||||
return NULL;
|
||||
return {};
|
||||
}
|
||||
|
||||
/* ENH Only encode the characters that really need to be encoded. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user