[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28937 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28937 - gnunet/src/transport |
Date: |
Mon, 2 Sep 2013 12:01:44 +0200 |
Author: wachs
Date: 2013-09-02 12:01:43 +0200 (Mon, 02 Sep 2013)
New Revision: 28937
Modified:
gnunet/src/transport/plugin_transport_http_server.c
Log:
h_addr is a define in in netdb.h
leads to stack corruption
-> rename variable
Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2013-09-02 10:01:22 UTC
(rev 28936)
+++ gnunet/src/transport/plugin_transport_http_server.c 2013-09-02 10:01:43 UTC
(rev 28937)
@@ -654,35 +654,33 @@
http_server_plugin_address_suggested (void *cls, const void *addr,
size_t addrlen)
{
- struct HttpAddressWrapper *next;
- struct HttpAddressWrapper *pos;
- struct HttpAddress *h_addr;
- h_addr = (struct HttpAddress *) addr;
+ struct HttpAddressWrapper *next;
+ struct HttpAddressWrapper *pos;
+ const struct HttpAddress *haddr = addr;
- if ((NULL != p->ext_addr) &&
- GNUNET_YES == (http_common_cmp_addresses (addr, addrlen,
- p->ext_addr, p->ext_addr_len)))
- {
- /* Checking HTTP_OPTIONS_VERIFY_CERTIFICATE option for external
hostname */
- if ((ntohl(h_addr->options) & HTTP_OPTIONS_VERIFY_CERTIFICATE) !=
- (p->options & HTTP_OPTIONS_VERIFY_CERTIFICATE))
+ if ((NULL != p->ext_addr) &&
+ GNUNET_YES == (http_common_cmp_addresses (addr, addrlen,
+ p->ext_addr,
p->ext_addr_len)))
+ {
+ /* Checking HTTP_OPTIONS_VERIFY_CERTIFICATE option for external
hostname */
+ if ((ntohl(haddr->options) & HTTP_OPTIONS_VERIFY_CERTIFICATE) !=
+ (p->options & HTTP_OPTIONS_VERIFY_CERTIFICATE))
return GNUNET_NO; /* VERIFY option not set as required!
*/
- return GNUNET_OK;
- }
+ return GNUNET_OK;
+ }
- next = p->addr_head;
- while (NULL != (pos = next))
- {
- next = pos->next;
- if (GNUNET_YES == (http_common_cmp_addresses(addr,
- addrlen,
- pos->address,
- pos->addrlen)))
- return GNUNET_OK;
+ next = p->addr_head;
+ while (NULL != (pos = next))
+ {
+ next = pos->next;
+ if (GNUNET_YES == (http_common_cmp_addresses(addr,
+
addrlen,
+
pos->address,
+
pos->addrlen)))
+ return GNUNET_OK;
- }
-
- return GNUNET_NO;
+ }
+ return GNUNET_NO;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28937 - gnunet/src/transport,
gnunet <=