Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/libtorrent-0.13.8/extra/corrupt_file.cc
Examining data/libtorrent-0.13.8/extra/object.cc
Examining data/libtorrent-0.13.8/extra/object.h
Examining data/libtorrent-0.13.8/extra/posix_fallocate.cc
Examining data/libtorrent-0.13.8/extra/test_object.cc
Examining data/libtorrent-0.13.8/extra/test_partial_queue.cc
Examining data/libtorrent-0.13.8/extra/test_queue.cc
Examining data/libtorrent-0.13.8/extra/test_ranges.cc
Examining data/libtorrent-0.13.8/extra/test_sockaddr.cc
Examining data/libtorrent-0.13.8/rak/address_info.h
Examining data/libtorrent-0.13.8/rak/algorithm.h
Examining data/libtorrent-0.13.8/rak/allocators.h
Examining data/libtorrent-0.13.8/rak/error_number.h
Examining data/libtorrent-0.13.8/rak/file_stat.h
Examining data/libtorrent-0.13.8/rak/fs_stat.h
Examining data/libtorrent-0.13.8/rak/functional.h
Examining data/libtorrent-0.13.8/rak/partial_queue.h
Examining data/libtorrent-0.13.8/rak/path.h
Examining data/libtorrent-0.13.8/rak/priority_queue.h
Examining data/libtorrent-0.13.8/rak/priority_queue_default.h
Examining data/libtorrent-0.13.8/rak/regex.h
Examining data/libtorrent-0.13.8/rak/socket_address.h
Examining data/libtorrent-0.13.8/rak/string_manip.h
Examining data/libtorrent-0.13.8/rak/timer.h
Examining data/libtorrent-0.13.8/rak/unordered_vector.h
Examining data/libtorrent-0.13.8/src/data/chunk.cc
Examining data/libtorrent-0.13.8/src/data/chunk.h
Examining data/libtorrent-0.13.8/src/data/chunk_handle.h
Examining data/libtorrent-0.13.8/src/data/chunk_iterator.h
Examining data/libtorrent-0.13.8/src/data/chunk_list.cc
Examining data/libtorrent-0.13.8/src/data/chunk_list.h
Examining data/libtorrent-0.13.8/src/data/chunk_list_node.h
Examining data/libtorrent-0.13.8/src/data/chunk_part.cc
Examining data/libtorrent-0.13.8/src/data/chunk_part.h
Examining data/libtorrent-0.13.8/src/data/hash_check_queue.cc
Examining data/libtorrent-0.13.8/src/data/hash_check_queue.h
Examining data/libtorrent-0.13.8/src/data/hash_chunk.cc
Examining data/libtorrent-0.13.8/src/data/hash_chunk.h
Examining data/libtorrent-0.13.8/src/data/hash_queue.cc
Examining data/libtorrent-0.13.8/src/data/hash_queue.h
Examining data/libtorrent-0.13.8/src/data/hash_queue_node.cc
Examining data/libtorrent-0.13.8/src/data/hash_queue_node.h
Examining data/libtorrent-0.13.8/src/data/hash_torrent.cc
Examining data/libtorrent-0.13.8/src/data/hash_torrent.h
Examining data/libtorrent-0.13.8/src/data/memory_chunk.cc
Examining data/libtorrent-0.13.8/src/data/memory_chunk.h
Examining data/libtorrent-0.13.8/src/data/socket_file.cc
Examining data/libtorrent-0.13.8/src/data/socket_file.h
Examining data/libtorrent-0.13.8/src/dht/dht_bucket.cc
Examining data/libtorrent-0.13.8/src/dht/dht_bucket.h
Examining data/libtorrent-0.13.8/src/dht/dht_hash_map.h
Examining data/libtorrent-0.13.8/src/dht/dht_node.cc
Examining data/libtorrent-0.13.8/src/dht/dht_node.h
Examining data/libtorrent-0.13.8/src/dht/dht_router.cc
Examining data/libtorrent-0.13.8/src/dht/dht_router.h
Examining data/libtorrent-0.13.8/src/dht/dht_server.cc
Examining data/libtorrent-0.13.8/src/dht/dht_server.h
Examining data/libtorrent-0.13.8/src/dht/dht_tracker.cc
Examining data/libtorrent-0.13.8/src/dht/dht_tracker.h
Examining data/libtorrent-0.13.8/src/dht/dht_transaction.cc
Examining data/libtorrent-0.13.8/src/dht/dht_transaction.h
Examining data/libtorrent-0.13.8/src/download/available_list.cc
Examining data/libtorrent-0.13.8/src/download/available_list.h
Examining data/libtorrent-0.13.8/src/download/chunk_selector.cc
Examining data/libtorrent-0.13.8/src/download/chunk_selector.h
Examining data/libtorrent-0.13.8/src/download/chunk_statistics.cc
Examining data/libtorrent-0.13.8/src/download/chunk_statistics.h
Examining data/libtorrent-0.13.8/src/download/delegator.cc
Examining data/libtorrent-0.13.8/src/download/delegator.h
Examining data/libtorrent-0.13.8/src/download/download_constructor.cc
Examining data/libtorrent-0.13.8/src/download/download_constructor.h
Examining data/libtorrent-0.13.8/src/download/download_main.cc
Examining data/libtorrent-0.13.8/src/download/download_main.h
Examining data/libtorrent-0.13.8/src/download/download_wrapper.cc
Examining data/libtorrent-0.13.8/src/download/download_wrapper.h
Examining data/libtorrent-0.13.8/src/globals.cc
Examining data/libtorrent-0.13.8/src/globals.h
Examining data/libtorrent-0.13.8/src/manager.cc
Examining data/libtorrent-0.13.8/src/manager.h
Examining data/libtorrent-0.13.8/src/net/address_list.cc
Examining data/libtorrent-0.13.8/src/net/address_list.h
Examining data/libtorrent-0.13.8/src/net/data_buffer.h
Examining data/libtorrent-0.13.8/src/net/listen.cc
Examining data/libtorrent-0.13.8/src/net/listen.h
Examining data/libtorrent-0.13.8/src/net/local_addr.cc
Examining data/libtorrent-0.13.8/src/net/local_addr.h
Examining data/libtorrent-0.13.8/src/net/protocol_buffer.h
Examining data/libtorrent-0.13.8/src/net/socket_base.cc
Examining data/libtorrent-0.13.8/src/net/socket_base.h
Examining data/libtorrent-0.13.8/src/net/socket_datagram.cc
Examining data/libtorrent-0.13.8/src/net/socket_datagram.h
Examining data/libtorrent-0.13.8/src/net/socket_fd.cc
Examining data/libtorrent-0.13.8/src/net/socket_fd.h
Examining data/libtorrent-0.13.8/src/net/socket_set.cc
Examining data/libtorrent-0.13.8/src/net/socket_set.h
Examining data/libtorrent-0.13.8/src/net/socket_stream.cc
Examining data/libtorrent-0.13.8/src/net/socket_stream.h
Examining data/libtorrent-0.13.8/src/net/throttle_handle.h
Examining data/libtorrent-0.13.8/src/net/throttle_internal.cc
Examining data/libtorrent-0.13.8/src/net/throttle_internal.h
Examining data/libtorrent-0.13.8/src/net/throttle_list.cc
Examining data/libtorrent-0.13.8/src/net/throttle_list.h
Examining data/libtorrent-0.13.8/src/net/throttle_node.h
Examining data/libtorrent-0.13.8/src/protocol/encryption_info.h
Examining data/libtorrent-0.13.8/src/protocol/extensions.cc
Examining data/libtorrent-0.13.8/src/protocol/extensions.h
Examining data/libtorrent-0.13.8/src/protocol/handshake.cc
Examining data/libtorrent-0.13.8/src/protocol/handshake.h
Examining data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc
Examining data/libtorrent-0.13.8/src/protocol/handshake_encryption.h
Examining data/libtorrent-0.13.8/src/protocol/handshake_manager.cc
Examining data/libtorrent-0.13.8/src/protocol/handshake_manager.h
Examining data/libtorrent-0.13.8/src/protocol/initial_seed.cc
Examining data/libtorrent-0.13.8/src/protocol/initial_seed.h
Examining data/libtorrent-0.13.8/src/protocol/peer_chunks.h
Examining data/libtorrent-0.13.8/src/protocol/peer_connection_base.cc
Examining data/libtorrent-0.13.8/src/protocol/peer_connection_base.h
Examining data/libtorrent-0.13.8/src/protocol/peer_connection_leech.cc
Examining data/libtorrent-0.13.8/src/protocol/peer_connection_leech.h
Examining data/libtorrent-0.13.8/src/protocol/peer_connection_metadata.cc
Examining data/libtorrent-0.13.8/src/protocol/peer_connection_metadata.h
Examining data/libtorrent-0.13.8/src/protocol/peer_factory.cc
Examining data/libtorrent-0.13.8/src/protocol/peer_factory.h
Examining data/libtorrent-0.13.8/src/protocol/protocol_base.h
Examining data/libtorrent-0.13.8/src/protocol/request_list.cc
Examining data/libtorrent-0.13.8/src/protocol/request_list.h
Examining data/libtorrent-0.13.8/src/thread_disk.cc
Examining data/libtorrent-0.13.8/src/thread_disk.h
Examining data/libtorrent-0.13.8/src/thread_main.cc
Examining data/libtorrent-0.13.8/src/thread_main.h
Examining data/libtorrent-0.13.8/src/torrent/bitfield.cc
Examining data/libtorrent-0.13.8/src/torrent/bitfield.h
Examining data/libtorrent-0.13.8/src/torrent/chunk_manager.cc
Examining data/libtorrent-0.13.8/src/torrent/chunk_manager.h
Examining data/libtorrent-0.13.8/src/torrent/common.h
Examining data/libtorrent-0.13.8/src/torrent/connection_manager.cc
Examining data/libtorrent-0.13.8/src/torrent/connection_manager.h
Examining data/libtorrent-0.13.8/src/torrent/data/block.cc
Examining data/libtorrent-0.13.8/src/torrent/data/block.h
Examining data/libtorrent-0.13.8/src/torrent/data/block_failed.h
Examining data/libtorrent-0.13.8/src/torrent/data/block_list.cc
Examining data/libtorrent-0.13.8/src/torrent/data/block_list.h
Examining data/libtorrent-0.13.8/src/torrent/data/block_transfer.h
Examining data/libtorrent-0.13.8/src/torrent/data/chunk_utils.cc
Examining data/libtorrent-0.13.8/src/torrent/data/chunk_utils.h
Examining data/libtorrent-0.13.8/src/torrent/data/download_data.cc
Examining data/libtorrent-0.13.8/src/torrent/data/download_data.h
Examining data/libtorrent-0.13.8/src/torrent/data/file.cc
Examining data/libtorrent-0.13.8/src/torrent/data/file.h
Examining data/libtorrent-0.13.8/src/torrent/data/file_list.cc
Examining data/libtorrent-0.13.8/src/torrent/data/file_list.h
Examining data/libtorrent-0.13.8/src/torrent/data/file_list_iterator.cc
Examining data/libtorrent-0.13.8/src/torrent/data/file_list_iterator.h
Examining data/libtorrent-0.13.8/src/torrent/data/file_manager.cc
Examining data/libtorrent-0.13.8/src/torrent/data/file_manager.h
Examining data/libtorrent-0.13.8/src/torrent/data/file_utils.cc
Examining data/libtorrent-0.13.8/src/torrent/data/file_utils.h
Examining data/libtorrent-0.13.8/src/torrent/data/piece.h
Examining data/libtorrent-0.13.8/src/torrent/data/transfer_list.cc
Examining data/libtorrent-0.13.8/src/torrent/data/transfer_list.h
Examining data/libtorrent-0.13.8/src/torrent/dht_manager.cc
Examining data/libtorrent-0.13.8/src/torrent/dht_manager.h
Examining data/libtorrent-0.13.8/src/torrent/download.cc
Examining data/libtorrent-0.13.8/src/torrent/download.h
Examining data/libtorrent-0.13.8/src/torrent/download/choke_group.cc
Examining data/libtorrent-0.13.8/src/torrent/download/choke_group.h
Examining data/libtorrent-0.13.8/src/torrent/download/choke_queue.cc
Examining data/libtorrent-0.13.8/src/torrent/download/choke_queue.h
Examining data/libtorrent-0.13.8/src/torrent/download/download_manager.cc
Examining data/libtorrent-0.13.8/src/torrent/download/download_manager.h
Examining data/libtorrent-0.13.8/src/torrent/download/group_entry.h
Examining data/libtorrent-0.13.8/src/torrent/download/resource_manager.cc
Examining data/libtorrent-0.13.8/src/torrent/download/resource_manager.h
Examining data/libtorrent-0.13.8/src/torrent/download_info.h
Examining data/libtorrent-0.13.8/src/torrent/error.cc
Examining data/libtorrent-0.13.8/src/torrent/error.h
Examining data/libtorrent-0.13.8/src/torrent/event.h
Examining data/libtorrent-0.13.8/src/torrent/exceptions.cc
Examining data/libtorrent-0.13.8/src/torrent/exceptions.h
Examining data/libtorrent-0.13.8/src/torrent/hash_string.cc
Examining data/libtorrent-0.13.8/src/torrent/hash_string.h
Examining data/libtorrent-0.13.8/src/torrent/http.cc
Examining data/libtorrent-0.13.8/src/torrent/http.h
Examining data/libtorrent-0.13.8/src/torrent/net/socket_address_compact.h
Examining data/libtorrent-0.13.8/src/torrent/net/socket_address_key.cc
Examining data/libtorrent-0.13.8/src/torrent/net/socket_address_key.h
Examining data/libtorrent-0.13.8/src/torrent/object.cc
Examining data/libtorrent-0.13.8/src/torrent/object.h
Examining data/libtorrent-0.13.8/src/torrent/object_raw_bencode.h
Examining data/libtorrent-0.13.8/src/torrent/object_static_map.cc
Examining data/libtorrent-0.13.8/src/torrent/object_static_map.h
Examining data/libtorrent-0.13.8/src/torrent/object_stream.cc
Examining data/libtorrent-0.13.8/src/torrent/object_stream.h
Examining data/libtorrent-0.13.8/src/torrent/path.cc
Examining data/libtorrent-0.13.8/src/torrent/path.h
Examining data/libtorrent-0.13.8/src/torrent/peer/choke_status.h
Examining data/libtorrent-0.13.8/src/torrent/peer/client_info.cc
Examining data/libtorrent-0.13.8/src/torrent/peer/client_info.h
Examining data/libtorrent-0.13.8/src/torrent/peer/client_list.cc
Examining data/libtorrent-0.13.8/src/torrent/peer/client_list.h
Examining data/libtorrent-0.13.8/src/torrent/peer/connection_list.cc
Examining data/libtorrent-0.13.8/src/torrent/peer/connection_list.h
Examining data/libtorrent-0.13.8/src/torrent/peer/peer.cc
Examining data/libtorrent-0.13.8/src/torrent/peer/peer.h
Examining data/libtorrent-0.13.8/src/torrent/peer/peer_info.cc
Examining data/libtorrent-0.13.8/src/torrent/peer/peer_info.h
Examining data/libtorrent-0.13.8/src/torrent/peer/peer_list.cc
Examining data/libtorrent-0.13.8/src/torrent/peer/peer_list.h
Examining data/libtorrent-0.13.8/src/torrent/poll.h
Examining data/libtorrent-0.13.8/src/torrent/poll_epoll.cc
Examining data/libtorrent-0.13.8/src/torrent/poll_epoll.h
Examining data/libtorrent-0.13.8/src/torrent/poll_kqueue.cc
Examining data/libtorrent-0.13.8/src/torrent/poll_kqueue.h
Examining data/libtorrent-0.13.8/src/torrent/poll_select.cc
Examining data/libtorrent-0.13.8/src/torrent/poll_select.h
Examining data/libtorrent-0.13.8/src/torrent/rate.cc
Examining data/libtorrent-0.13.8/src/torrent/rate.h
Examining data/libtorrent-0.13.8/src/torrent/throttle.cc
Examining data/libtorrent-0.13.8/src/torrent/throttle.h
Examining data/libtorrent-0.13.8/src/torrent/torrent.cc
Examining data/libtorrent-0.13.8/src/torrent/torrent.h
Examining data/libtorrent-0.13.8/src/torrent/tracker.cc
Examining data/libtorrent-0.13.8/src/torrent/tracker.h
Examining data/libtorrent-0.13.8/src/torrent/tracker_controller.cc
Examining data/libtorrent-0.13.8/src/torrent/tracker_controller.h
Examining data/libtorrent-0.13.8/src/torrent/tracker_list.cc
Examining data/libtorrent-0.13.8/src/torrent/tracker_list.h
Examining data/libtorrent-0.13.8/src/torrent/utils/directory_events.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/directory_events.h
Examining data/libtorrent-0.13.8/src/torrent/utils/extents.h
Examining data/libtorrent-0.13.8/src/torrent/utils/log.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/log.h
Examining data/libtorrent-0.13.8/src/torrent/utils/log_buffer.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/log_buffer.h
Examining data/libtorrent-0.13.8/src/torrent/utils/net.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/net.h
Examining data/libtorrent-0.13.8/src/torrent/utils/option_strings.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/option_strings.h
Examining data/libtorrent-0.13.8/src/torrent/utils/ranges.h
Examining data/libtorrent-0.13.8/src/torrent/utils/resume.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/resume.h
Examining data/libtorrent-0.13.8/src/torrent/utils/signal_bitfield.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/signal_bitfield.h
Examining data/libtorrent-0.13.8/src/torrent/utils/thread_base.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/thread_base.h
Examining data/libtorrent-0.13.8/src/torrent/utils/thread_interrupt.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/thread_interrupt.h
Examining data/libtorrent-0.13.8/src/torrent/utils/uri_parser.cc
Examining data/libtorrent-0.13.8/src/torrent/utils/uri_parser.h
Examining data/libtorrent-0.13.8/src/tracker/tracker_dht.cc
Examining data/libtorrent-0.13.8/src/tracker/tracker_dht.h
Examining data/libtorrent-0.13.8/src/tracker/tracker_http.cc
Examining data/libtorrent-0.13.8/src/tracker/tracker_http.h
Examining data/libtorrent-0.13.8/src/tracker/tracker_udp.cc
Examining data/libtorrent-0.13.8/src/tracker/tracker_udp.h
Examining data/libtorrent-0.13.8/src/utils/diffie_hellman.cc
Examining data/libtorrent-0.13.8/src/utils/diffie_hellman.h
Examining data/libtorrent-0.13.8/src/utils/instrumentation.cc
Examining data/libtorrent-0.13.8/src/utils/instrumentation.h
Examining data/libtorrent-0.13.8/src/utils/queue_buckets.h
Examining data/libtorrent-0.13.8/src/utils/rc4.h
Examining data/libtorrent-0.13.8/src/utils/sha1.h
Examining data/libtorrent-0.13.8/src/utils/sha_fast.cc
Examining data/libtorrent-0.13.8/src/utils/sha_fast.h
Examining data/libtorrent-0.13.8/test/data/chunk_list_test.cc
Examining data/libtorrent-0.13.8/test/data/chunk_list_test.h
Examining data/libtorrent-0.13.8/test/data/hash_check_queue_test.cc
Examining data/libtorrent-0.13.8/test/data/hash_check_queue_test.h
Examining data/libtorrent-0.13.8/test/data/hash_queue_test.cc
Examining data/libtorrent-0.13.8/test/data/hash_queue_test.h
Examining data/libtorrent-0.13.8/test/main.cc
Examining data/libtorrent-0.13.8/test/protocol/test_request_list.cc
Examining data/libtorrent-0.13.8/test/protocol/test_request_list.h
Examining data/libtorrent-0.13.8/test/rak/allocators_test.cc
Examining data/libtorrent-0.13.8/test/rak/allocators_test.h
Examining data/libtorrent-0.13.8/test/rak/ranges_test.cc
Examining data/libtorrent-0.13.8/test/rak/ranges_test.h
Examining data/libtorrent-0.13.8/test/torrent/http_test.cc
Examining data/libtorrent-0.13.8/test/torrent/http_test.h
Examining data/libtorrent-0.13.8/test/torrent/net/test_socket_address_key.cc
Examining data/libtorrent-0.13.8/test/torrent/net/test_socket_address_key.h
Examining data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc
Examining data/libtorrent-0.13.8/test/torrent/object_static_map_test.h
Examining data/libtorrent-0.13.8/test/torrent/object_stream_test.cc
Examining data/libtorrent-0.13.8/test/torrent/object_stream_test.h
Examining data/libtorrent-0.13.8/test/torrent/object_test.cc
Examining data/libtorrent-0.13.8/test/torrent/object_test.h
Examining data/libtorrent-0.13.8/test/torrent/object_test_utils.cc
Examining data/libtorrent-0.13.8/test/torrent/object_test_utils.h
Examining data/libtorrent-0.13.8/test/torrent/task_manager_test.cc
Examining data/libtorrent-0.13.8/test/torrent/task_manager_test.h
Examining data/libtorrent-0.13.8/test/torrent/tracker_controller_features.cc
Examining data/libtorrent-0.13.8/test/torrent/tracker_controller_features.h
Examining data/libtorrent-0.13.8/test/torrent/tracker_controller_requesting.cc
Examining data/libtorrent-0.13.8/test/torrent/tracker_controller_requesting.h
Examining data/libtorrent-0.13.8/test/torrent/tracker_controller_test.cc
Examining data/libtorrent-0.13.8/test/torrent/tracker_controller_test.h
Examining data/libtorrent-0.13.8/test/torrent/tracker_list_features_test.cc
Examining data/libtorrent-0.13.8/test/torrent/tracker_list_features_test.h
Examining data/libtorrent-0.13.8/test/torrent/tracker_list_test.cc
Examining data/libtorrent-0.13.8/test/torrent/tracker_list_test.h
Examining data/libtorrent-0.13.8/test/torrent/tracker_timeout_test.cc
Examining data/libtorrent-0.13.8/test/torrent/tracker_timeout_test.h
Examining data/libtorrent-0.13.8/test/torrent/utils/directory_events_test.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/directory_events_test.h
Examining data/libtorrent-0.13.8/test/torrent/utils/log_buffer_test.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/log_buffer_test.h
Examining data/libtorrent-0.13.8/test/torrent/utils/log_test.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/log_test.h
Examining data/libtorrent-0.13.8/test/torrent/utils/net_test.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/net_test.h
Examining data/libtorrent-0.13.8/test/torrent/utils/option_strings_test.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/option_strings_test.h
Examining data/libtorrent-0.13.8/test/torrent/utils/signal_bitfield_test.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/signal_bitfield_test.h
Examining data/libtorrent-0.13.8/test/torrent/utils/test_extents.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/test_extents.h
Examining data/libtorrent-0.13.8/test/torrent/utils/test_queue_buckets.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/test_queue_buckets.h
Examining data/libtorrent-0.13.8/test/torrent/utils/test_uri_parser.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/test_uri_parser.h
Examining data/libtorrent-0.13.8/test/torrent/utils/thread_base_test.cc
Examining data/libtorrent-0.13.8/test/torrent/utils/thread_base_test.h
Examining data/libtorrent-0.13.8/test/tracker/tracker_http_test.cc
Examining data/libtorrent-0.13.8/test/tracker/tracker_http_test.h

