mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
work around silly address sanitizer alignment warning
This commit is contained in:
@@ -1047,13 +1047,14 @@ test_upgrade (int flags,
|
|||||||
#endif /* HTTPS_SUPPORT */
|
#endif /* HTTPS_SUPPORT */
|
||||||
if (NULL == d)
|
if (NULL == d)
|
||||||
return 2;
|
return 2;
|
||||||
real_flags = MHD_get_daemon_info(d,
|
real_flags = MHD_get_daemon_info (d,
|
||||||
MHD_DAEMON_INFO_FLAGS);
|
MHD_DAEMON_INFO_FLAGS);
|
||||||
if (NULL == real_flags)
|
if (NULL == real_flags)
|
||||||
abort ();
|
abort ();
|
||||||
dinfo = MHD_get_daemon_info (d,
|
dinfo = MHD_get_daemon_info (d,
|
||||||
MHD_DAEMON_INFO_BIND_PORT);
|
MHD_DAEMON_INFO_BIND_PORT);
|
||||||
if (NULL == dinfo || 0 == dinfo->port)
|
if ( (NULL == dinfo) ||
|
||||||
|
(0 == dinfo->port) )
|
||||||
abort ();
|
abort ();
|
||||||
if (!test_tls || TLS_LIB_GNUTLS == use_tls_tool)
|
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)
|
#if defined(HTTPS_SUPPORT) && defined(HAVE_FORK) && defined(HAVE_WAITPID)
|
||||||
MHD_socket tls_fork_sock;
|
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,
|
if (-1 == (pid = gnutlscli_connect (&tls_fork_sock,
|
||||||
dinfo->port)))
|
port)))
|
||||||
{
|
{
|
||||||
MHD_stop_daemon (d);
|
MHD_stop_daemon (d);
|
||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
sock = wr_create_from_plain_sckt (tls_fork_sock);
|
sock = wr_create_from_plain_sckt (tls_fork_sock);
|
||||||
if (NULL == sock)
|
if (NULL == sock)
|
||||||
abort ();
|
abort ();
|
||||||
|
|||||||
Reference in New Issue
Block a user