mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-30 13:26:13 -04:00
Fix possible buffer overflow
This commit is contained in:
2
lib/lib_div/ESPFtpServer/ESPFtpServer.cpp
Executable file → Normal file
2
lib/lib_div/ESPFtpServer/ESPFtpServer.cpp
Executable file → Normal file
@@ -264,7 +264,7 @@ boolean FtpServer::processCommand () {
|
||||
else if (!strcmp (command, "CWD")) {
|
||||
char path[FTP_CWD_SIZE];
|
||||
if (haveParameter () && makeExistsPath (path)) {
|
||||
strcpy (cwdName, path);
|
||||
strlcpy (cwdName, path, sizeof(cwdName));
|
||||
client.println (F("250 Ok. Current directory is ") + String (cwdName));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user