diff options
-rw-r--r-- | src/microhttpd/connection.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index 166695fb..53d980d5 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -2176,8 +2176,10 @@ process_request_body (struct MHD_Connection *connection) | |||
2176 | { | 2176 | { |
2177 | /* already queued a response, discard remaining upload | 2177 | /* already queued a response, discard remaining upload |
2178 | (but not more, there might be another request after it) */ | 2178 | (but not more, there might be another request after it) */ |
2179 | uint64_t purge = MHD_MIN (connection->remaining_upload_size, | 2179 | size_t purge; |
2180 | connection->read_buffer_offset); | 2180 | |
2181 | purge = (size_t) MHD_MIN (connection->remaining_upload_size, | ||
2182 | (uint64_t) connection->read_buffer_offset); | ||
2181 | connection->remaining_upload_size -= purge; | 2183 | connection->remaining_upload_size -= purge; |
2182 | if (connection->read_buffer_offset > purge) | 2184 | if (connection->read_buffer_offset > purge) |
2183 | memmove (connection->read_buffer, | 2185 | memmove (connection->read_buffer, |