aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/namestore_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/namestore/namestore_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/namestore/namestore_api.c')
-rw-r--r--src/namestore/namestore_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index afb7265d8..b8da654ce 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -992,7 +992,7 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h,
992 msg->private_key = *pkey; 992 msg->private_key = *pkey;
993 993
994 name_tmp = (char *) &msg[1]; 994 name_tmp = (char *) &msg[1];
995 memcpy (name_tmp, 995 GNUNET_memcpy (name_tmp,
996 label, 996 label,
997 name_len); 997 name_len);
998 rd_ser = &name_tmp[name_len]; 998 rd_ser = &name_tmp[name_len];
@@ -1095,7 +1095,7 @@ GNUNET_NAMESTORE_records_lookup (struct GNUNET_NAMESTORE_Handle *h,
1095 msg->gns_header.r_id = htonl (qe->op_id); 1095 msg->gns_header.r_id = htonl (qe->op_id);
1096 msg->zone = *pkey; 1096 msg->zone = *pkey;
1097 msg->label_len = htonl (label_len); 1097 msg->label_len = htonl (label_len);
1098 memcpy (&msg[1], 1098 GNUNET_memcpy (&msg[1],
1099 label, 1099 label,
1100 label_len); 1100 label_len);
1101 if (NULL == h->mq) 1101 if (NULL == h->mq)