diff options
author | lurchi <lurchi@strangeplace.net> | 2016-11-22 15:36:35 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2016-11-22 16:07:51 +0100 |
commit | 8887babc9465e6260e9fe7643165991993dd2cc5 (patch) | |
tree | f1a68b0600357ea82e3a76bdfefea1b2a1d43674 /src/conversation/plugin_gnsrecord_conversation.c | |
parent | 0fa8cc7c2ec1d7d7d1a901a84b7740475f8b4648 (diff) | |
download | gnunet-8887babc9465e6260e9fe7643165991993dd2cc5.tar.gz gnunet-8887babc9465e6260e9fe7643165991993dd2cc5.zip |
fix creation of PHONE records with gnunet-namestore
The string size of the line/port part of a phone record value is 103 (base32-encoded GNUNET_HashCode). Until now it was assumed to be 128 bytes long
Diffstat (limited to 'src/conversation/plugin_gnsrecord_conversation.c')
-rw-r--r-- | src/conversation/plugin_gnsrecord_conversation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conversation/plugin_gnsrecord_conversation.c b/src/conversation/plugin_gnsrecord_conversation.c index e2bcf7ec9..91cae7261 100644 --- a/src/conversation/plugin_gnsrecord_conversation.c +++ b/src/conversation/plugin_gnsrecord_conversation.c | |||
@@ -118,12 +118,12 @@ conversation_string_to_value (void *cls, | |||
118 | case GNUNET_GNSRECORD_TYPE_PHONE: | 118 | case GNUNET_GNSRECORD_TYPE_PHONE: |
119 | { | 119 | { |
120 | struct GNUNET_CONVERSATION_PhoneRecord *pr; | 120 | struct GNUNET_CONVERSATION_PhoneRecord *pr; |
121 | char line_port[128]; | 121 | char line_port[103]; |
122 | const char *dash; | 122 | const char *dash; |
123 | struct GNUNET_PeerIdentity peer; | 123 | struct GNUNET_PeerIdentity peer; |
124 | 124 | ||
125 | if ( (NULL == (dash = strchr (s, '-'))) || | 125 | if ( (NULL == (dash = strchr (s, '-'))) || |
126 | (1 != sscanf (s, "%128s-", line_port)) || | 126 | (1 != sscanf (s, "%103s-", line_port)) || |
127 | (GNUNET_OK != | 127 | (GNUNET_OK != |
128 | GNUNET_CRYPTO_eddsa_public_key_from_string (dash + 1, | 128 | GNUNET_CRYPTO_eddsa_public_key_from_string (dash + 1, |
129 | strlen (dash + 1), | 129 | strlen (dash + 1), |