mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-27 20:05:46 +00:00
Ethernet strcat safety (#24808)
This commit is contained in:
@@ -258,7 +258,7 @@ void EthernetInit(void) {
|
||||
eth_config_change = 0;
|
||||
|
||||
strlcpy(eth_hostname, TasmotaGlobal.hostname, sizeof(eth_hostname) -5); // Make sure there is room for "-eth"
|
||||
strcat(eth_hostname, "-eth");
|
||||
strlcat(eth_hostname, "-eth", sizeof(eth_hostname)); // use strlcat for defense in depth
|
||||
|
||||
WiFi.onEvent(EthernetEvent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user