From c31d90aa8ec76f9a15f486cb887ec3ac7309bf0f Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 29 May 2012 09:24:41 +0000 Subject: [PATCH] - fix address length --- src/transport/plugin_transport_unix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.25.1