[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] branch master updated: Check response exist
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] branch master updated: Check response existence on upgrade |
Date: |
Thu, 04 May 2017 22:34:56 +0200 |
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 b4216c60 Check response existence on upgrade
b4216c60 is described below
commit b4216c60fdb5b48f6cfec416301fc63a1167e6cd
Author: José Bollo <address@hidden>
AuthorDate: Thu May 4 21:58:46 2017 +0200
Check response existence on upgrade
When a connection upgrade is requested and when the
request sent an error reply, the response is most of
the time already sent when the test on
connection->response->upgrade_handler is made, leading
to dereferencing NULL.
Two possibilities exist:
NULL == connection->response || NULL ==
connection->response->upgÿrade_handler
or
NULL != connection->response && NULL ==
connection->response->upgraÿde_handler
The first is prefered because it is probably safer to close the
connection in that case.
Change-Id: Ie6e7fc165f7fe3635ade0952bb34a0b937d38716
Signed-off-by: José Bollo <address@hidden>
Signed-off-by: Evgeny Grin (Karlson2k) <address@hidden>
---
src/microhttpd/connection.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 4753d6eb..9dba3431 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -882,7 +882,7 @@ keepalive_possible (struct MHD_Connection *connection)
#ifdef UPGRADE_SUPPORT
if ( (MHD_str_equal_caseless_ (end,
"upgrade")) &&
- (NULL == connection->response->upgrade_handler) )
+ (NULL == connection->response || NULL ==
connection->resp�onse->upgrade_handler) )
return MHD_NO;
#endif /* UPGRADE_SUPPORT */
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [libmicrohttpd] branch master updated: Check response existence on upgrade,
gnunet <=