← Commit list

0d9a07abb7

Viktor Szakats
Viktor Szakats
2025-09-19
FAILED Duration: 155s

Subject

libssh2: drop two redundant null-terminations

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+0 -5
@@ -1995,8 +1995,6 @@ static CURLcode ssh_state_sftp_realpath(struct Curl_easy *data,
return CURLE_AGAIN;
if(rc > 0) {
- /* It seems that this string is not always null-terminated */
- sshp->readdir_filename[rc] = '\0';
free(sshc->homedir);
sshc->homedir = strdup(sshp->readdir_filename);
if(!sshc->homedir) {
@@ -2408,9 +2406,6 @@ static CURLcode ssh_state_sftp_readdir_link(struct Curl_easy *data,
if(rc < 0)
return CURLE_OUT_OF_MEMORY;
- /* It seems that this string is not always null-terminated */
- sshp->readdir_filename[rc] = '\0';
-
/* append filename and extra output */
result = curlx_dyn_addf(&sshp->readdir, " -> %s", sshp->readdir_filename);
if(result)