diff --git a/lib/ftp.c b/lib/ftp.c index 070c4bfc8f..7b3c7d72d6 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -599,6 +599,8 @@ static CURLcode ftp_readresp(struct Curl_easy *data, /* normal ftp stuff we pass through! */ break; } + if(code < 0) + return CURLE_RECV_ERROR; } #endif diff --git a/lib/krb5.c b/lib/krb5.c index b3105f6757..91e9f7100a 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -720,7 +720,7 @@ int Curl_sec_read_msg(struct Curl_easy *data, struct connectdata *conn, int */ int decoded_len; char *buf; - int ret_code = 0; + int ret_code = -1; size_t decoded_sz = 0; CURLcode error;