mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:31:42 +03:00
ws: reject curl_ws_recv called with NULL buffer with a buflen
Arguably this is just a bad application. Reported in Joshua's sarif data Closes #18656
This commit is contained in:
parent
0c53a5e5dc
commit
d57e7cf20d
1 changed files with 1 additions and 1 deletions
2
lib/ws.c
2
lib/ws.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue