diff options
Diffstat (limited to 'src/util/common_logging.c')
-rw-r--r-- | src/util/common_logging.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index b5678e5be..3193878b8 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -1082,11 +1082,11 @@ mylog (enum GNUNET_ErrorType kind, | |||
1082 | return; | 1082 | return; |
1083 | } | 1083 | } |
1084 | flush_bulk (date); | 1084 | flush_bulk (date); |
1085 | strncpy (last_bulk, buf, sizeof (last_bulk)); | 1085 | GNUNET_strlcpy (last_bulk, buf, sizeof (last_bulk)); |
1086 | last_bulk_repeat = 0; | 1086 | last_bulk_repeat = 0; |
1087 | last_bulk_kind = kind; | 1087 | last_bulk_kind = kind; |
1088 | last_bulk_time = GNUNET_TIME_absolute_get (); | 1088 | last_bulk_time = GNUNET_TIME_absolute_get (); |
1089 | strncpy (last_bulk_comp, comp, COMP_TRACK_SIZE); | 1089 | GNUNET_strlcpy (last_bulk_comp, comp, sizeof (last_bulk_comp)); |
1090 | output_message (kind, comp, date, buf); | 1090 | output_message (kind, comp, date, buf); |
1091 | } | 1091 | } |
1092 | } | 1092 | } |
@@ -1364,9 +1364,8 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) | |||
1364 | if (NULL == pid) | 1364 | if (NULL == pid) |
1365 | return "NULL"; | 1365 | return "NULL"; |
1366 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key); | 1366 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key); |
1367 | strncpy (buf, ret, sizeof (buf) - 1); | 1367 | GNUNET_strlcpy (buf, ret, sizeof (buf)); |
1368 | GNUNET_free (ret); | 1368 | GNUNET_free (ret); |
1369 | buf[4] = '\0'; | ||
1370 | return buf; | 1369 | return buf; |
1371 | } | 1370 | } |
1372 | 1371 | ||
@@ -1390,9 +1389,8 @@ GNUNET_i2s2 (const struct GNUNET_PeerIdentity *pid) | |||
1390 | if (NULL == pid) | 1389 | if (NULL == pid) |
1391 | return "NULL"; | 1390 | return "NULL"; |
1392 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key); | 1391 | ret = GNUNET_CRYPTO_eddsa_public_key_to_string (&pid->public_key); |
1393 | strncpy (buf, ret, sizeof (buf) - 1); | 1392 | GNUNET_strlcpy (buf, ret, sizeof (buf)); |
1394 | GNUNET_free (ret); | 1393 | GNUNET_free (ret); |
1395 | buf[4] = '\0'; | ||
1396 | return buf; | 1394 | return buf; |
1397 | } | 1395 | } |
1398 | 1396 | ||