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
05c7f9b3
Commit
05c7f9b3
authored
Feb 18, 2022
by
Eric Duminil
Browse files
Safer alternative to strncpy
parent
b3843a73
Pipeline
#5875
passed with stage
in 2 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ampel-firmware/web_config.cpp
View file @
05c7f9b3
...
...
@@ -231,14 +231,14 @@ namespace web_config {
sensor_console
::
defineStringCommand
(
"ssid"
,
[](
char
*
ssid
)
{
Serial
.
print
(
F
(
"Setting WiFi ssid to "
));
Serial
.
println
(
ssid
);
str
n
cpy
(
iotWebConf
->
getWifiSsidParameter
()
->
valueBuffer
,
ssid
,
iotWebConf
->
getWifiSsidParameter
()
->
getLength
());
str
l
cpy
(
iotWebConf
->
getWifiSsidParameter
()
->
valueBuffer
,
ssid
,
iotWebConf
->
getWifiSsidParameter
()
->
getLength
());
iotWebConf
->
saveConfig
();
},
F
(
"name (Sets SSID to name)"
));
sensor_console
::
defineStringCommand
(
"pwd"
,
[](
char
*
ssid
)
{
Serial
.
print
(
F
(
"Setting WiFi password to "
));
Serial
.
println
(
ssid
);
str
n
cpy
(
iotWebConf
->
getWifiPasswordParameter
()
->
valueBuffer
,
ssid
,
iotWebConf
->
getWifiPasswordParameter
()
->
getLength
());
str
l
cpy
(
iotWebConf
->
getWifiPasswordParameter
()
->
valueBuffer
,
ssid
,
iotWebConf
->
getWifiPasswordParameter
()
->
getLength
());
iotWebConf
->
saveConfig
();
},
F
(
"abc (Sets WiFi password to abc)"
));
...
...
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