aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-daemon-fsprofiler.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
commitd8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch)
tree0ebb0db416c157fcfde51a941185819dd12d51fd /src/fs/gnunet-daemon-fsprofiler.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
downloadgnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz
gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/fs/gnunet-daemon-fsprofiler.c')
-rw-r--r--src/fs/gnunet-daemon-fsprofiler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs/gnunet-daemon-fsprofiler.c b/src/fs/gnunet-daemon-fsprofiler.c
index e6bc33e10..b9171c42d 100644
--- a/src/fs/gnunet-daemon-fsprofiler.c
+++ b/src/fs/gnunet-daemon-fsprofiler.c
@@ -246,7 +246,7 @@ make_file (uint64_t length,
246 for (i=0;i<length; i+=8) 246 for (i=0;i<length; i+=8)
247 { 247 {
248 xor = length ^ kval ^ (uint64_t) (i / 32 / 1024); 248 xor = length ^ kval ^ (uint64_t) (i / 32 / 1024);
249 memcpy (&data[i], &xor, GNUNET_MIN (length - i, sizeof (uint64_t))); 249 GNUNET_memcpy (&data[i], &xor, GNUNET_MIN (length - i, sizeof (uint64_t)));
250 } 250 }
251 bo.expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_DAYS); 251 bo.expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_DAYS);
252 bo.anonymity_level = (uint32_t) anonymity_level; 252 bo.anonymity_level = (uint32_t) anonymity_level;