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/social/gnunet-social.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/social/gnunet-social.c')
-rw-r--r-- | src/social/gnunet-social.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index 7c36a96d4..ed3801abc 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c | |||
@@ -349,7 +349,7 @@ notify_data (void *cls, uint16_t *data_size, void *data) | |||
349 | struct TransmitClosure *tmit = cls; | 349 | struct TransmitClosure *tmit = cls; |
350 | uint16_t size = tmit->size < *data_size ? tmit->size : *data_size; | 350 | uint16_t size = tmit->size < *data_size ? tmit->size : *data_size; |
351 | *data_size = size; | 351 | *data_size = size; |
352 | memcpy (data, tmit->data, size); | 352 | GNUNET_memcpy (data, tmit->data, size); |
353 | 353 | ||
354 | tmit->size -= size; | 354 | tmit->size -= size; |
355 | tmit->data += size; | 355 | tmit->data += size; |