When Curl_conn_cf_recv() returns error, the variable might not be
assigned and the tracing output may (harmlessly) use it uninitialized.
Also add a comment about the typecast from size_t to int being fine.
Pointed out by ZeroPath
Closes #19393
{
struct Curl_cfilter *cf = bio;
struct Curl_easy *data = CF_DATA_CURRENT(cf);
- size_t nread;
+ size_t nread = 0;
CURLcode result;
DEBUGASSERT(data);
blen, result, nread);
if(CURLE_AGAIN == result)
return MBEDTLS_ERR_SSL_WANT_READ;
+ /* nread is never larger than int here */
return result ? -1 : (int)nread;
}