explicitly truncate path

This commit is contained in:
Dave Murphy 2018-05-10 00:08:34 +01:00 committed by mtheall
parent 4f98119edb
commit 10b46172fe

View File

@ -3016,7 +3016,7 @@ FTP_DECLARE(CWD)
/* copy the path into the cwd */
strncpy(session->cwd, session->buffer, sizeof(session->cwd));
session->cwd[sizeof(session->cwd)-1] = '\0';
ftp_send_response(session, 200, "OK\r\n");
}