Bug in MQX 4.1.1. ftpsrv_size

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Bug in MQX 4.1.1. ftpsrv_size

783 次查看
CorderBollie
Contributor II

Hello. I found a bug in function ftpsrv_size (MQX 4.1.1) around line 443..449

   fp = fopen(full_path,"r");

    _mem_free(full_path);

    if (fp == NULL)

    {

        ftpsrv_send_msg(session, ftpsrvmsg_no_file);

        return(FTPSRV_ERROR);

    }

should be

   fp = fopen(full_path,"r");

    _mem_free(full_path);

    if (fp == NULL)

    {

        session->message = (char*) ftpsrvmsg_no_file;

        return(FTPSRV_ERROR);

    }

Without that change the ftp server sends a wrong response to the client if the file does not exist.

标签 (1)
0 项奖励
回复
1 回复

681 次查看
karelm_
Contributor IV

Hi,

thank you for your report. I will fix this bug on our development branch so it is propagated into next MQX release.

Best regards,

Karel

0 项奖励
回复