gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] 08/10: process_request_body(): do not move


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 08/10: process_request_body(): do not move data if nothing was processed
Date: Mon, 17 Jun 2019 20:35:51 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 1f9e183d103d6f2ac100763c0280db3dc26adbec
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun Jun 16 23:17:20 2019 +0300

    process_request_body(): do not move data if nothing was processed
---
 src/microhttpd/connection.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 9b8d3e2b..525e6a8c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -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);

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]