From d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 8 Jul 2016 17:20:23 +0000 Subject: -avoid calling memcpy() with NULL argument, even if len is 0 --- src/namestore/namestore_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/namestore/namestore_api.c') 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, msg->private_key = *pkey; name_tmp = (char *) &msg[1]; - memcpy (name_tmp, + GNUNET_memcpy (name_tmp, label, name_len); rd_ser = &name_tmp[name_len]; @@ -1095,7 +1095,7 @@ GNUNET_NAMESTORE_records_lookup (struct GNUNET_NAMESTORE_Handle *h, msg->gns_header.r_id = htonl (qe->op_id); msg->zone = *pkey; msg->label_len = htonl (label_len); - memcpy (&msg[1], + GNUNET_memcpy (&msg[1], label, label_len); if (NULL == h->mq) -- cgit v1.2.3