FINAL RESULTS:

data/libtorrent-0.13.8/src/protocol/encryption_info.h:48:99:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void                encrypt(const void *indata, void *outdata, unsigned int length) { m_encrypt.crypt(indata, outdata, length); }
data/libtorrent-0.13.8/src/protocol/encryption_info.h:49:99:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void                encrypt(void *data, unsigned int length)                        { m_encrypt.crypt(data, length); }
data/libtorrent-0.13.8/src/protocol/encryption_info.h:50:99:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void                decrypt(const void *indata, void *outdata, unsigned int length) { m_decrypt.crypt(indata, outdata, length); }
data/libtorrent-0.13.8/src/protocol/encryption_info.h:51:99:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void                decrypt(void *data, unsigned int length)                        { m_decrypt.crypt(data, length); }
data/libtorrent-0.13.8/src/protocol/extensions.cc:174:25:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  unsigned int length = vsnprintf(b, maxLength, format, args);
data/libtorrent-0.13.8/src/protocol/extensions.h:53:55:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define ATTRIBUTE_PRINTF(num) __attribute__ ((format (printf, num, num+1)))
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:142:15:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  peerEncrypt.crypt(discard, 1024);
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:143:15:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  peerEncrypt.crypt(m_sync, HandshakeEncryption::vc_length);
data/libtorrent-0.13.8/src/torrent/poll_select.cc:275:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(buffer, 256, LT_LOG_POLL_OPEN, getpid());
data/libtorrent-0.13.8/src/torrent/utils/log.cc:186:15:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  int count = vsnprintf(first, 4096 - (first - buffer), fmt, ap);
data/libtorrent-0.13.8/src/torrent/utils/log.cc:398:25:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    int buffer_length = snprintf(buffer, 64, fmt,
data/libtorrent-0.13.8/src/utils/rc4.h:61:8:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void crypt(const void* indata, void* outdata, unsigned int length)  { rc4_encrypt(&m_key, (const char*)indata, (char*)outdata, length); }
data/libtorrent-0.13.8/src/utils/rc4.h:62:8:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void crypt(void* data, unsigned int length)                         { rc4_encrypt(&m_key, (const char*)data, (char*)data, length); }
data/libtorrent-0.13.8/src/utils/rc4.h:72:8:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void crypt(const void* indata, void* outdata, unsigned int length)  { ::RC4(&m_key, length, (const unsigned char*)indata, (unsigned char*)outdata); }
data/libtorrent-0.13.8/src/utils/rc4.h:73:8:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void crypt(void* data, unsigned int length)                         { ::RC4(&m_key, length, (unsigned char*)data, (unsigned char*)data); }
data/libtorrent-0.13.8/src/utils/rc4.h:81:8:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void crypt(const void* indata, void* outdata, unsigned int length) { }
data/libtorrent-0.13.8/src/utils/rc4.h:82:8:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
  void crypt(void* data, unsigned int length) {}
data/libtorrent-0.13.8/test/torrent/utils/log_test.cc:140:3:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
  mktemp(&*filename.begin());
data/libtorrent-0.13.8/extra/corrupt_file.cc:45:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(seed);
data/libtorrent-0.13.8/extra/test_partial_queue.cc:79:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(rak::timer::current().usec());
data/libtorrent-0.13.8/rak/path.h:53:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char* home = std::getenv("HOME");
data/libtorrent-0.13.8/rak/path.h:89:23:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char* home = std::getenv("HOME");
data/libtorrent-0.13.8/src/dht/dht_bucket.cc:143:35:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    (*rand_id)[i] = m_begin[i] + (random() & (m_end[i] - m_begin[i]));
data/libtorrent-0.13.8/src/dht/dht_router.cc:68:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  m_curToken(random()),
data/libtorrent-0.13.8/src/dht/dht_router.cc:69:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  m_prevToken(random()) {
data/libtorrent-0.13.8/src/dht/dht_router.cc:88:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
      *itr = random();
data/libtorrent-0.13.8/src/dht/dht_router.cc:450:16:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  m_curToken = random();
data/libtorrent-0.13.8/src/dht/dht_router.cc:646:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  std::advance(itr, random() % m_routingTable.size());
data/libtorrent-0.13.8/src/dht/dht_server.cc:626:31:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  unsigned int rnd = (uint8_t)random();
data/libtorrent-0.13.8/src/dht/dht_tracker.cc:96:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    first += (random() % blocks) * (m_peers.size() - maxPeers) / (blocks - 1);
data/libtorrent-0.13.8/src/download/available_list.cc:53:19:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  size_type idx = random() % size();
data/libtorrent-0.13.8/src/download/chunk_selector.cc:85:18:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    m_position = random() % size();
data/libtorrent-0.13.8/src/download/chunk_selector.cc:106:8:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  if ((random() & 63) == 0) {
data/libtorrent-0.13.8/src/download/chunk_selector.cc:107:18:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    m_position = random() % size();
data/libtorrent-0.13.8/src/protocol/handshake.cc:998:16:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  int length = random() % enc_pad_size;
data/libtorrent-0.13.8/src/protocol/handshake.cc:1001:35:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  std::generate_n(pad, length, &::random);
data/libtorrent-0.13.8/src/torrent/download/choke_queue.cc:503:24:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    uint32_t start = ::random() % weightTotal;
data/libtorrent-0.13.8/src/torrent/download/choke_queue.cc:669:59:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
      first->weight = order * choke_queue::order_base + ::random() % (1 << 10);
data/libtorrent-0.13.8/src/torrent/download/choke_queue.cc:694:57:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    first->weight = order * choke_queue::order_base + ::random() % (1 << 10);
data/libtorrent-0.13.8/src/torrent/download/choke_queue.cc:751:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
      first->weight = ::random() % base;
data/libtorrent-0.13.8/src/torrent/object_stream.cc:212:10:  [3] (random) setstate:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  input->setstate(std::istream::failbit);
data/libtorrent-0.13.8/src/tracker/tracker_udp.cc:320:45:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  m_writeBuffer->write_32(m_transactionId = random());
data/libtorrent-0.13.8/src/tracker/tracker_udp.cc:334:45:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  m_writeBuffer->write_32(m_transactionId = random());
data/libtorrent-0.13.8/extra/corrupt_file.cc:12:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[length];
data/libtorrent-0.13.8/extra/corrupt_file.cc:35:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(argv[3], O_RDWR);
data/libtorrent-0.13.8/extra/object.cc:120:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(this, &src, sizeof(Object));
data/libtorrent-0.13.8/extra/object.cc:128:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[sizeof(Object)];
data/libtorrent-0.13.8/extra/object.cc:130:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(tmp, &src, sizeof(Object));
data/libtorrent-0.13.8/extra/object.cc:131:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(&src, this, sizeof(Object));
data/libtorrent-0.13.8/extra/object.cc:132:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(this, tmp, sizeof(Object));
data/libtorrent-0.13.8/extra/posix_fallocate.cc:12:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open("./posix_fallocate.out", O_CREAT | O_RDWR);
data/libtorrent-0.13.8/rak/socket_address.h:386:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(this, &src, length);
data/libtorrent-0.13.8/rak/socket_address.h:423:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[INET_ADDRSTRLEN];
data/libtorrent-0.13.8/rak/socket_address.h:473:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[INET6_ADDRSTRLEN];
data/libtorrent-0.13.8/src/data/chunk.cc:227:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy(buffer, data.first, data.second);
data/libtorrent-0.13.8/src/data/chunk.cc:258:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(data.first, buffer, data.second);
data/libtorrent-0.13.8/src/data/chunk_part.cc:88:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[touched];
data/libtorrent-0.13.8/src/data/memory_chunk.h:158:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[size];
data/libtorrent-0.13.8/src/data/socket_file.cc:58:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
SocketFile::open(const std::string& path, int prot, int flags, mode_t mode) {
data/libtorrent-0.13.8/src/data/socket_file.cc:72:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd_type fd = ::open(path.c_str(), flags | O_LARGEFILE, mode);
data/libtorrent-0.13.8/src/data/socket_file.cc:74:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd_type fd = ::open(path.c_str(), flags, mode);
data/libtorrent-0.13.8/src/data/socket_file.h:69:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  bool                open(const std::string& path, int prot, int flags, mode_t mode = 0666);
data/libtorrent-0.13.8/src/dht/dht_bucket.h:144:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_fullCache[num_nodes * 26];
data/libtorrent-0.13.8/src/dht/dht_node.cc:95:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(buffer + 20, sa.c_str(), 6);
data/libtorrent-0.13.8/src/dht/dht_router.cc:498:69:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
DhtRouter::generate_token(const rak::socket_address* sa, int token, char buffer[20]) {
data/libtorrent-0.13.8/src/dht/dht_router.cc:516:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char reference[20];
data/libtorrent-0.13.8/src/dht/dht_router.h:161:80:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char*               generate_token(const rak::socket_address* sa, int token, char buffer[20]);
data/libtorrent-0.13.8/src/dht/dht_server.cc:177:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  manager->poll()->open(this);
data/libtorrent-0.13.8/src/dht/dht_server.cc:725:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[2048];
data/libtorrent-0.13.8/src/dht/dht_server.h:118:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                 _id[20];
data/libtorrent-0.13.8/src/dht/dht_tracker.h:78:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                 header[2];
data/libtorrent-0.13.8/src/dht/dht_transaction.cc:257:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1500];  // If the message would exceed an Ethernet frame, something went very wrong.
data/libtorrent-0.13.8/src/dht/dht_transaction.cc:262:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(m_data, buffer, m_length);
data/libtorrent-0.13.8/src/dht/dht_transaction.h:233:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char data[data_size];
data/libtorrent-0.13.8/src/download/download_main.cc:168:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
DownloadMain::open(int flags) {
data/libtorrent-0.13.8/src/download/download_main.cc:172:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  file_list()->open(flags & FileList::open_no_create);
data/libtorrent-0.13.8/src/download/download_main.cc:433:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(buffer, message->data(), message->length());
data/libtorrent-0.13.8/src/download/download_main.h:79:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  void                open(int flags);
data/libtorrent-0.13.8/src/download/download_wrapper.cc:107:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hashObfuscated[20];
data/libtorrent-0.13.8/src/net/listen.cc:58:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
Listen::open(uint16_t first, uint16_t last, int backlog, const rak::socket_address* bindAddress) {
data/libtorrent-0.13.8/src/net/listen.cc:94:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      manager->poll()->open(this);
data/libtorrent-0.13.8/src/net/listen.h:56:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  bool                open(uint16_t first, uint16_t last, int backlog, const rak::socket_address* bindAddress);
data/libtorrent-0.13.8/src/net/local_addr.cc:187:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[4096];
data/libtorrent-0.13.8/src/net/socket_stream.cc:50:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[20];
data/libtorrent-0.13.8/src/net/socket_stream.cc:52:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  std::sprintf(buf, "%i", v);
data/libtorrent-0.13.8/src/protocol/extensions.cc:155:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/libtorrent-0.13.8/src/protocol/extensions.cc:163:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(copy, buffer, length);
data/libtorrent-0.13.8/src/protocol/extensions.cc:203:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  end += sprintf(end, "d5:added%d:", added_len);
data/libtorrent-0.13.8/src/protocol/extensions.cc:204:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(end, added.begin()->c_str(), added_len);
data/libtorrent-0.13.8/src/protocol/extensions.cc:207:10:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  end += sprintf(end, "7:dropped%d:", removed_len);
data/libtorrent-0.13.8/src/protocol/extensions.cc:208:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(end, removed.begin()->c_str(), removed_len);
data/libtorrent-0.13.8/src/protocol/extensions.cc:412:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(m_pending.end(), buffer + (piece << metadata_piece_shift), length);
data/libtorrent-0.13.8/src/protocol/handshake.cc:126:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  manager->poll()->open(this);
data/libtorrent-0.13.8/src/protocol/handshake.cc:148:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  manager->poll()->open(this);
data/libtorrent-0.13.8/src/protocol/handshake.cc:608:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(m_extensions->read_position(), m_readBuffer.position(), length);
data/libtorrent-0.13.8/src/protocol/handshake.cc:808:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(m_bitfield.begin(), m_readBuffer.position(), m_readPos);
data/libtorrent-0.13.8/src/protocol/handshake.cc:978:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256];
data/libtorrent-0.13.8/src/protocol/handshake.cc:999:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pad[length];
data/libtorrent-0.13.8/src/protocol/handshake.cc:1007:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hash[20];
data/libtorrent-0.13.8/src/protocol/handshake.cc:1081:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(m_peerInfo->set_options(), m_options, 8);
data/libtorrent-0.13.8/src/protocol/handshake.cc:1188:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(m_writeBuffer.end(), bitfield->begin() + m_writePos + m_writeBuffer.size_end(), length);
data/libtorrent-0.13.8/src/protocol/handshake.h:199:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_options[8];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:92:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hash[20];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:93:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char discard[1024];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:103:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hash[20];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:104:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char discard[1024];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:116:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char tmp[20];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:133:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(m_sync, vc_data, vc_length);
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:135:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hash[20];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.cc:136:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char discard[1024];
data/libtorrent-0.13.8/src/protocol/handshake_encryption.h:95:75:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  void                set_sync(const char* src, unsigned int len)  { std::memcpy(m_sync, src, (m_syncLength = len)); }
data/libtorrent-0.13.8/src/protocol/handshake_encryption.h:126:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_sync[20];
data/libtorrent-0.13.8/src/protocol/peer_connection_base.cc:186:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  manager->poll()->open(this);
data/libtorrent-0.13.8/src/protocol/peer_connection_base.cc:707:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy(m_extensions->read_position(), m_down->buffer()->position(), need);
data/libtorrent-0.13.8/src/protocol/peer_connection_base.cc:909:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[128];
data/libtorrent-0.13.8/src/protocol/peer_connection_base.h:259:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(m_down->buffer()->end(), data, size);
data/libtorrent-0.13.8/src/torrent/bitfield.cc:117:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy(m_data, bf.m_data, size_bytes());
data/libtorrent-0.13.8/src/torrent/bitfield.h:107:60:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  void                from_c_str(const char* str)   { std::memcpy(m_data, str, size_bytes()); update(); }
data/libtorrent-0.13.8/src/torrent/connection_manager.cc:181:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!m_listen->open(begin, end, m_listen_backlog, rak::socket_address::cast_from(m_bindAddress)))
data/libtorrent-0.13.8/src/torrent/data/file.cc:129:33:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!manager->file_manager()->open(this, prot, flags))
data/libtorrent-0.13.8/src/torrent/data/file_list.cc:402:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
FileList::open(int flags) {
data/libtorrent-0.13.8/src/torrent/data/file_list.cc:734:3:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  open(open_no_create);
data/libtorrent-0.13.8/src/torrent/data/file_list.h:160:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  void                open(int flags) LIBTORRENT_NO_EXPORT;
data/libtorrent-0.13.8/src/torrent/data/file_manager.cc:73:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
FileManager::open(value_type file, int prot, int flags) {
data/libtorrent-0.13.8/src/torrent/data/file_manager.cc:85:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if (!fd.open(file->frozen_path(), prot, flags)) {
data/libtorrent-0.13.8/src/torrent/data/file_manager.h:69:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  bool                open(value_type file, int prot, int flags);
data/libtorrent-0.13.8/src/torrent/data/file_utils.cc:63:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char         name[nameSize + 4];
data/libtorrent-0.13.8/src/torrent/data/file_utils.cc:65:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(name, srcPath->back().c_str(), srcPath->back().size());
data/libtorrent-0.13.8/src/torrent/data/file_utils.cc:66:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(name + srcPath->back().size(), suffix.c_str(), suffix.size());
data/libtorrent-0.13.8/src/torrent/download.cc:93:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
Download::open(int flags) {
data/libtorrent-0.13.8/src/torrent/download.cc:101:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  m_ptr->main()->open(FileList::open_no_create);
data/libtorrent-0.13.8/src/torrent/download.cc:151:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  file_list()->open(flags & ~FileList::open_no_create);
data/libtorrent-0.13.8/src/torrent/download.cc:367:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(bitfield->begin(), first, bitfield->size_bytes());
data/libtorrent-0.13.8/src/torrent/download.h:78:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  void                open(int flags = 0);
data/libtorrent-0.13.8/src/torrent/hash_string.h:90:64:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  void                assign(const value_type* src)     { std::memcpy(data(), src, size()); }
data/libtorrent-0.13.8/src/torrent/hash_string.h:103:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_data[size_data];
data/libtorrent-0.13.8/src/torrent/object.h:328:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char          t_raw_object[sizeof(raw_object)];
data/libtorrent-0.13.8/src/torrent/object.h:333:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char      t_string[sizeof(string_type)];
data/libtorrent-0.13.8/src/torrent/object.h:334:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char      t_list[sizeof(list_type)];
data/libtorrent-0.13.8/src/torrent/object.h:335:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char      t_dict_key[sizeof(dict_key_type)];
data/libtorrent-0.13.8/src/torrent/object_static_map.h:55:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char  key[max_key_size];
data/libtorrent-0.13.8/src/torrent/object_stream.cc:308:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char stack[128] = { 0 };
data/libtorrent-0.13.8/src/torrent/object_stream.cc:396:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/libtorrent-0.13.8/src/torrent/object_stream.cc:434:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy(output->pos, srcData, len);
data/libtorrent-0.13.8/src/torrent/object_stream.cc:475:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[20];
data/libtorrent-0.13.8/src/torrent/object_stream.cc:578:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/libtorrent-0.13.8/src/torrent/object_stream.cc:673:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char current_key[static_map_mapping_type::max_key_size + 2] = "";
data/libtorrent-0.13.8/src/torrent/object_stream.cc:700:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(current_key + stack_itr->next_key, raw_key.data(), raw_key.size());
data/libtorrent-0.13.8/src/torrent/peer/client_info.h:98:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_key[max_key_size];
data/libtorrent-0.13.8/src/torrent/peer/client_info.h:104:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_version[max_version_size];
data/libtorrent-0.13.8/src/torrent/peer/client_info.h:105:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_upperVersion[max_version_size];
data/libtorrent-0.13.8/src/torrent/peer/client_list.cc:137:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy(clientInfo.mutable_version(), version, ClientInfo::max_version_size);
data/libtorrent-0.13.8/src/torrent/peer/client_list.cc:142:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy(clientInfo.mutable_upper_version(), upperVersion, ClientInfo::max_version_size);
data/libtorrent-0.13.8/src/torrent/peer/client_list.cc:155:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char newKey[ClientInfo::max_key_size];
data/libtorrent-0.13.8/src/torrent/peer/client_list.cc:158:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  std::memcpy(newKey, key, ClientInfo::key_size(type));
data/libtorrent-0.13.8/src/torrent/peer/peer_info.h:132:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_id_hex[40];
data/libtorrent-0.13.8/src/torrent/peer/peer_info.h:136:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char                m_options[8];
data/libtorrent-0.13.8/src/torrent/peer/peer_list.cc:281:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char ipv4_str[INET_ADDRSTRLEN];
data/libtorrent-0.13.8/src/torrent/poll.h:70:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  virtual void        open(Event* event) = 0;
data/libtorrent-0.13.8/src/torrent/poll_epoll.cc:108:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char errmsg[1024];
data/libtorrent-0.13.8/src/torrent/poll_epoll.cc:233:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
PollEPoll::open(Event* event) {
data/libtorrent-0.13.8/src/torrent/poll_epoll.cc:349:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
void PollEPoll::open(torrent::Event* event) {}
data/libtorrent-0.13.8/src/torrent/poll_epoll.h:65:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  virtual void        open(torrent::Event* event);
data/libtorrent-0.13.8/src/torrent/poll_kqueue.cc:292:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
PollKQueue::open(Event* event) {
data/libtorrent-0.13.8/src/torrent/poll_kqueue.cc:464:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
PollKQueue::open(__UNUSED torrent::Event* event) {
data/libtorrent-0.13.8/src/torrent/poll_kqueue.h:69:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  virtual void        open(torrent::Event* event);
data/libtorrent-0.13.8/src/torrent/poll_select.cc:232:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char read_set_buffer[set_size];
data/libtorrent-0.13.8/src/torrent/poll_select.cc:233:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char write_set_buffer[set_size];
data/libtorrent-0.13.8/src/torrent/poll_select.cc:234:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char error_set_buffer[set_size];
data/libtorrent-0.13.8/src/torrent/poll_select.cc:272:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[256];
data/libtorrent-0.13.8/src/torrent/poll_select.cc:277:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((log_fd = open(buffer, O_WRONLY | O_CREAT | O_TRUNC)) == -1)
data/libtorrent-0.13.8/src/torrent/poll_select.cc:288:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
PollSelect::open(Event* event) {
data/libtorrent-0.13.8/src/torrent/poll_select.h:65:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  virtual void        open(Event* event);
data/libtorrent-0.13.8/src/torrent/torrent.cc:186:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[1024];
data/libtorrent-0.13.8/src/torrent/utils/directory_events.cc:58:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
directory_events::open() {
data/libtorrent-0.13.8/src/torrent/utils/directory_events.cc:78:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  manager->poll()->open(this);
data/libtorrent-0.13.8/src/torrent/utils/directory_events.cc:140:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[2048];
data/libtorrent-0.13.8/src/torrent/utils/directory_events.h:69:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  bool                open();
data/libtorrent-0.13.8/src/torrent/utils/log.cc:173:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[buffer_size];
data/libtorrent-0.13.8/src/torrent/utils/log.cc:392:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[64];
data/libtorrent-0.13.8/src/torrent/utils/thread_interrupt.cc:98:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[256];
data/libtorrent-0.13.8/src/tracker/tracker_http.cc:106:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char hash[61];
data/libtorrent-0.13.8/src/tracker/tracker_http.cc:127:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char localId[61];
data/libtorrent-0.13.8/src/tracker/tracker_udp.cc:172:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  manager->poll()->open(this);
data/libtorrent-0.13.8/src/utils/sha_fast.cc:122:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->B + lenB, dataIn, togo);
data/libtorrent-0.13.8/src/utils/sha_fast.cc:131:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->B, dataIn, 64);
data/libtorrent-0.13.8/src/utils/sha_fast.cc:137:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ctx->B, dataIn, len);
data/libtorrent-0.13.8/src/utils/sha_fast.cc:150:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char bulk_pad[64] = { 0x80,0,0,0,0,0,0,0,0,0,
data/libtorrent-0.13.8/src/utils/sha_fast.cc:184:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(hashout, ctx->H, SHA1_LENGTH);
data/libtorrent-0.13.8/test/data/hash_check_queue_test.cc:30:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[10];
data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc:108:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[1024];
data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc:192:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[1023];
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:61:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char raw_buffer[16];
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:88:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[1025];
data/libtorrent-0.13.8/test/torrent/object_test_utils.cc:55:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[256];
data/libtorrent-0.13.8/test/torrent/utils/log_test.cc:153:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[256];
data/libtorrent-0.13.8/rak/functional.h:106:1:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
equal(Type t, Ftor f) {
data/libtorrent-0.13.8/src/data/hash_queue.cc:111:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(id, std::mem_fun_ref(&HashQueueNode::id))) != end();
data/libtorrent-0.13.8/src/data/hash_queue.cc:123:47:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  while ((itr = std::find_if(itr, end(), rak::equal(id, std::mem_fun_ref(&HashQueueNode::id)))) != end()) {
data/libtorrent-0.13.8/src/data/hash_queue.cc:140:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(100);
data/libtorrent-0.13.8/src/dht/dht_server.cc:728:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read < 0)
data/libtorrent-0.13.8/src/dht/dht_server.cc:739:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      total += read;
data/libtorrent-0.13.8/src/dht/dht_server.cc:744:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        static_map_read_bencode(buffer, buffer + read, message);
data/libtorrent-0.13.8/src/protocol/extensions.cc:188:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return build_bencode(32, "d1:md%zu:%si%deee", strlen(message_keys[t].key), message_keys[t].key, on ? t : 0);
data/libtorrent-0.13.8/src/protocol/handshake.cc:878:57:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      m_encryption.info()->decrypt(m_readBuffer.end() - read, read);
data/libtorrent-0.13.8/src/protocol/handshake.cc:878:63:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      m_encryption.info()->decrypt(m_readBuffer.end() - read, read);
data/libtorrent-0.13.8/src/protocol/handshake_manager.cc:77:67:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::count_if(base_type::begin(), base_type::end(), rak::equal(info, std::mem_fun(&Handshake::download)));
data/libtorrent-0.13.8/src/torrent/data/block.cc:384:90:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  transfer_list_type::iterator itr = std::find_if(m_queued.begin(), m_queued.end(), rak::equal(p, std::mem_fun(&BlockTransfer::peer_info)));
data/libtorrent-0.13.8/src/torrent/data/block.cc:394:96:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  transfer_list_type::const_iterator itr = std::find_if(m_queued.begin(), m_queued.end(), rak::equal(p, std::mem_fun(&BlockTransfer::peer_info)));
data/libtorrent-0.13.8/src/torrent/data/block.cc:404:96:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  transfer_list_type::iterator itr = std::find_if(m_transfers.begin(), m_transfers.end(), rak::equal(p, std::mem_fun(&BlockTransfer::peer_info)));
data/libtorrent-0.13.8/src/torrent/data/block.cc:414:102:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  transfer_list_type::const_iterator itr = std::find_if(m_transfers.begin(), m_transfers.end(), rak::equal(p, std::mem_fun(&BlockTransfer::peer_info)));
data/libtorrent-0.13.8/src/torrent/data/transfer_list.cc:71:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(index, std::mem_fun(&BlockList::index)));
data/libtorrent-0.13.8/src/torrent/data/transfer_list.cc:76:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(index, std::mem_fun(&BlockList::index)));
data/libtorrent-0.13.8/src/torrent/download/download_manager.cc:77:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(*HashString::cast_from(hash),
data/libtorrent-0.13.8/src/torrent/download/download_manager.cc:83:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(hash, rak::on(std::mem_fun(&DownloadWrapper::info), std::mem_fun(&DownloadInfo::hash))));
data/libtorrent-0.13.8/src/torrent/download/download_manager.cc:88:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(info, std::mem_fun(&DownloadWrapper::info)));
data/libtorrent-0.13.8/src/torrent/download/download_manager.cc:93:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(cl, std::mem_fun(&DownloadWrapper::chunk_list)));
data/libtorrent-0.13.8/src/torrent/download/download_manager.cc:98:52:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  iterator itr = std::find_if(begin(), end(), rak::equal(*HashString::cast_from(hash),
data/libtorrent-0.13.8/src/torrent/download/download_manager.cc:109:52:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  iterator itr = std::find_if(begin(), end(), rak::equal(*HashString::cast_from(hash),
data/libtorrent-0.13.8/src/torrent/download/resource_manager.cc:138:52:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  iterator itr = std::find_if(begin(), end(), rak::equal(d, std::mem_fun_ref(&value_type::download)));
data/libtorrent-0.13.8/src/torrent/download/resource_manager.cc:158:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                   rak::equal(name, std::mem_fun(&choke_group::name))) != choke_base_type::end())
data/libtorrent-0.13.8/src/torrent/download/resource_manager.cc:180:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(d, std::mem_fun_ref(&value_type::download)));
data/libtorrent-0.13.8/src/torrent/download/resource_manager.cc:185:52:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  iterator itr = std::find_if(begin(), end(), rak::equal(d, std::mem_fun_ref(&value_type::download)));
data/libtorrent-0.13.8/src/torrent/download/resource_manager.cc:209:53:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                                               rak::equal(name, std::mem_fun(&choke_group::name)));
data/libtorrent-0.13.8/src/torrent/download/resource_manager.cc:220:53:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                                               rak::equal(name, std::mem_fun(&choke_group::name)));
data/libtorrent-0.13.8/src/torrent/object.h:379:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return Object::create_raw_bencode(raw_bencode(str, strlen(str)));
data/libtorrent-0.13.8/src/torrent/object_raw_bencode.h:115:81:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  static raw_bencode from_c_str(const char* str) { return raw_bencode(str, std::strlen(str)); }
data/libtorrent-0.13.8/src/torrent/object_raw_bencode.h:128:79:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  static raw_string from_c_str(const char* str) { return raw_string(str, std::strlen(str)); }
data/libtorrent-0.13.8/src/torrent/object_raw_bencode.h:140:75:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  static raw_list from_c_str(const char* str) { return raw_list(str, std::strlen(str)); }
data/libtorrent-0.13.8/src/torrent/object_raw_bencode.h:211:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return raw_bencode_equal(left, right, strlen(right));
data/libtorrent-0.13.8/src/torrent/object_static_map.h:116:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  return find_key_match(first, last, key, key + strlen(key));
data/libtorrent-0.13.8/src/torrent/peer/client_list.cc:134:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    std::strncpy(clientInfo.mutable_key(), key, ClientInfo::max_key_size);
data/libtorrent-0.13.8/src/torrent/peer/connection_list.cc:216:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  return std::find_if(begin(), end(), rak::equal(*HashString::cast_from(id),
data/libtorrent-0.13.8/src/torrent/peer/peer_list.cc:347:63:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  iterator itr = std::find_if(range.first, range.second, rak::equal(p, rak::mem_ref(&value_type::second)));
data/libtorrent-0.13.8/src/torrent/peer/peer_list.cc:350:65:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    if (std::find_if(base_type::begin(), base_type::end(), rak::equal(p, rak::mem_ref(&value_type::second))) == base_type::end())
data/libtorrent-0.13.8/src/torrent/poll_kqueue.cc:321:41:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                                   rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
data/libtorrent-0.13.8/src/torrent/poll_kqueue.cc:347:41:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                                   rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
data/libtorrent-0.13.8/src/torrent/utils/directory_events.cc:141:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int result = ::read(m_fileDesc, buffer, 2048);
data/libtorrent-0.13.8/src/torrent/utils/thread_base.cc:100:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(1000);
data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc:126:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return torrent::static_map_read_bencode(str, str + strlen(str), map) == str + strlen(str);
data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc:126:83:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return torrent::static_map_read_bencode(str, str + strlen(str), map) == str + strlen(str);
data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc:133:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    torrent::static_map_read_bencode(str, str + strlen(str), map);
data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc:375:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  map_value[key_single_a] = torrent::raw_list("1:a2:bb", strlen("1:a2:bb"));
data/libtorrent-0.13.8/test/torrent/object_static_map_test.cc:378:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  map_value[key_single_a] = torrent::raw_map("1:a2:bb", strlen("1:a2:bb"));
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:101:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      torrent::object_read_bencode_c(input, input + strlen(input), &tmp) == input + strlen(input) &&
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:101:85:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      torrent::object_read_bencode_c(input, input + strlen(input), &tmp) == input + strlen(input) &&
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:102:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      torrent::object_read_bencode_skip_c(input, input + strlen(input)) == input + strlen(input);
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:102:84:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      torrent::object_read_bencode_skip_c(input, input + strlen(input)) == input + strlen(input);
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:111:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    torrent::object_read_bencode_c(input, input + strlen(input), &tmp);
data/libtorrent-0.13.8/test/torrent/object_stream_test.cc:118:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    torrent::object_read_bencode_skip_c(input, input + strlen(input));
data/libtorrent-0.13.8/test/torrent/object_test_utils.cc:23:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const char* last = str + strlen(str);
data/libtorrent-0.13.8/test/torrent/object_test_utils.h:7:110:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
inline torrent::Object create_bencode_raw_bencode_c(const char* str) { return torrent::raw_bencode(str, std::strlen(str)); }
data/libtorrent-0.13.8/test/torrent/object_test_utils.h:8:108:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
inline torrent::Object create_bencode_raw_string_c(const char* str) { return torrent::raw_string(str, std::strlen(str)); }
data/libtorrent-0.13.8/test/torrent/object_test_utils.h:9:104:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
inline torrent::Object create_bencode_raw_list_c(const char* str) { return torrent::raw_list(str, std::strlen(str)); }
data/libtorrent-0.13.8/test/torrent/object_test_utils.h:10:102:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
inline torrent::Object create_bencode_raw_map_c(const char* str) { return torrent::raw_map(str, std::strlen(str)); }
data/libtorrent-0.13.8/test/torrent/task_manager_test.cc:35:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(10000);
data/libtorrent-0.13.8/test/torrent/task_manager_test.cc:48:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(20000);
data/libtorrent-0.13.8/test/torrent/task_manager_test.cc:68:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(10000);
data/libtorrent-0.13.8/test/torrent/task_manager_test.cc:85:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(100000);
data/libtorrent-0.13.8/test/torrent/task_manager_test.cc:95:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(5000);
data/libtorrent-0.13.8/test/torrent/task_manager_test.cc:99:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(100000);
data/libtorrent-0.13.8/test/torrent/utils/log_test.cc:27:64:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  CPPUNIT_ASSERT_MESSAGE("'" + std::string(output) + "'", std::strlen(output) == length);
data/libtorrent-0.13.8/test/torrent/utils/thread_base_test.cc:60:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(10 * 1000); // TODO: Don't just sleep, as that give up core.
data/libtorrent-0.13.8/test/torrent/utils/thread_base_test.cc:76:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(10 * 1000);
data/libtorrent-0.13.8/test/torrent/utils/thread_base_test.cc:187:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(0);

ANALYSIS SUMMARY:

Hits = 265
Lines analyzed = 56669 in approximately 1.31 seconds (43112 lines/second)
Physical Source Lines of Code (SLOC) = 32388
Hits@level = [0]  19 [1]  69 [2] 153 [3]  25 [4]  18 [5]   0
Hits@level+ = [0+] 284 [1+] 265 [2+] 196 [3+]  43 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 8.76868 [1+] 8.18204 [2+] 6.05162 [3+] 1.32765 [4+] 0.555761 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.