From: t3sserakt Date: Tue, 26 Jun 2018 12:30:18 +0000 (+0200) Subject: codesonar finding 1575.9537 X-Git-Tag: v0.11.0~337 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4af6e380bbda66c267737c753ee8357c8b99b0fa;p=oweals%2Fgnunet.git codesonar finding 1575.9537 --- diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index 8e536e376..53c51c27a 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c @@ -243,7 +243,11 @@ GCP_2s (const struct CadetPeer *cp) static char buf[5]; char *ret; + if (NULL == cp || NULL == &cp->pid.public_key) + return "NULL"; ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); + if (NULL == ret) + return "NULL"; strncpy (buf, ret, sizeof (buf) - 1);