]> git.ipfire.org Git - thirdparty/curl.git/commit
mbedtls: fix potential use of uninitialized `nread`
authorDaniel Stenberg <daniel@haxx.se>
Fri, 7 Nov 2025 09:39:26 +0000 (10:39 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Nov 2025 10:09:51 +0000 (11:09 +0100)
commita6eaa67c5582155e5d5149b0ff33d11b166ee41a
treebaf2809538860e2cc68e4a2c57fd5808a6d26dfa
parent684af00181145e08e6cb287d09ecdf29ee7450ab
mbedtls: fix potential use of uninitialized `nread`

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
lib/vtls/mbedtls.c