From: Daniel Stenberg Date: Tue, 25 Nov 2025 07:53:59 +0000 (+0100) Subject: sendf: fix uninitialized variable in trace output X-Git-Tag: rc-8_18_0-1~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=729f36e90fa8927ce85c4f1f7b67724988c35f00;p=thirdparty%2Fcurl.git sendf: fix uninitialized variable in trace output Initialize *nread early on. Pointed out by CodeSonar Closes #19684 --- diff --git a/lib/sendf.c b/lib/sendf.c index f70abb5797..4eabc14402 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -1195,6 +1195,7 @@ CURLcode Curl_client_read(struct Curl_easy *data, char *buf, size_t blen, DEBUGASSERT(blen); DEBUGASSERT(nread); DEBUGASSERT(eos); + *nread = 0; if(!data->req.reader_stack) { result = Curl_creader_set_fread(data, data->state.infilesize);