[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: MHD_queue_response(): restored be
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: MHD_queue_response(): restored behavior with wrong parameters |
Date: |
Sun, 31 Oct 2021 15:51:05 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
The following commit(s) were added to refs/heads/master by this push:
new d5993f6c MHD_queue_response(): restored behavior with wrong parameters
d5993f6c is described below
commit d5993f6c1f323d0de2577a82143cdc9f6c3facc1
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Oct 31 17:50:48 2021 +0300
MHD_queue_response(): restored behavior with wrong parameters
Do not crash with NULL connection pointer (as before).
---
src/microhttpd/connection.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index b5724f5b..eef0f5d3 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -4934,11 +4934,10 @@ MHD_queue_response (struct MHD_Connection *connection,
{
struct MHD_Daemon *daemon;
- daemon = connection->daemon;
+ if ((NULL == connection) || (NULL == response))
+ return MHD_NO;
- if (daemon->shutdown)
- return MHD_YES; /* If daemon was shut down in parallel,
- * response will be aborted now or on later stage. */
+ daemon = connection->daemon;
#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
if ( (! connection->suspended) &&
@@ -4953,9 +4952,11 @@ MHD_queue_response (struct MHD_Connection *connection,
}
#endif
- if ( (NULL == connection) ||
- (NULL == response) ||
- (NULL != connection->response) ||
+ if (daemon->shutdown)
+ return MHD_YES; /* If daemon was shut down in parallel,
+ * response will be aborted now or on later stage. */
+
+ if ( (NULL != connection->response) ||
( (MHD_CONNECTION_HEADERS_PROCESSED != connection->state) &&
(MHD_CONNECTION_FULL_REQ_RECEIVED != connection->state) ) )
return MHD_NO;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: MHD_queue_response(): restored behavior with wrong parameters,
gnunet <=