process_request_body(): do not move data if nothing was processed

This commit is contained in:
Evgeny Grin (Karlson2k)
2019-06-17 15:01:46 +03:00
parent 20767d5dec
commit 1f9e183d10
+2 -1
View File
@@ -2804,7 +2804,8 @@ process_request_body (struct MHD_Connection *connection)
connection->remaining_upload_size -= processed_size;
}
while (MHD_YES == instant_retry);
if (available > 0)
if ( (available > 0) &&
(buffer_head != connection->read_buffer) )
memmove (connection->read_buffer,
buffer_head,
available);