cURL / Mailing Lists / curl-library / Single Mail

curl-library

ftp.c doesn't save result of ftp_state_user call

From: David McCreedy <mccreedytpf_at_msn.com>
Date: Mon, 13 Mar 2006 23:07:45 +0000

I've found that lib/ftp.c doesn't save the ftp_state_user call's return code
before checking it, causing errors to be ignored:

      if(data->set.ftp_ssl && !conn->ssl[FIRSTSOCKET].use) {
         ...
      }
      else {
        ftp_state_user(conn);
        if(result)
          return result;
      }

I think the call needs to be changed:

        result = ftp_state_user(conn);

-David McCreedy
Received on 2006-03-14