diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2024-01-31 00:10:38 +0100 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2024-01-31 00:10:38 +0100 |
commit | aef8f94992c7344085ab2c8eb281e618c96a269f (patch) | |
tree | d4dedd1092f311485e5c4595fbc551b2ceb31f17 | |
parent | 5587f1e043a26630303801f09fec0396511291eb (diff) | |
download | libmicrohttpd-aef8f94992c7344085ab2c8eb281e618c96a269f.tar.gz |
Fixed grow buffer check on 32-bit platforms
-rw-r--r-- | src/microhttpd/connection.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 916ca691..d0a06061 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c @@ -3595,12 +3595,13 @@ check_and_grow_read_buffer_space (struct MHD_Connection *c) c->read_buffer_size); else { - const size_t cur_chunk_left = + const uint64_t cur_chunk_left = c->rq.current_chunk_size - c->rq.current_chunk_offset; /* Do not grow read buffer more than necessary to process the current chunk with terminating CRLF. */ mhd_assert (c->rq.current_chunk_offset <= c->rq.current_chunk_size); - rbuff_grow_desired = ((cur_chunk_left + 2) > c->read_buffer_size); + rbuff_grow_desired = + ((cur_chunk_left + 2) > (uint64_t) (c->read_buffer_size)); } } } |