From: Bart Polot Date: Wed, 4 Sep 2013 17:01:49 +0000 (+0000) Subject: - don't crash on NULL tunnels X-Git-Tag: initial-import-from-subversion-38251~7538 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=402c654b79d900fe1e7362b433faf198addcce5b;p=oweals%2Fgnunet.git - don't crash on NULL tunnels --- diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c index b3d91eec2..39c3385e5 100644 --- a/src/mesh/gnunet-service-mesh-enc.c +++ b/src/mesh/gnunet-service-mesh-enc.c @@ -3247,6 +3247,12 @@ tunnel_use_path (struct MeshTunnel2 *t, struct MeshPeerPath *p) struct MeshPeer *peer; unsigned int own_pos; + if (NULL == t || NULL == p) + { + GNUNET_break (0); + return NULL; + } + GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_NONCE, &cid); c = connection_new (&cid);