From fe226af174b3a0c4303a9e1cdc07a5bacfa0a68a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 19 Apr 2024 09:42:25 +0200 Subject: [PATCH] Curl_creader_read: init two variables to avoid using them uninited Spotted by CodeSonar Closes #13419 --- lib/sendf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sendf.c b/lib/sendf.c index 7b00c4ce48..0fc8252523 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -520,6 +520,8 @@ CURLcode Curl_creader_read(struct Curl_easy *data, struct Curl_creader *reader, char *buf, size_t blen, size_t *nread, bool *eos) { + *nread = 0; + *eos = FALSE; if(!reader) return CURLE_READ_ERROR; return reader->crt->do_read(data, reader, buf, blen, nread, eos);