← Commit list

bd58857201

Viktor Szakats
Viktor Szakats
2026-07-20
SUCCESS Duration: 321s

Subject

vtls_scache: allocate absolute filename on heap (Windows)

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/vtls/vtls_scache.c+7 -3
@@ -76,9 +76,13 @@ static CURLcode cf_ssl_peer_key_add_path(struct dynbuf *buf,
* when used in another process with different CWD. When a path does not
* exist, this does not work. Then, we add the path as is. */
#ifdef _WIN32
- char abspath[_MAX_PATH];
- if(_fullpath(abspath, path, _MAX_PATH))
- return curlx_dyn_addf(buf, ":%s-%s", name, abspath);
+ char *abspath = _fullpath(NULL, path, 0);
+ if(abspath) {
+ CURLcode result = curlx_dyn_addf(buf, ":%s-%s", name, abspath);
+ /* !checksrc! disable BANNEDFUNC 1 */
+ free(abspath); /* allocated by CRT, use system free() */
+ return result;
+ }
*is_local = TRUE;
#elif defined(HAVE_REALPATH)
if(path[0] != '/') {