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/exit | |
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/exit')
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 56 | ||||
-rw-r--r-- | src/exit/gnunet-helper-exit-windows.c | 12 |
2 files changed, 34 insertions, 34 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index 7c67313e6..9f3d05c77 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -491,14 +491,14 @@ transmit_reply_to_cadet (void *cls, | |||
491 | GNUNET_assert (ret <= size); | 491 | GNUNET_assert (ret <= size); |
492 | hdr.size = htons (ret); | 492 | hdr.size = htons (ret); |
493 | hdr.type = htons (GNUNET_MESSAGE_TYPE_VPN_DNS_FROM_INTERNET); | 493 | hdr.type = htons (GNUNET_MESSAGE_TYPE_VPN_DNS_FROM_INTERNET); |
494 | memcpy (&dns, ts->specifics.dns.reply, sizeof (dns)); | 494 | GNUNET_memcpy (&dns, ts->specifics.dns.reply, sizeof (dns)); |
495 | dns.id = ts->specifics.dns.original_id; | 495 | dns.id = ts->specifics.dns.original_id; |
496 | off = 0; | 496 | off = 0; |
497 | memcpy (&cbuf[off], &hdr, sizeof (hdr)); | 497 | GNUNET_memcpy (&cbuf[off], &hdr, sizeof (hdr)); |
498 | off += sizeof (hdr); | 498 | off += sizeof (hdr); |
499 | memcpy (&cbuf[off], &dns, sizeof (dns)); | 499 | GNUNET_memcpy (&cbuf[off], &dns, sizeof (dns)); |
500 | off += sizeof (dns); | 500 | off += sizeof (dns); |
501 | memcpy (&cbuf[off], &ts->specifics.dns.reply[sizeof (dns)], ts->specifics.dns.reply_length - sizeof (dns)); | 501 | GNUNET_memcpy (&cbuf[off], &ts->specifics.dns.reply[sizeof (dns)], ts->specifics.dns.reply_length - sizeof (dns)); |
502 | off += ts->specifics.dns.reply_length - sizeof (dns); | 502 | off += ts->specifics.dns.reply_length - sizeof (dns); |
503 | GNUNET_free (ts->specifics.dns.reply); | 503 | GNUNET_free (ts->specifics.dns.reply); |
504 | ts->specifics.dns.reply = NULL; | 504 | ts->specifics.dns.reply = NULL; |
@@ -539,7 +539,7 @@ process_dns_result (void *cls, | |||
539 | GNUNET_free_non_null (ts->specifics.dns.reply); | 539 | GNUNET_free_non_null (ts->specifics.dns.reply); |
540 | ts->specifics.dns.reply = GNUNET_malloc (r); | 540 | ts->specifics.dns.reply = GNUNET_malloc (r); |
541 | ts->specifics.dns.reply_length = r; | 541 | ts->specifics.dns.reply_length = r; |
542 | memcpy (ts->specifics.dns.reply, dns, r); | 542 | GNUNET_memcpy (ts->specifics.dns.reply, dns, r); |
543 | if (NULL != ts->th) | 543 | if (NULL != ts->th) |
544 | GNUNET_CADET_notify_transmit_ready_cancel (ts->th); | 544 | GNUNET_CADET_notify_transmit_ready_cancel (ts->th); |
545 | ts->th = GNUNET_CADET_notify_transmit_ready (ts->channel, | 545 | ts->th = GNUNET_CADET_notify_transmit_ready (ts->channel, |
@@ -602,7 +602,7 @@ receive_dns_request (void *cls GNUNET_UNUSED, | |||
602 | ts->specifics.dns.my_id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, | 602 | ts->specifics.dns.my_id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, |
603 | UINT16_MAX + 1); | 603 | UINT16_MAX + 1); |
604 | channels[ts->specifics.dns.my_id] = ts; | 604 | channels[ts->specifics.dns.my_id] = ts; |
605 | memcpy (buf, dns, dlen); | 605 | GNUNET_memcpy (buf, dns, dlen); |
606 | dout = (struct GNUNET_TUN_DnsHeader *) buf; | 606 | dout = (struct GNUNET_TUN_DnsHeader *) buf; |
607 | dout->id = ts->specifics.dns.my_id; | 607 | dout->id = ts->specifics.dns.my_id; |
608 | ts->specifics.dns.rs = GNUNET_DNSSTUB_resolve2 (dnsstub, | 608 | ts->specifics.dns.rs = GNUNET_DNSSTUB_resolve2 (dnsstub, |
@@ -636,34 +636,34 @@ hash_redirect_info (struct GNUNET_HashCode *hash, | |||
636 | switch (ri->remote_address.af) | 636 | switch (ri->remote_address.af) |
637 | { | 637 | { |
638 | case AF_INET: | 638 | case AF_INET: |
639 | memcpy (off, &ri->remote_address.address.ipv4, sizeof (struct in_addr)); | 639 | GNUNET_memcpy (off, &ri->remote_address.address.ipv4, sizeof (struct in_addr)); |
640 | off += sizeof (struct in_addr); | 640 | off += sizeof (struct in_addr); |
641 | break; | 641 | break; |
642 | case AF_INET6: | 642 | case AF_INET6: |
643 | memcpy (off, &ri->remote_address.address.ipv6, sizeof (struct in6_addr)); | 643 | GNUNET_memcpy (off, &ri->remote_address.address.ipv6, sizeof (struct in6_addr)); |
644 | off += sizeof (struct in_addr); | 644 | off += sizeof (struct in_addr); |
645 | break; | 645 | break; |
646 | default: | 646 | default: |
647 | GNUNET_assert (0); | 647 | GNUNET_assert (0); |
648 | } | 648 | } |
649 | memcpy (off, &ri->remote_address.port, sizeof (uint16_t)); | 649 | GNUNET_memcpy (off, &ri->remote_address.port, sizeof (uint16_t)); |
650 | off += sizeof (uint16_t); | 650 | off += sizeof (uint16_t); |
651 | switch (ri->local_address.af) | 651 | switch (ri->local_address.af) |
652 | { | 652 | { |
653 | case AF_INET: | 653 | case AF_INET: |
654 | memcpy (off, &ri->local_address.address.ipv4, sizeof (struct in_addr)); | 654 | GNUNET_memcpy (off, &ri->local_address.address.ipv4, sizeof (struct in_addr)); |
655 | off += sizeof (struct in_addr); | 655 | off += sizeof (struct in_addr); |
656 | break; | 656 | break; |
657 | case AF_INET6: | 657 | case AF_INET6: |
658 | memcpy (off, &ri->local_address.address.ipv6, sizeof (struct in6_addr)); | 658 | GNUNET_memcpy (off, &ri->local_address.address.ipv6, sizeof (struct in6_addr)); |
659 | off += sizeof (struct in_addr); | 659 | off += sizeof (struct in_addr); |
660 | break; | 660 | break; |
661 | default: | 661 | default: |
662 | GNUNET_assert (0); | 662 | GNUNET_assert (0); |
663 | } | 663 | } |
664 | memcpy (off, &ri->local_address.port, sizeof (uint16_t)); | 664 | GNUNET_memcpy (off, &ri->local_address.port, sizeof (uint16_t)); |
665 | off += sizeof (uint16_t); | 665 | off += sizeof (uint16_t); |
666 | memcpy (off, &ri->remote_address.proto, sizeof (uint8_t)); | 666 | GNUNET_memcpy (off, &ri->remote_address.proto, sizeof (uint8_t)); |
667 | /* off += sizeof (uint8_t); */ | 667 | /* off += sizeof (uint8_t); */ |
668 | } | 668 | } |
669 | 669 | ||
@@ -746,8 +746,8 @@ find_service (struct GNUNET_CONTAINER_MultiHashMap *service_map, | |||
746 | { | 746 | { |
747 | char key[sizeof (struct GNUNET_HashCode) + sizeof (uint16_t)]; | 747 | char key[sizeof (struct GNUNET_HashCode) + sizeof (uint16_t)]; |
748 | 748 | ||
749 | memcpy (&key[0], &destination_port, sizeof (uint16_t)); | 749 | GNUNET_memcpy (&key[0], &destination_port, sizeof (uint16_t)); |
750 | memcpy (&key[sizeof(uint16_t)], desc, sizeof (struct GNUNET_HashCode)); | 750 | GNUNET_memcpy (&key[sizeof(uint16_t)], desc, sizeof (struct GNUNET_HashCode)); |
751 | return GNUNET_CONTAINER_multihashmap_get (service_map, | 751 | return GNUNET_CONTAINER_multihashmap_get (service_map, |
752 | (struct GNUNET_HashCode *) key); | 752 | (struct GNUNET_HashCode *) key); |
753 | } | 753 | } |
@@ -794,8 +794,8 @@ store_service (struct GNUNET_CONTAINER_MultiHashMap *service_map, | |||
794 | 794 | ||
795 | GNUNET_TUN_service_name_to_hash (name, &desc); | 795 | GNUNET_TUN_service_name_to_hash (name, &desc); |
796 | service->name = GNUNET_strdup (name); | 796 | service->name = GNUNET_strdup (name); |
797 | memcpy (&key[0], &destination_port, sizeof (uint16_t)); | 797 | GNUNET_memcpy (&key[0], &destination_port, sizeof (uint16_t)); |
798 | memcpy (&key[sizeof(uint16_t)], &desc, sizeof (struct GNUNET_HashCode)); | 798 | GNUNET_memcpy (&key[sizeof(uint16_t)], &desc, sizeof (struct GNUNET_HashCode)); |
799 | if (GNUNET_OK != | 799 | if (GNUNET_OK != |
800 | GNUNET_CONTAINER_multihashmap_put (service_map, | 800 | GNUNET_CONTAINER_multihashmap_put (service_map, |
801 | (struct GNUNET_HashCode *) key, | 801 | (struct GNUNET_HashCode *) key, |
@@ -841,7 +841,7 @@ send_to_peer_notify_callback (void *cls, size_t size, void *buf) | |||
841 | return 0; | 841 | return 0; |
842 | } | 842 | } |
843 | GNUNET_assert (size >= tnq->len); | 843 | GNUNET_assert (size >= tnq->len); |
844 | memcpy (buf, tnq->payload, tnq->len); | 844 | GNUNET_memcpy (buf, tnq->payload, tnq->len); |
845 | size = tnq->len; | 845 | size = tnq->len; |
846 | GNUNET_CONTAINER_DLL_remove (s->specifics.tcp_udp.head, | 846 | GNUNET_CONTAINER_DLL_remove (s->specifics.tcp_udp.head, |
847 | s->specifics.tcp_udp.tail, | 847 | s->specifics.tcp_udp.tail, |
@@ -1067,7 +1067,7 @@ icmp_from_helper (const struct GNUNET_TUN_IcmpHeader *icmp, | |||
1067 | i2v->header.size = htons ((uint16_t) mlen); | 1067 | i2v->header.size = htons ((uint16_t) mlen); |
1068 | i2v->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_VPN); | 1068 | i2v->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_ICMP_TO_VPN); |
1069 | i2v->af = htonl (af); | 1069 | i2v->af = htonl (af); |
1070 | memcpy (&i2v->icmp_header, | 1070 | GNUNET_memcpy (&i2v->icmp_header, |
1071 | icmp, | 1071 | icmp, |
1072 | pktlen); | 1072 | pktlen); |
1073 | send_packet_to_cadet_channel (state, tnq); | 1073 | send_packet_to_cadet_channel (state, tnq); |
@@ -1144,7 +1144,7 @@ udp_from_helper (const struct GNUNET_TUN_UdpHeader *udp, | |||
1144 | urm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_UDP_REPLY); | 1144 | urm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_UDP_REPLY); |
1145 | urm->source_port = htons (0); | 1145 | urm->source_port = htons (0); |
1146 | urm->destination_port = htons (0); | 1146 | urm->destination_port = htons (0); |
1147 | memcpy (&urm[1], | 1147 | GNUNET_memcpy (&urm[1], |
1148 | &udp[1], | 1148 | &udp[1], |
1149 | pktlen - sizeof (struct GNUNET_TUN_UdpHeader)); | 1149 | pktlen - sizeof (struct GNUNET_TUN_UdpHeader)); |
1150 | send_packet_to_cadet_channel (state, tnq); | 1150 | send_packet_to_cadet_channel (state, tnq); |
@@ -1212,7 +1212,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp, | |||
1212 | } | 1212 | } |
1213 | /* mug port numbers and crc to avoid information leakage; | 1213 | /* mug port numbers and crc to avoid information leakage; |
1214 | sender will need to lookup the correct values anyway */ | 1214 | sender will need to lookup the correct values anyway */ |
1215 | memcpy (buf, tcp, pktlen); | 1215 | GNUNET_memcpy (buf, tcp, pktlen); |
1216 | mtcp = (struct GNUNET_TUN_TcpHeader *) buf; | 1216 | mtcp = (struct GNUNET_TUN_TcpHeader *) buf; |
1217 | mtcp->source_port = 0; | 1217 | mtcp->source_port = 0; |
1218 | mtcp->destination_port = 0; | 1218 | mtcp->destination_port = 0; |
@@ -1232,7 +1232,7 @@ tcp_from_helper (const struct GNUNET_TUN_TcpHeader *tcp, | |||
1232 | tdm->header.size = htons ((uint16_t) mlen); | 1232 | tdm->header.size = htons ((uint16_t) mlen); |
1233 | tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN); | 1233 | tdm->header.type = htons (GNUNET_MESSAGE_TYPE_VPN_TCP_DATA_TO_VPN); |
1234 | tdm->reserved = htonl (0); | 1234 | tdm->reserved = htonl (0); |
1235 | memcpy (&tdm->tcp_header, | 1235 | GNUNET_memcpy (&tdm->tcp_header, |
1236 | buf, | 1236 | buf, |
1237 | pktlen); | 1237 | pktlen); |
1238 | send_packet_to_cadet_channel (state, tnq); | 1238 | send_packet_to_cadet_channel (state, tnq); |
@@ -1630,7 +1630,7 @@ prepare_ipv4_packet (const void *payload, size_t payload_length, | |||
1630 | GNUNET_TUN_calculate_udp4_checksum (pkt4, | 1630 | GNUNET_TUN_calculate_udp4_checksum (pkt4, |
1631 | pkt4_udp, | 1631 | pkt4_udp, |
1632 | payload, payload_length); | 1632 | payload, payload_length); |
1633 | memcpy (&pkt4_udp[1], payload, payload_length); | 1633 | GNUNET_memcpy (&pkt4_udp[1], payload, payload_length); |
1634 | } | 1634 | } |
1635 | break; | 1635 | break; |
1636 | case IPPROTO_TCP: | 1636 | case IPPROTO_TCP: |
@@ -1644,7 +1644,7 @@ prepare_ipv4_packet (const void *payload, size_t payload_length, | |||
1644 | pkt4_tcp, | 1644 | pkt4_tcp, |
1645 | payload, | 1645 | payload, |
1646 | payload_length); | 1646 | payload_length); |
1647 | memcpy (&pkt4_tcp[1], payload, payload_length); | 1647 | GNUNET_memcpy (&pkt4_tcp[1], payload, payload_length); |
1648 | } | 1648 | } |
1649 | break; | 1649 | break; |
1650 | default: | 1650 | default: |
@@ -1719,14 +1719,14 @@ prepare_ipv6_packet (const void *payload, size_t payload_length, | |||
1719 | pkt6_udp, | 1719 | pkt6_udp, |
1720 | payload, | 1720 | payload, |
1721 | payload_length); | 1721 | payload_length); |
1722 | memcpy (&pkt6_udp[1], payload, payload_length); | 1722 | GNUNET_memcpy (&pkt6_udp[1], payload, payload_length); |
1723 | } | 1723 | } |
1724 | break; | 1724 | break; |
1725 | case IPPROTO_TCP: | 1725 | case IPPROTO_TCP: |
1726 | { | 1726 | { |
1727 | struct GNUNET_TUN_TcpHeader *pkt6_tcp = (struct GNUNET_TUN_TcpHeader *) &pkt6[1]; | 1727 | struct GNUNET_TUN_TcpHeader *pkt6_tcp = (struct GNUNET_TUN_TcpHeader *) &pkt6[1]; |
1728 | 1728 | ||
1729 | /* memcpy first here as some TCP header fields are initialized this way! */ | 1729 | /* GNUNET_memcpy first here as some TCP header fields are initialized this way! */ |
1730 | *pkt6_tcp = *tcp_header; | 1730 | *pkt6_tcp = *tcp_header; |
1731 | pkt6_tcp->source_port = htons (src_address->port); | 1731 | pkt6_tcp->source_port = htons (src_address->port); |
1732 | pkt6_tcp->destination_port = htons (dst_address->port); | 1732 | pkt6_tcp->destination_port = htons (dst_address->port); |
@@ -1734,7 +1734,7 @@ prepare_ipv6_packet (const void *payload, size_t payload_length, | |||
1734 | pkt6_tcp, | 1734 | pkt6_tcp, |
1735 | payload, | 1735 | payload, |
1736 | payload_length); | 1736 | payload_length); |
1737 | memcpy (&pkt6_tcp[1], payload, payload_length); | 1737 | GNUNET_memcpy (&pkt6_tcp[1], payload, payload_length); |
1738 | } | 1738 | } |
1739 | break; | 1739 | break; |
1740 | default: | 1740 | default: |
@@ -2226,7 +2226,7 @@ send_icmp_packet_via_tun (const struct SocketAddress *destination_address, | |||
2226 | break; | 2226 | break; |
2227 | } | 2227 | } |
2228 | *icmp = *icmp_header; | 2228 | *icmp = *icmp_header; |
2229 | memcpy (&icmp[1], | 2229 | GNUNET_memcpy (&icmp[1], |
2230 | payload, | 2230 | payload, |
2231 | payload_length); | 2231 | payload_length); |
2232 | GNUNET_TUN_calculate_icmp_checksum (icmp, | 2232 | GNUNET_TUN_calculate_icmp_checksum (icmp, |
diff --git a/src/exit/gnunet-helper-exit-windows.c b/src/exit/gnunet-helper-exit-windows.c index 43fe24a5d..6be65ccd5 100644 --- a/src/exit/gnunet-helper-exit-windows.c +++ b/src/exit/gnunet-helper-exit-windows.c | |||
@@ -919,7 +919,7 @@ attempt_read_tap (struct io_facility * input_facility, | |||
919 | hdr = (struct GNUNET_MessageHeader *) output_facility->buffer; | 919 | hdr = (struct GNUNET_MessageHeader *) output_facility->buffer; |
920 | size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader); | 920 | size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader); |
921 | 921 | ||
922 | memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader), | 922 | GNUNET_memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader), |
923 | input_facility->buffer, | 923 | input_facility->buffer, |
924 | input_facility->buffer_size); | 924 | input_facility->buffer_size); |
925 | 925 | ||
@@ -975,7 +975,7 @@ attempt_read_tap (struct io_facility * input_facility, | |||
975 | hdr = (struct GNUNET_MessageHeader *) output_facility->buffer; | 975 | hdr = (struct GNUNET_MessageHeader *) output_facility->buffer; |
976 | size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader); | 976 | size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader); |
977 | 977 | ||
978 | memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader), | 978 | GNUNET_memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader), |
979 | input_facility->buffer, | 979 | input_facility->buffer, |
980 | input_facility->buffer_size); | 980 | input_facility->buffer_size); |
981 | 981 | ||
@@ -1009,7 +1009,7 @@ attempt_read_tap (struct io_facility * input_facility, | |||
1009 | hdr = (struct GNUNET_MessageHeader *) output_facility->buffer; | 1009 | hdr = (struct GNUNET_MessageHeader *) output_facility->buffer; |
1010 | size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader); | 1010 | size = input_facility->buffer_size + sizeof (struct GNUNET_MessageHeader); |
1011 | 1011 | ||
1012 | memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader), | 1012 | GNUNET_memcpy (output_facility->buffer + sizeof (struct GNUNET_MessageHeader), |
1013 | input_facility->buffer, | 1013 | input_facility->buffer, |
1014 | input_facility->buffer_size); | 1014 | input_facility->buffer_size); |
1015 | 1015 | ||
@@ -1102,7 +1102,7 @@ partial_read_iostate_ready: | |||
1102 | * send it our via STDOUT. Is that possible at the moment? */ | 1102 | * send it our via STDOUT. Is that possible at the moment? */ |
1103 | 1103 | ||
1104 | /* hand over this buffers content and strip gnunet message header */ | 1104 | /* hand over this buffers content and strip gnunet message header */ |
1105 | memcpy (output_facility->buffer, | 1105 | GNUNET_memcpy (output_facility->buffer, |
1106 | input_facility->buffer + sizeof (struct GNUNET_MessageHeader), | 1106 | input_facility->buffer + sizeof (struct GNUNET_MessageHeader), |
1107 | input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader)); | 1107 | input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader)); |
1108 | output_facility->buffer_size = input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader); | 1108 | output_facility->buffer_size = input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader); |
@@ -1166,7 +1166,7 @@ partial_read_iostate_ready: | |||
1166 | IOSTATE_WAITING == output_facility->facility_state) | 1166 | IOSTATE_WAITING == output_facility->facility_state) |
1167 | && input_facility->buffer_size > sizeof(struct GNUNET_MessageHeader)) | 1167 | && input_facility->buffer_size > sizeof(struct GNUNET_MessageHeader)) |
1168 | { /* hand over this buffers content and strip gnunet message header */ | 1168 | { /* hand over this buffers content and strip gnunet message header */ |
1169 | memcpy (output_facility->buffer, | 1169 | GNUNET_memcpy (output_facility->buffer, |
1170 | input_facility->buffer + sizeof(struct GNUNET_MessageHeader), | 1170 | input_facility->buffer + sizeof(struct GNUNET_MessageHeader), |
1171 | input_facility->buffer_size - sizeof(struct GNUNET_MessageHeader)); | 1171 | input_facility->buffer_size - sizeof(struct GNUNET_MessageHeader)); |
1172 | output_facility->buffer_size = input_facility->buffer_size - sizeof(struct GNUNET_MessageHeader); | 1172 | output_facility->buffer_size = input_facility->buffer_size - sizeof(struct GNUNET_MessageHeader); |
@@ -1193,7 +1193,7 @@ partial_read_iostate_ready: | |||
1193 | } | 1193 | } |
1194 | return TRUE; | 1194 | return TRUE; |
1195 | case IOSTATE_RESUME: /* Our buffer was filled already but our write facility was busy. */ | 1195 | case IOSTATE_RESUME: /* Our buffer was filled already but our write facility was busy. */ |
1196 | memcpy (output_facility->buffer, | 1196 | GNUNET_memcpy (output_facility->buffer, |
1197 | input_facility->buffer + sizeof (struct GNUNET_MessageHeader), | 1197 | input_facility->buffer + sizeof (struct GNUNET_MessageHeader), |
1198 | input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader)); | 1198 | input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader)); |
1199 | output_facility->buffer_size = input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader); | 1199 | output_facility->buffer_size = input_facility->buffer_size - sizeof (struct GNUNET_MessageHeader); |