Skip to content
Snippets Groups Projects
Commit c347db2e authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

added a size > buffer size check to make it easier to track this in the

future
parent 232a4553
No related branches found
No related tags found
No related merge requests found
......@@ -307,6 +307,12 @@ static int juggle(curl_socket_t *sockfdp,
}
logmsg("> %d bytes data, server => client", buffer_len);
if(buffer_len > (ssize_t)sizeof(buffer)) {
logmsg("ERROR: %d bytes of data does not fit within the %d "
"bytes buffer", buffer_len, sizeof(buffer));
return FALSE;
}
/*
* To properly support huge data chunks, we need to repeat the call
* to read() until we're done or it fails.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment