[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 01/02: work around silly address sanitizer
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 01/02: work around silly address sanitizer alignment warning |
Date: |
Fri, 02 Mar 2018 22:06:56 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
commit 7710e63cdf6cf4a113ea30169308e73963c77566
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Mar 2 22:05:15 2018 +0100
work around silly address sanitizer alignment warning
---
src/microhttpd/test_upgrade.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 6c26104e..7b542aff 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -1047,13 +1047,14 @@ test_upgrade (int flags,
#endif /* HTTPS_SUPPORT */
if (NULL == d)
return 2;
- real_flags = MHD_get_daemon_info(d,
- MHD_DAEMON_INFO_FLAGS);
+ real_flags = MHD_get_daemon_info (d,
+ MHD_DAEMON_INFO_FLAGS);
if (NULL == real_flags)
abort ();
dinfo = MHD_get_daemon_info (d,
MHD_DAEMON_INFO_BIND_PORT);
- if (NULL == dinfo || 0 == dinfo->port)
+ if ( (NULL == dinfo) ||
+ (0 == dinfo->port) )
abort ();
if (!test_tls || TLS_LIB_GNUTLS == use_tls_tool)
{
@@ -1072,12 +1073,19 @@ test_upgrade (int flags,
{
#if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID)
MHD_socket tls_fork_sock;
+ uint16_t port;
+
+ /* make address sanitizer happy */
+ memcpy (&port,
+ &dinfo->port,
+ sizeof (port));
if (-1 == (pid = gnutlscli_connect (&tls_fork_sock,
- dinfo->port)))
+ port)))
{
MHD_stop_daemon (d);
return 4;
}
+
sock = wr_create_from_plain_sckt (tls_fork_sock);
if (NULL == sock)
abort ();
--
To stop receiving notification emails like this one, please contact
address@hidden