From ee435ea968d900ccb20299eac4eceaf022fd7231 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 22 Jun 2026 15:24:06 +0200 Subject: [PATCH] Fix possible buffer overflow --- lib/lib_div/ESPFtpServer/ESPFtpServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 lib/lib_div/ESPFtpServer/ESPFtpServer.cpp diff --git a/lib/lib_div/ESPFtpServer/ESPFtpServer.cpp b/lib/lib_div/ESPFtpServer/ESPFtpServer.cpp old mode 100755 new mode 100644 index 84e9b3656..360a196e9 --- a/lib/lib_div/ESPFtpServer/ESPFtpServer.cpp +++ b/lib/lib_div/ESPFtpServer/ESPFtpServer.cpp @@ -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)); } }