From: Matthias Wachs Date: Tue, 29 May 2012 09:24:41 +0000 (+0000) Subject: - fix address length X-Git-Tag: initial-import-from-subversion-38251~13368 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c31d90aa8ec76f9a15f486cb887ec3ac7309bf0f;p=oweals%2Fgnunet.git - fix address length --- diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index ed418b8e7..2725551e0 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -677,7 +677,6 @@ unix_plugin_get_session (void *cls, } /* Create a new session */ - s = GNUNET_malloc (sizeof (struct Session) + address->address_length); s->addr = &s[1]; s->addrlen = address->address_length; @@ -828,7 +827,7 @@ unix_demultiplexer (struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, GNUNET_STATISTICS_set (plugin->env->stats,"# UNIX bytes received", plugin->bytes_in_recv, GNUNET_NO); - addr = GNUNET_HELLO_address_allocate(sender, "unix", un->sun_path, strlen (un->sun_path)); + addr = GNUNET_HELLO_address_allocate(sender, "unix", un->sun_path, strlen (un->sun_path) + 1); s = lookup_session (plugin, sender, un); if (NULL == s) s = unix_plugin_get_session (plugin, addr);