From: Bart Polot Date: Tue, 24 Jan 2012 03:03:35 +0000 (+0000) Subject: - Don't crash on bogus data from client X-Git-Tag: initial-import-from-subversion-38251~15161 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f8d1558a5e6ede02e8c7f17d634d5d61f0e63e3f;p=oweals%2Fgnunet.git - Don't crash on bogus data from client --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index b91fb3819..604ad52a9 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -3884,6 +3884,12 @@ handle_local_tunnel_destroy (void *cls, struct GNUNET_SERVER_Client *client, /* Remove from local id hashmap */ GNUNET_CRYPTO_hash (&tid, sizeof (MESH_TunnelNumber), &hash); t = GNUNET_CONTAINER_multihashmap_get (c->own_tunnels, &hash); + if (NULL == t) + { + GNUNET_break (0); + GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); + return; + } send_client_tunnel_disconnect(t, c); if (c != t->owner) {