aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2016-12-02 15:13:38 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2016-12-02 15:13:38 +0100
commitf88d55e43f3d3a4468c2faa0621044ad17594e5f (patch)
treea1af9499dab467466135527c4a063360e2a0d6a2
parentc7bd34d154729521cf1ea959550957759207dcf2 (diff)
-fix memcpy
-rw-r--r--src/gns/nss/nss_gns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gns/nss/nss_gns.c b/src/gns/nss/nss_gns.c
index 3e1d597128..31435cf958 100644
--- a/src/gns/nss/nss_gns.c
+++ b/src/gns/nss/nss_gns.c
@@ -183,7 +183,8 @@ enum nss_status _nss_gns_gethostbyname2_r(
/* Addresses */
astart = idx;
l = u.count*address_length;
- GNUNET_memcpy(buffer+astart, &u.data, l);
+ if (0 != l)
+ memcpy(buffer+astart, &u.data, l);
/* address_length is a multiple of 32bits, so idx is still aligned
* correctly */
idx += l;