Bug in MQX 4.1.1. ftpsrv_size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug in MQX 4.1.1. ftpsrv_size

781 Views
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.

Labels (1)
0 Kudos
Reply
1 Reply

679 Views
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 Kudos
Reply