mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 19:19:00 +08:00
Corrected dangerous assert() in process_new_connection
This commit is contained in:
parent
b68b0e3e50
commit
102101e9d6
@ -4042,7 +4042,7 @@ static void process_new_connection(struct mg_connection *conn) {
|
||||
reset_per_request_attributes(conn);
|
||||
conn->request_len = read_request(NULL, conn, conn->buf, conn->buf_size,
|
||||
&conn->data_len);
|
||||
assert(conn->data_len >= conn->request_len);
|
||||
assert(conn->request_len < 0 || conn->data_len >= conn->request_len);
|
||||
if (conn->request_len == 0 && conn->data_len == conn->buf_size) {
|
||||
send_http_error(conn, 413, "Request Too Large", "");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user