diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-08-14 21:33:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-08-14 21:33:12 +0000 |
commit | 6f884890eb4cfc7d2faa6f57cbc3e773b722898e (patch) | |
tree | 32add01b9f4af832dd0f148ac06ccfa3a0ff8c72 /src | |
parent | 61f84fb3196d86d8980b02acdb0adbccbacf6aa4 (diff) | |
download | gnunet-6f884890eb4cfc7d2faa6f57cbc3e773b722898e.tar.gz gnunet-6f884890eb4cfc7d2faa6f57cbc3e773b722898e.zip |
fix
Diffstat (limited to 'src')
-rw-r--r-- | src/util/common_logging.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index aa051333b..e05600986 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -473,6 +473,7 @@ const char * | |||
473 | GNUNET_h2s (const GNUNET_HashCode * hc) | 473 | GNUNET_h2s (const GNUNET_HashCode * hc) |
474 | { | 474 | { |
475 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 475 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
476 | |||
476 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); | 477 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); |
477 | ret.encoding[8] = '\0'; | 478 | ret.encoding[8] = '\0'; |
478 | return (const char *) ret.encoding; | 479 | return (const char *) ret.encoding; |
@@ -490,8 +491,9 @@ const char * | |||
490 | GNUNET_h2s_full (const GNUNET_HashCode * hc) | 491 | GNUNET_h2s_full (const GNUNET_HashCode * hc) |
491 | { | 492 | { |
492 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 493 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
494 | |||
493 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); | 495 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); |
494 | ret.encoding[104] = '\0'; | 496 | ret.encoding[sizeof(ret)-1] = '\0'; |
495 | return (const char *) ret.encoding; | 497 | return (const char *) ret.encoding; |
496 | } | 498 | } |
497 | 499 | ||
@@ -508,6 +510,7 @@ const char * | |||
508 | GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) | 510 | GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) |
509 | { | 511 | { |
510 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 512 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
513 | |||
511 | GNUNET_CRYPTO_hash_to_enc (&pid->hashPubKey, &ret); | 514 | GNUNET_CRYPTO_hash_to_enc (&pid->hashPubKey, &ret); |
512 | ret.encoding[4] = '\0'; | 515 | ret.encoding[4] = '\0'; |
513 | return (const char *) ret.encoding; | 516 | return (const char *) ret.encoding; |