mirror of
https://github.com/matrix-construct/construct
synced 2024-06-11 06:28:55 +02:00
ircd::server: Check for empty buffer and bail before recv()'ing on it.
This commit is contained in:
parent
335a045d41
commit
f8841a7f60
|
@ -2468,6 +2468,13 @@ try
|
|||
buffer + copied
|
||||
};
|
||||
|
||||
if(unlikely(empty(remaining)))
|
||||
throw buffer_overrun
|
||||
{
|
||||
"Buffer of %zu bytes is insufficient to receive the HTTP request.",
|
||||
size(buffer),
|
||||
};
|
||||
|
||||
const const_buffer view
|
||||
{
|
||||
read(remaining)
|
||||
|
|
Loading…
Reference in a new issue