[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 08/19: allow NULL argument for GNUNET_i2s()
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 08/19: allow NULL argument for GNUNET_i2s() |
Date: |
Sun, 22 Jan 2017 15:23:49 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit ee5f54e2afef553dc190387e4efc668aca70f031
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jan 22 12:23:08 2017 +0100
allow NULL argument for GNUNET_i2s()
---
src/util/common_logging.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index dad5d3776..1da406753 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -1209,8 +1209,11 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid)
static char buf[256];
char *ret;
+ if (NULL == pid)
+ return "NULL";
ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key);
- strcpy (buf, ret);
+ strcpy (buf,
+ ret);
GNUNET_free (ret);
buf[4] = '\0';
return buf;
@@ -1234,8 +1237,11 @@ GNUNET_i2s2 (const struct GNUNET_PeerIdentity *pid)
static char buf[256];
char *ret;
+ if (NULL == pid)
+ return "NULL";
ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key);
- strcpy (buf, ret);
+ strcpy (buf,
+ ret);
GNUNET_free (ret);
buf[4] = '\0';
return buf;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (a225f5848 -> 4c56d5a0f), gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 05/19: only send CHANNEL_DESTROY message if we at least send the CHANNEL_CREATE message, and not if the tunnel never went up in the first place, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 08/19: allow NULL argument for GNUNET_i2s(),
gnunet <=
- [GNUnet-SVN] [gnunet] 03/19: improve logging, log before doing, not after, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 01/19: optimize startup sequence for when we execute first DHT PUTs, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 11/19: fix buffer size, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 04/19: fix startup interaction between channel and tunnel to not send CHANNEL_OPEN until tunnel is in KEY_OK state, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 18/19: nicer logging, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 10/19: make GCPP_2s also return static string, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 12/19: fix a few off-by-ones, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 02/19: do not run upnpc during tests, produces unnecessary errors if not available, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 16/19: nicer order of LOG statements, gnunet, 2017/01/22
- [GNUnet-SVN] [gnunet] 13/19: properly launch DHT GETs based on need for paths, gnunet, 2017/01/22