← Commit list

4c636b2dc1

Daniel Stenberg
Daniel Stenberg
2025-10-19
SUCCESS Duration: 243s

Subject

tool_operate: return error on strdup() failure

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 →

src/tool_operate.c+4 -0
@@ -2072,6 +2072,10 @@ static CURLcode cacertpaths(struct OperationConfig *config)
if(cafile) {
curlx_fclose(cafile);
config->cacert = strdup(cacert);
+ if(!config->cacert) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto fail;
+ }
}
#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
!defined(CURL_DISABLE_CA_SEARCH)