diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
commit | d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch) | |
tree | 0ebb0db416c157fcfde51a941185819dd12d51fd /src/identity/plugin_gnsrecord_identity.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) | |
download | gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip |
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/identity/plugin_gnsrecord_identity.c')
-rw-r--r-- | src/identity/plugin_gnsrecord_identity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/identity/plugin_gnsrecord_identity.c b/src/identity/plugin_gnsrecord_identity.c index 3fd47bd02..c26c04074 100644 --- a/src/identity/plugin_gnsrecord_identity.c +++ b/src/identity/plugin_gnsrecord_identity.c | |||
@@ -146,7 +146,7 @@ string_to_value (void *cls, | |||
146 | write_ptr, | 146 | write_ptr, |
147 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); | 147 | sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey)); |
148 | write_ptr += sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); | 148 | write_ptr += sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey); |
149 | memcpy (write_ptr, str, strlen (str) + 1); //with 0-Terminator | 149 | GNUNET_memcpy (write_ptr, str, strlen (str) + 1); //with 0-Terminator |
150 | GNUNET_free (tmp_tok); | 150 | GNUNET_free (tmp_tok); |
151 | return GNUNET_OK; | 151 | return GNUNET_OK; |
152 | 152 | ||