diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
243 | static char buf[5]; | 243 | static char buf[5]; |
244 | char *ret; | 244 | char *ret; |
245 | 245 | ||
246 | if (NULL == cp || NULL == &cp->pid.public_key) | ||
247 | return "NULL"; | ||
246 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); | 248 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&cp->pid.public_key); |
249 | if (NULL == ret) | ||
250 | return "NULL"; | ||
247 | strncpy (buf, | 251 | strncpy (buf, |
248 | ret, | 252 | ret, |
249 | sizeof (buf) - 1); | 253 | sizeof (buf) - 1); |