mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
added a size > buffer size check to make it easier to track this in the
future
This commit is contained in:
parent
232a4553b8
commit
c347db2e0a
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user