Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
1c010000
Commit
1c010000
authored
Feb 28, 2022
by
Eric Duminil
Browse files
Off-by-one error in string validation
parent
95964301
Pipeline
#5962
passed with stage
in 2 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/src/lib/IotWebConf/src/IotWebConfTParameter.h
View file @
1c010000
...
...
@@ -419,7 +419,7 @@ protected:
if
(
length
>
0
)
{
char
parLength
[
11
];
snprintf
(
parLength
,
11
,
"%d"
,
length
);
snprintf
(
parLength
,
11
,
"%d"
,
length
-
1
);
// To allow "\0" at the end of the string.
String
maxLength
=
String
(
"maxlength="
)
+
parLength
;
pitem
.
replace
(
"{l}"
,
maxLength
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment