diff options
Diffstat (limited to 'src/fragmentation')
-rw-r--r-- | src/fragmentation/defragmentation.c | 2 | ||||
-rw-r--r-- | src/fragmentation/fragmentation.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/fragmentation/defragmentation.c b/src/fragmentation/defragmentation.c index 50fc4a1d5..bc401435e 100644 --- a/src/fragmentation/defragmentation.c +++ b/src/fragmentation/defragmentation.c | |||
@@ -520,7 +520,7 @@ GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, | |||
520 | { | 520 | { |
521 | mc->bits -= 1LLU << bit; | 521 | mc->bits -= 1LLU << bit; |
522 | mbuf = (char *) &mc[1]; | 522 | mbuf = (char *) &mc[1]; |
523 | memcpy (&mbuf[bit * (dc->mtu - sizeof (struct FragmentHeader))], &fh[1], | 523 | GNUNET_memcpy (&mbuf[bit * (dc->mtu - sizeof (struct FragmentHeader))], &fh[1], |
524 | ntohs (msg->size) - sizeof (struct FragmentHeader)); | 524 | ntohs (msg->size) - sizeof (struct FragmentHeader)); |
525 | mc->last_update = now; | 525 | mc->last_update = now; |
526 | if (bit < mc->last_bit) | 526 | if (bit < mc->last_bit) |
diff --git a/src/fragmentation/fragmentation.c b/src/fragmentation/fragmentation.c index 3a55502e7..1c6b86e9e 100644 --- a/src/fragmentation/fragmentation.c +++ b/src/fragmentation/fragmentation.c | |||
@@ -232,7 +232,7 @@ transmit_next (void *cls) | |||
232 | fh->fragment_id = htonl (fc->fragment_id); | 232 | fh->fragment_id = htonl (fc->fragment_id); |
233 | fh->total_size = fc->msg->size; /* already in big-endian */ | 233 | fh->total_size = fc->msg->size; /* already in big-endian */ |
234 | fh->offset = htons ((fc->mtu - sizeof (struct FragmentHeader)) * bit); | 234 | fh->offset = htons ((fc->mtu - sizeof (struct FragmentHeader)) * bit); |
235 | memcpy (&fh[1], &mbuf[bit * (fc->mtu - sizeof (struct FragmentHeader))], | 235 | GNUNET_memcpy (&fh[1], &mbuf[bit * (fc->mtu - sizeof (struct FragmentHeader))], |
236 | fsize - sizeof (struct FragmentHeader)); | 236 | fsize - sizeof (struct FragmentHeader)); |
237 | if (NULL != fc->tracker) | 237 | if (NULL != fc->tracker) |
238 | GNUNET_BANDWIDTH_tracker_consume (fc->tracker, fsize); | 238 | GNUNET_BANDWIDTH_tracker_consume (fc->tracker, fsize); |
@@ -339,7 +339,7 @@ GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats, | |||
339 | fc->fragment_id = | 339 | fc->fragment_id = |
340 | GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, | 340 | GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, |
341 | UINT32_MAX); | 341 | UINT32_MAX); |
342 | memcpy (&fc[1], msg, size); | 342 | GNUNET_memcpy (&fc[1], msg, size); |
343 | bits = | 343 | bits = |
344 | (size + mtu - sizeof (struct FragmentHeader) - 1) / (mtu - | 344 | (size + mtu - sizeof (struct FragmentHeader) - 1) / (mtu - |
345 | sizeof (struct | 345 | sizeof (struct |