From: Matthias Wachs Date: Fri, 10 Jun 2011 15:38:43 +0000 (+0000) Subject: fix segfault X-Git-Tag: initial-import-from-subversion-38251~18244 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=76e8462020b7ed63330fd0f115307ba76806a0a0;p=oweals%2Fgnunet.git fix segfault --- diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 689cb3784..4ded5aadd 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -1813,15 +1813,18 @@ handle_tcp_nat_probe (void *cls, GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; } + + tcp_nat_probe = (const struct TCP_NAT_ProbeMessage *)message; + if (0 == memcmp (&tcp_nat_probe->clientIdentity, - plugin->env->my_identity, - sizeof (struct GNUNET_PeerIdentity))) + plugin->env->my_identity, + sizeof (struct GNUNET_PeerIdentity))) { /* refuse connections from ourselves */ GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); return; } - tcp_nat_probe = (const struct TCP_NAT_ProbeMessage *)message; + session = GNUNET_CONTAINER_multihashmap_get(plugin->nat_wait_conns, &tcp_nat_probe->clientIdentity.hashPubKey); if (session == NULL)