Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7bdc3c8

Browse files
authored
Merge pull request #3220 from eduar-hte/string-null
Creating a std::string with a null pointer is undefined behaviour
2 parents 3a83196 + 30a68de commit 7bdc3c8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎headers/modsecurity/rules_set_properties.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ class RulesSetProperties {
333333
case FalseConfigBoolean:
334334
return "False";
335335
case PropertyNotSetConfigBoolean:
336+
default:
336337
return "Not set";
337338
}
338-
return NULL;
339339
}
340340

341341

‎src/actions/transformations/url_encode.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ std::string UrlEncode::url_enc(const char *input,
4848
len = input_len * 3 + 1;
4949
d = rval = reinterpret_cast<char *>(malloc(len));
5050
if (rval == NULL) {
51-
return NULL;
51+
return {};
5252
}
5353

5454
/* ENH Only encode the characters that really need to be encoded. */

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /