diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-02 15:13:38 +0100 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2016-12-02 15:13:38 +0100 |
commit | f88d55e43f3d3a4468c2faa0621044ad17594e5f (patch) | |
tree | a1af9499dab467466135527c4a063360e2a0d6a2 | |
parent | c7bd34d154729521cf1ea959550957759207dcf2 (diff) |
-fix memcpy
-rw-r--r-- | src/gns/nss/nss_gns.c | 3 |
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; |