← Commit list

d57e7cf20d

Daniel Stenberg
Daniel Stenberg
2025-09-21
FAILED Duration: 382s

Subject

ws: reject curl_ws_recv called with NULL buffer with a buflen

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/ws.c+1 -1
@@ -1502,7 +1502,7 @@ CURLcode curl_ws_recv(CURL *d, void *buffer,
*nread = 0;
*metap = NULL;
- if(!GOOD_EASY_HANDLE(data))
+ if(!GOOD_EASY_HANDLE(data) || (buflen && !buffer))
return CURLE_BAD_FUNCTION_ARGUMENT;
conn = data->conn;