diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
commit | d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch) | |
tree | 0ebb0db416c157fcfde51a941185819dd12d51fd /src/pt/test_gns_vpn.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) | |
download | gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip |
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/pt/test_gns_vpn.c')
-rw-r--r-- | src/pt/test_gns_vpn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 467a15310..4b7e817e8 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -102,7 +102,7 @@ copy_buffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
102 | 102 | ||
103 | if (cbc->pos + size * nmemb > sizeof(cbc->buf)) | 103 | if (cbc->pos + size * nmemb > sizeof(cbc->buf)) |
104 | return 0; /* overflow */ | 104 | return 0; /* overflow */ |
105 | memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); | 105 | GNUNET_memcpy (&cbc->buf[cbc->pos], ptr, size * nmemb); |
106 | cbc->pos += size * nmemb; | 106 | cbc->pos += size * nmemb; |
107 | return size * nmemb; | 107 | return size * nmemb; |
108 | } | 108 | } |