← Commit list

d4c0332677

Daniel Stenberg
Daniel Stenberg
2025-10-06
SUCCESS Duration: 406s

Subject

libssh2: clarify that sshp->path is always at least one byte

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/curl_path.c+1 -0
@@ -100,6 +100,7 @@ CURLcode Curl_getworkingpath(struct Curl_easy *data,
}
else
*path = working_path;
+ DEBUGASSERT(*path && (*path)[0]);
return CURLE_OK;
}
lib/vssh/ssh.h+1 -1
@@ -120,7 +120,7 @@ typedef enum {
Everything that is strictly related to a connection is banned from this
struct. */
struct SSHPROTO {
- char *path; /* the path we operate on */
+ char *path; /* the path we operate on, at least one byte long */
#ifdef USE_LIBSSH2
struct dynbuf readdir_link;
struct dynbuf readdir;