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/transport/test_transport_api_reliability.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/transport/test_transport_api_reliability.c')
-rw-r--r-- | src/transport/test_transport_api_reliability.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index fe2ac78e0..154301656 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c | |||
@@ -461,7 +461,7 @@ notify_ready (void *cls, size_t size, void *buf) | |||
461 | hdr.header.type = htons (MTYPE); | 461 | hdr.header.type = htons (MTYPE); |
462 | hdr.num = htonl (n); | 462 | hdr.num = htonl (n); |
463 | msg_sent = n; | 463 | msg_sent = n; |
464 | memcpy (&cbuf[ret], &hdr, sizeof (struct TestMessage)); | 464 | GNUNET_memcpy (&cbuf[ret], &hdr, sizeof (struct TestMessage)); |
465 | ret += sizeof (struct TestMessage); | 465 | ret += sizeof (struct TestMessage); |
466 | memset (&cbuf[ret], n, s - sizeof (struct TestMessage)); | 466 | memset (&cbuf[ret], n, s - sizeof (struct TestMessage)); |
467 | ret += s - sizeof (struct TestMessage); | 467 | ret += s - sizeof (struct TestMessage); |