← Commit list

1c0822e8cb

Robert W. Van Kirk
Robert W. Van Kirk
2025-12-06
SUCCESS Duration: 228s

Subject

formdata: validate callback is non-NULL before use

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/formdata.c+4 -0
@@ -636,6 +636,10 @@ int curl_formget(struct curl_httppost *form, void *arg,
CURLcode result;
curl_mimepart toppart;
+ /* Validate callback is provided */
+ if(!append)
+ return (int)CURLE_BAD_FUNCTION_ARGUMENT;
+
Curl_mime_initpart(&toppart); /* default form is empty */
result = Curl_getformdata(NULL, &toppart, form, NULL);
if(!result)