mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-27 20:05:46 +00:00
Fix possible buffer overflow
This commit is contained in:
Executable → Regular
+1
-1
@@ -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