diff options
Diffstat (limited to 'src/namestore/plugin_namestore_flat.c')
-rw-r--r-- | src/namestore/plugin_namestore_flat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/namestore/plugin_namestore_flat.c b/src/namestore/plugin_namestore_flat.c index 4356c3b93..36b045394 100644 --- a/src/namestore/plugin_namestore_flat.c +++ b/src/namestore/plugin_namestore_flat.c | |||
@@ -263,8 +263,8 @@ database_setup (struct Plugin *plugin) | |||
263 | (char**)&entry->private_key); | 263 | (char**)&entry->private_key); |
264 | key_len = strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); | 264 | key_len = strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); |
265 | key = GNUNET_malloc (strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); | 265 | key = GNUNET_malloc (strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); |
266 | memcpy (key, label, strlen (label)); | 266 | GNUNET_memcpy (key, label, strlen (label)); |
267 | memcpy (key+strlen(label), | 267 | GNUNET_memcpy (key+strlen(label), |
268 | entry->private_key, | 268 | entry->private_key, |
269 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); | 269 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); |
270 | GNUNET_CRYPTO_hash (key, | 270 | GNUNET_CRYPTO_hash (key, |
@@ -413,8 +413,8 @@ namestore_store_records (void *cls, | |||
413 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); | 413 | rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, UINT64_MAX); |
414 | key_len = strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); | 414 | key_len = strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); |
415 | key = GNUNET_malloc (key_len); | 415 | key = GNUNET_malloc (key_len); |
416 | memcpy (key, label, strlen (label)); | 416 | GNUNET_memcpy (key, label, strlen (label)); |
417 | memcpy (key+strlen(label), | 417 | GNUNET_memcpy (key+strlen(label), |
418 | zone_key, | 418 | zone_key, |
419 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); | 419 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); |
420 | GNUNET_CRYPTO_hash (key, | 420 | GNUNET_CRYPTO_hash (key, |
@@ -430,7 +430,7 @@ namestore_store_records (void *cls, | |||
430 | GNUNET_asprintf (&entry->label, | 430 | GNUNET_asprintf (&entry->label, |
431 | label, | 431 | label, |
432 | strlen (label)); | 432 | strlen (label)); |
433 | memcpy (entry->private_key, | 433 | GNUNET_memcpy (entry->private_key, |
434 | zone_key, | 434 | zone_key, |
435 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); | 435 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); |
436 | entry->rvalue = rvalue; | 436 | entry->rvalue = rvalue; |
@@ -443,7 +443,7 @@ namestore_store_records (void *cls, | |||
443 | entry->record_data[i].flags = rd[i].flags; | 443 | entry->record_data[i].flags = rd[i].flags; |
444 | entry->record_data[i].data_size = rd[i].data_size; | 444 | entry->record_data[i].data_size = rd[i].data_size; |
445 | entry->record_data[i].data = GNUNET_malloc (rd[i].data_size); | 445 | entry->record_data[i].data = GNUNET_malloc (rd[i].data_size); |
446 | memcpy ((char*)entry->record_data[i].data, rd[i].data, rd[i].data_size); | 446 | GNUNET_memcpy ((char*)entry->record_data[i].data, rd[i].data, rd[i].data_size); |
447 | } | 447 | } |
448 | return GNUNET_CONTAINER_multihashmap_put (plugin->hm, | 448 | return GNUNET_CONTAINER_multihashmap_put (plugin->hm, |
449 | &hkey, | 449 | &hkey, |
@@ -483,8 +483,8 @@ namestore_lookup_records (void *cls, | |||
483 | } | 483 | } |
484 | key_len = strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); | 484 | key_len = strlen (label) + sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); |
485 | key = GNUNET_malloc (key_len); | 485 | key = GNUNET_malloc (key_len); |
486 | memcpy (key, label, strlen (label)); | 486 | GNUNET_memcpy (key, label, strlen (label)); |
487 | memcpy (key+strlen(label), | 487 | GNUNET_memcpy (key+strlen(label), |
488 | zone, | 488 | zone, |
489 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); | 489 | sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); |
490 | GNUNET_CRYPTO_hash (key, | 490 | GNUNET_CRYPTO_hash (key, |