aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/datastore_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
commitd8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch)
tree0ebb0db416c157fcfde51a941185819dd12d51fd /src/datastore/datastore_api.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
downloadgnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz
gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/datastore/datastore_api.c')
-rw-r--r--src/datastore/datastore_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index bf2f0097a..3f8ef9db4 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -974,7 +974,7 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h,
974 dm->uid = GNUNET_htonll (0); 974 dm->uid = GNUNET_htonll (0);
975 dm->expiration = GNUNET_TIME_absolute_hton (expiration); 975 dm->expiration = GNUNET_TIME_absolute_hton (expiration);
976 dm->key = *key; 976 dm->key = *key;
977 memcpy (&dm[1], 977 GNUNET_memcpy (&dm[1],
978 data, 978 data,
979 size); 979 size);
980 qc.sc.cont = cont; 980 qc.sc.cont = cont;
@@ -1248,7 +1248,7 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
1248 dm->uid = GNUNET_htonll (0); 1248 dm->uid = GNUNET_htonll (0);
1249 dm->expiration = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_ZERO_ABS); 1249 dm->expiration = GNUNET_TIME_absolute_hton (GNUNET_TIME_UNIT_ZERO_ABS);
1250 dm->key = *key; 1250 dm->key = *key;
1251 memcpy (&dm[1], 1251 GNUNET_memcpy (&dm[1],
1252 data, 1252 data,
1253 size); 1253 size);
1254 1254