Skip to content

Commit

Permalink
Update ftpserv.c
Browse files Browse the repository at this point in the history
  • Loading branch information
UldisRinkevichs authored Jan 4, 2022
1 parent 8454b54 commit c9e473d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/ftpserv.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,8 @@ int ftpCWD(PFTPCONTEXT context, const char *params)
if ( S_ISDIR(filestats.st_mode) )
{
ftp_effective_path("/", context->CurrentDir, params, sizeof(context->FileName), context->FileName);
strcpy(context->CurrentDir, context->FileName);
memset(context->CurrentDir, 0, sizeof(context->CurrentDir));
strncpy(context->CurrentDir, context->FileName, sizeof(context->CurrentDir)-1);
writelogentry(context, " CWD: ", context->CurrentDir);
return sendstring(context, success250);
}
Expand Down

0 comments on commit c9e473d

Please sign in to comment.