← Commit list

f1828b5404

Daniel Stenberg
Daniel Stenberg
2025-10-13
SUCCESS Duration: 159s

Subject

libssh2: avoid risking using an uninitialized local struct field

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vssh/libssh2.c+1 -0
@@ -1428,6 +1428,7 @@ sftp_download_stat(struct Curl_easy *data,
data->req.size = -1;
data->req.maxdownload = -1;
Curl_pgrsSetDownloadSize(data, -1);
+ attrs.filesize = 0; /* might be uninitialized but will be read below */
}
else {
curl_off_t size = attrs.filesize;