From: Matthias Wachs Date: Fri, 12 Jul 2013 14:15:37 +0000 (+0000) Subject: important check X-Git-Tag: initial-import-from-subversion-38251~8344 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3b36a778cb63ea83a0ccc711dfe0ce9ce7107026;p=oweals%2Fgnunet.git important check --- diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 9c8c585de..925159a76 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -1562,6 +1562,15 @@ udp_plugin_get_session (void *cls, { struct Session * s = NULL; + if (NULL == address) + { + GNUNET_break (0); + return NULL; + } + if ((address->address_length != sizeof (struct IPv4UdpAddress)) && + (address->address_length != sizeof (struct IPv6UdpAddress))) + return NULL; + /* otherwise create new */ if (NULL != (s = udp_plugin_lookup_session(cls, address))) return s;