From fb7993df539f7feefec34db9a3d54e18dc46cb96 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 16 Sep 2025 11:32:25 +0200 Subject: [PATCH] fixup return error better --- lib/ftp.c | 2 ++ lib/krb5.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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;