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/libnice-0.1.16/random/test.c Examining data/libnice-0.1.16/random/random.c Examining data/libnice-0.1.16/random/random-glib.c Examining data/libnice-0.1.16/random/random.h Examining data/libnice-0.1.16/random/random-glib.h Examining data/libnice-0.1.16/socket/socket-priv.h Examining data/libnice-0.1.16/socket/tcp-bsd.h Examining data/libnice-0.1.16/socket/socks5.c Examining data/libnice-0.1.16/socket/pseudossl.c Examining data/libnice-0.1.16/socket/pseudossl.h Examining data/libnice-0.1.16/socket/socks5.h Examining data/libnice-0.1.16/socket/tcp-active.h Examining data/libnice-0.1.16/socket/socket.h Examining data/libnice-0.1.16/socket/tcp-bsd.c Examining data/libnice-0.1.16/socket/tcp-active.c Examining data/libnice-0.1.16/socket/udp-turn-over-tcp.c Examining data/libnice-0.1.16/socket/tcp-passive.h Examining data/libnice-0.1.16/socket/udp-turn.c Examining data/libnice-0.1.16/socket/udp-turn-over-tcp.h Examining data/libnice-0.1.16/socket/http.c Examining data/libnice-0.1.16/socket/tcp-passive.c Examining data/libnice-0.1.16/socket/http.h Examining data/libnice-0.1.16/socket/socket.c Examining data/libnice-0.1.16/socket/udp-bsd.h Examining data/libnice-0.1.16/socket/udp-turn.h Examining data/libnice-0.1.16/socket/udp-bsd.c Examining data/libnice-0.1.16/agent/debug.c Examining data/libnice-0.1.16/agent/candidate.c Examining data/libnice-0.1.16/agent/discovery.c Examining data/libnice-0.1.16/agent/agent-enum-types.h Examining data/libnice-0.1.16/agent/outputstream.h Examining data/libnice-0.1.16/agent/iostream.c Examining data/libnice-0.1.16/agent/inputstream.c Examining data/libnice-0.1.16/agent/pseudotcp.h Examining data/libnice-0.1.16/agent/agent-priv.h Examining data/libnice-0.1.16/agent/pseudotcp.c Examining data/libnice-0.1.16/agent/conncheck.h Examining data/libnice-0.1.16/agent/agent.c Examining data/libnice-0.1.16/agent/component.c Examining data/libnice-0.1.16/agent/interfaces.c Examining data/libnice-0.1.16/agent/address.h Examining data/libnice-0.1.16/agent/outputstream.c Examining data/libnice-0.1.16/agent/agent-enum-types.c Examining data/libnice-0.1.16/agent/agent.h Examining data/libnice-0.1.16/agent/candidate.h Examining data/libnice-0.1.16/agent/address.c Examining data/libnice-0.1.16/agent/stream.c Examining data/libnice-0.1.16/agent/component.h Examining data/libnice-0.1.16/agent/inputstream.h Examining data/libnice-0.1.16/agent/discovery.h Examining data/libnice-0.1.16/agent/stream.h Examining data/libnice-0.1.16/agent/debug.h Examining data/libnice-0.1.16/agent/conncheck.c Examining data/libnice-0.1.16/agent/interfaces.h Examining data/libnice-0.1.16/agent/iostream.h Examining data/libnice-0.1.16/examples/sdp-example.c Examining data/libnice-0.1.16/examples/threaded-example.c Examining data/libnice-0.1.16/examples/simple-example.c Examining data/libnice-0.1.16/tests/test-fullmode.c Examining data/libnice-0.1.16/tests/test-tcp.c Examining data/libnice-0.1.16/tests/test-restart.c Examining data/libnice-0.1.16/tests/test.c Examining data/libnice-0.1.16/tests/test-io-stream-common.c Examining data/libnice-0.1.16/tests/test-pseudotcp-fuzzy.c Examining data/libnice-0.1.16/tests/test-send-recv.c Examining data/libnice-0.1.16/tests/test-pseudotcp-fin.c Examining data/libnice-0.1.16/tests/test-io-stream-cancelling.c Examining data/libnice-0.1.16/tests/test-udp-turn-fragmentation.c Examining data/libnice-0.1.16/tests/test-io-stream-closing-write.c Examining data/libnice-0.1.16/tests/test-bsd.c Examining data/libnice-0.1.16/tests/test-io-stream-closing-read.c Examining data/libnice-0.1.16/tests/test-build-io-stream.c Examining data/libnice-0.1.16/tests/test-icetcp.c Examining data/libnice-0.1.16/tests/test-io-stream-common.h Examining data/libnice-0.1.16/tests/test-thread.c Examining data/libnice-0.1.16/tests/test-io-stream-thread.c Examining data/libnice-0.1.16/tests/test-io-stream-pollable.c Examining data/libnice-0.1.16/tests/test-new-trickle.c Examining data/libnice-0.1.16/tests/test-credentials.c Examining data/libnice-0.1.16/tests/test-pseudotcp.c Examining data/libnice-0.1.16/tests/test-drop-invalid.c Examining data/libnice-0.1.16/tests/test-gstreamer.c Examining data/libnice-0.1.16/tests/test-add-remove-stream.c Examining data/libnice-0.1.16/tests/test-nomination.c Examining data/libnice-0.1.16/tests/test-trickle.c Examining data/libnice-0.1.16/tests/test-fallback.c Examining data/libnice-0.1.16/tests/test-priority.c Examining data/libnice-0.1.16/tests/test-different-number-streams.c Examining data/libnice-0.1.16/tests/test-address.c Examining data/libnice-0.1.16/tests/test-socket-is-based-on.c Examining data/libnice-0.1.16/tests/test-turn.c Examining data/libnice-0.1.16/stun/stunagent.h Examining data/libnice-0.1.16/stun/debug.c Examining data/libnice-0.1.16/stun/stunmessage.h Examining data/libnice-0.1.16/stun/stunmessage.c Examining data/libnice-0.1.16/stun/stuncrc32.h Examining data/libnice-0.1.16/stun/stuncrc32.c Examining data/libnice-0.1.16/stun/tests/test-format.c Examining data/libnice-0.1.16/stun/tests/test-bind.c Examining data/libnice-0.1.16/stun/tests/test-conncheck.c Examining data/libnice-0.1.16/stun/tests/test-parse.c Examining data/libnice-0.1.16/stun/tests/test-hmac.c Examining data/libnice-0.1.16/stun/stunhmac.h Examining data/libnice-0.1.16/stun/usages/ice.c Examining data/libnice-0.1.16/stun/usages/turn.h Examining data/libnice-0.1.16/stun/usages/bind.c Examining data/libnice-0.1.16/stun/usages/bind.h Examining data/libnice-0.1.16/stun/usages/timer.h Examining data/libnice-0.1.16/stun/usages/turn.c Examining data/libnice-0.1.16/stun/usages/timer.c Examining data/libnice-0.1.16/stun/usages/ice.h Examining data/libnice-0.1.16/stun/utils.h Examining data/libnice-0.1.16/stun/constants.h Examining data/libnice-0.1.16/stun/rand.c Examining data/libnice-0.1.16/stun/utils.c Examining data/libnice-0.1.16/stun/stunhmac.c Examining data/libnice-0.1.16/stun/rand.h Examining data/libnice-0.1.16/stun/stunagent.c Examining data/libnice-0.1.16/stun/tools/stund.c Examining data/libnice-0.1.16/stun/tools/stunbdc.c Examining data/libnice-0.1.16/stun/tools/stund.h Examining data/libnice-0.1.16/stun/debug.h Examining data/libnice-0.1.16/stun/win32_common.h Examining data/libnice-0.1.16/stun/stun5389.h Examining data/libnice-0.1.16/stun/stun5389.c Examining data/libnice-0.1.16/nice/nice.h Examining data/libnice-0.1.16/gst/gstnice.h Examining data/libnice-0.1.16/gst/gstnicesink.h Examining data/libnice-0.1.16/gst/gstnicesrc.c Examining data/libnice-0.1.16/gst/gstnicesink.c Examining data/libnice-0.1.16/gst/gstnicesrc.h Examining data/libnice-0.1.16/gst/gstnice.c FINAL RESULTS: data/libnice-0.1.16/stun/debug.c:71:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, format, ap); data/libnice-0.1.16/stun/debug.c:101:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (bytes, prefix); data/libnice-0.1.16/stun/tests/test-format.c:63:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, msg, ap); data/libnice-0.1.16/stun/tests/test-parse.c:65:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, msg, ap); data/libnice-0.1.16/random/random-glib.c:66:14: [3] (random) g_random_int_range: 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. buf[i] = g_random_int_range (0, 256); data/libnice-0.1.16/random/random-glib.c:77:10: [3] (random) g_random_int_range: 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. return g_random_int_range (low, high); data/libnice-0.1.16/tests/test-fallback.c:539:17: [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. stun_server = getenv ("NICE_STUN_SERVER"); data/libnice-0.1.16/tests/test-fallback.c:540:22: [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. stun_server_port = getenv ("NICE_STUN_SERVER_PORT"); data/libnice-0.1.16/tests/test-fullmode.c:939:17: [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. stun_server = getenv ("NICE_STUN_SERVER"); data/libnice-0.1.16/tests/test-fullmode.c:940:22: [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. stun_server_port = getenv ("NICE_STUN_SERVER_PORT"); data/libnice-0.1.16/tests/test-pseudotcp-fuzzy.c:254:7: [3] (random) g_rand_double: 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. U = g_rand_double (prng); /* step 1 */ data/libnice-0.1.16/tests/test-pseudotcp-fuzzy.c:288:19: [3] (random) g_rand_int_range: 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. guint32 pos = g_rand_int_range (prng, 0, MIN (len, HEADER_LENGTH)); data/libnice-0.1.16/tests/test-pseudotcp-fuzzy.c:290:16: [3] (random) g_rand_int_range: 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. buf[pos] = g_rand_int_range (prng, 0, G_MAXUINT8 + 1); data/libnice-0.1.16/tests/test-restart.c:466:17: [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. stun_server = getenv ("NICE_STUN_SERVER"); data/libnice-0.1.16/tests/test-restart.c:467:22: [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. stun_server_port = getenv ("NICE_STUN_SERVER_PORT"); data/libnice-0.1.16/tests/test-send-recv.c:206:12: [3] (random) g_rand_int_range: 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. return g_rand_int_range (grand, 1, 1 << 16); data/libnice-0.1.16/tests/test-send-recv.c:228:12: [3] (random) g_rand_int_range: 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. return g_rand_int_range (grand, 1, 100 + 1); data/libnice-0.1.16/tests/test-send-recv.c:250:12: [3] (random) g_rand_int_range: 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. return g_rand_int_range (grand, 1, 100 + 1); data/libnice-0.1.16/tests/test-thread.c:262:17: [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. stun_server = getenv ("NICE_STUN_SERVER"); data/libnice-0.1.16/tests/test-thread.c:263:22: [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. stun_server_port = getenv ("NICE_STUN_SERVER_PORT"); data/libnice-0.1.16/tests/test-turn.c:358:22: [3] (random) g_random_int_range: 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. global_turn_port = g_random_int_range (10000, 60000); data/libnice-0.1.16/tests/test-udp-turn-fragmentation.c:50:22: [3] (random) g_rand_int_range: 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. gsize msg_size = g_rand_int_range (randg, 0, G_MAXUINT16); data/libnice-0.1.16/tests/test-udp-turn-fragmentation.c:58:41: [3] (random) g_rand_int: 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. ((guint8 *)msg_data->buffer)[j] = g_rand_int(randg); data/libnice-0.1.16/tests/test-udp-turn-fragmentation.c:81:22: [3] (random) g_rand_int_range: 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. gsize msg_size = g_rand_int_range (randg, 0, G_MAXUINT16) + sizeof (guint16); data/libnice-0.1.16/agent/address.c:72: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(&in.sin_addr, src, sizeof(struct in_addr)); data/libnice-0.1.16/agent/address.c:80: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(&in.sin6_addr, src, sizeof(struct in_addr6)); data/libnice-0.1.16/agent/address.c:127: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 (addr->s.ip6.sin6_addr.s6_addr, addr_ipv6, 16); data/libnice-0.1.16/agent/address.c:228: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 (sa.in, &addr->s.ip4, sizeof (*sa.in)); data/libnice-0.1.16/agent/address.c:231: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 (sa.in6, &addr->s.ip6, sizeof (*sa.in6)); data/libnice-0.1.16/agent/agent.c:4182: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 (buffer + offset, message->buffers[i].buffer, len); data/libnice-0.1.16/agent/agent.c:4228: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 (message->buffers[i].buffer, buffer, len); data/libnice-0.1.16/agent/agent.c:4411: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 ((guint8 *) buffer->buffer + iter->offset, data/libnice-0.1.16/agent/agent.c:4600: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 (&prev_recv_messages_iter, &component->recv_messages_iter, data/libnice-0.1.16/agent/candidate.c:355: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, candidate, sizeof(NiceCandidate)); data/libnice-0.1.16/agent/component.c:1529: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 str[INET6_ADDRSTRLEN]; data/libnice-0.1.16/agent/conncheck.c:1286: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 (fingerprint_attr, &fingerprint_orig, sizeof (fingerprint_orig)); data/libnice-0.1.16/agent/conncheck.c:2302: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 (dest, remote, remote_len); data/libnice-0.1.16/agent/conncheck.c:2304: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 (dest + len, ":", 1); data/libnice-0.1.16/agent/conncheck.c:2306: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 (dest + len, local, local_len); data/libnice-0.1.16/agent/conncheck.c:2311: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 (dest, remote, remote_len); data/libnice-0.1.16/agent/conncheck.c:2313: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 (dest + len, ":", 1); data/libnice-0.1.16/agent/conncheck.c:2315: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 (dest + len, local, local_len); data/libnice-0.1.16/agent/conncheck.c:2323: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 (dest, remote, remote_len); data/libnice-0.1.16/agent/conncheck.c:2325: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 (dest + len, local, local_len); data/libnice-0.1.16/agent/conncheck.c:2348:9: [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 (dest, remote_decoded, remote_decoded_len); data/libnice-0.1.16/agent/conncheck.c:2350:9: [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 (dest + len, ":", 1); data/libnice-0.1.16/agent/conncheck.c:2352:9: [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 (dest + len, component_str, strlen (component_str)); data/libnice-0.1.16/agent/conncheck.c:2355:9: [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 (dest + len, ":", 1); data/libnice-0.1.16/agent/conncheck.c:2358:9: [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 (dest + len, local_decoded, local_decoded_len); data/libnice-0.1.16/agent/conncheck.c:2360:9: [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 (dest + len, ":", 1); data/libnice-0.1.16/agent/conncheck.c:2362:9: [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 (dest + len, component_str, strlen (component_str));; data/libnice-0.1.16/agent/conncheck.c:2366:11: [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 (dest + len, pad_char, 1); data/libnice-0.1.16/agent/conncheck.c:3422: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 (&cand->stun_agent, &cdisco->stun_agent, sizeof(StunAgent)); data/libnice-0.1.16/agent/conncheck.c:3428: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(&cand->stun_resp_msg, &cdisco->stun_resp_msg, sizeof(StunMessage)); data/libnice-0.1.16/agent/conncheck.c:3693:15: [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 (d->stun_resp_buffer, resp->buffer, data/libnice-0.1.16/agent/conncheck.c:3783:15: [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 (cand->stun_resp_buffer, resp->buffer, data/libnice-0.1.16/agent/conncheck.c:3971: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 (&nom_value, value, 4); data/libnice-0.1.16/agent/conncheck.c:4250:4: [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 (username, uname, MIN (uname_len, username_len)); data/libnice-0.1.16/agent/discovery.c:966: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(new_username, decoded_local, local_size); data/libnice-0.1.16/agent/discovery.c:967: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(new_username + local_size, decoded_remote, remote_size); data/libnice-0.1.16/agent/discovery.c:1067: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(new_username, decoded_remote, remote_size); data/libnice-0.1.16/agent/discovery.c:1068: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(new_username + remote_size, decoded_local, local_size); data/libnice-0.1.16/agent/interfaces.c:81: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 addr_as_string[INET6_ADDRSTRLEN+1]; data/libnice-0.1.16/agent/pseudotcp.c:317: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 (buffer, &b->buffer[b->read_position], tail_copy); data/libnice-0.1.16/agent/pseudotcp.c:318: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 (buffer + tail_copy, &b->buffer[0], copy - tail_copy); data/libnice-0.1.16/agent/pseudotcp.c:364: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(buffer, &b->buffer[read_position], tail_copy); data/libnice-0.1.16/agent/pseudotcp.c:365: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(buffer + tail_copy, &b->buffer[0], copy - tail_copy); data/libnice-0.1.16/agent/pseudotcp.c:384: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(&b->buffer[write_position], buffer, tail_copy); data/libnice-0.1.16/agent/pseudotcp.c:385: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(&b->buffer[0], buffer + tail_copy, copy - tail_copy); data/libnice-0.1.16/examples/sdp-example.c:89:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). stun_port = atoi(argv[3]); data/libnice-0.1.16/examples/simple-example.c:99:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). stun_port = atoi(argv[3]); data/libnice-0.1.16/examples/simple-example.c:316:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cand->priority = atoi (tokens[1]); data/libnice-0.1.16/examples/simple-example.c:325:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). nice_address_set_port(&cand->addr, atoi (tokens[3])); data/libnice-0.1.16/examples/threaded-example.c:98:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). stun_port = atoi(argv[3]); data/libnice-0.1.16/examples/threaded-example.c:338:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cand->priority = atoi (tokens[1]); data/libnice-0.1.16/examples/threaded-example.c:347:38: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). nice_address_set_port(&cand->addr, atoi (tokens[3])); data/libnice-0.1.16/gst/gstnicesrc.c:206: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 (GST_BUFFER_DATA (buffer), buf, len); data/libnice-0.1.16/socket/http.c:226: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 (buffer, priv->recv_buf + priv->recv_buf_pos, len); data/libnice-0.1.16/socket/http.c:233: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 (buffer, priv->recv_buf, len); data/libnice-0.1.16/socket/http.c:237: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 (buffer, priv->recv_buf + priv->recv_buf_pos, len); data/libnice-0.1.16/socket/socket.c:331: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 (tbs->buf + offset, buffer->buffer, len); data/libnice-0.1.16/socket/socket.c:382: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 (tbs->buf + offset, (guint8 *) buffer->buffer + message_offset, len); data/libnice-0.1.16/socket/socks5.c:238:19: [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 (msg + len, priv->username, ulen); /* Username */ data/libnice-0.1.16/socket/socks5.c:242:19: [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 (msg + len, priv->password, plen); /* Password */ data/libnice-0.1.16/socket/socks5.c:391: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 (msg + len, &(&name.in)->sin_addr, 4); data/libnice-0.1.16/socket/socks5.c:394: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 (msg + len, &(&name.in)->sin_port, 2); data/libnice-0.1.16/socket/socks5.c:399: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 (msg + len, &(&name.in6)->sin6_addr, 16); data/libnice-0.1.16/socket/socks5.c:402: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 (msg + len, &(&name.in6)->sin6_port, 2); data/libnice-0.1.16/socket/udp-turn-over-tcp.c:339:13: [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 (&cookie.u8, buf + MAGIC_COOKIE_OFFSET - buf_offset, data/libnice-0.1.16/socket/udp-turn.c:552: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(buf.buf8, ms_connection_id, 20); data/libnice-0.1.16/socket/udp-turn.c:826:9: [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, &channel16, sizeof(uint16_t)); data/libnice-0.1.16/socket/udp-turn.c:827:9: [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 + sizeof(uint16_t), &len16, sizeof(uint16_t)); data/libnice-0.1.16/socket/udp-turn.c:840:11: [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 + sizeof (uint32_t) + message_offset, data/libnice-0.1.16/socket/udp-turn.c:2245: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(priv->ms_realm, realm, alen); data/libnice-0.1.16/socket/udp-turn.c:2262: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 (priv->ms_connection_id, ms_seq_num, 20); data/libnice-0.1.16/stun/debug.c:102:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (bytes + prefix_len, "0x"); data/libnice-0.1.16/stun/debug.c:106:26: [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. k = ((const unsigned char *)data)[i]; data/libnice-0.1.16/stun/stun5389.c:56:14: [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 char utf8_skip_data[256] = { data/libnice-0.1.16/stun/stunagent.c:289:9: [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 (msg->long_term_key, md5, sizeof(md5)); data/libnice-0.1.16/stun/stunagent.c:398: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 (msg->buffer + STUN_MESSAGE_TRANS_ID_POS, &cookie, sizeof (cookie)); data/libnice-0.1.16/stun/stunagent.c:432: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 (msg->buffer + STUN_MESSAGE_TRANS_ID_POS, &cookie, sizeof (cookie)); data/libnice-0.1.16/stun/stunagent.c:586: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 (md5, msg->long_term_key, sizeof(msg->long_term_key)); data/libnice-0.1.16/stun/stunagent.c:664: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 (ptr, &fpr, sizeof (fpr)); data/libnice-0.1.16/stun/stunagent.c:675: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 (agent->sent_ids[saved_id_idx].long_term_key, msg->long_term_key, data/libnice-0.1.16/stun/stunhmac.c:167:14: [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 md5[16]) data/libnice-0.1.16/stun/stunhmac.h:63:14: [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 md5[16]); data/libnice-0.1.16/stun/stunmessage.c:69: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 (msg->buffer + STUN_MESSAGE_TRANS_ID_POS, data/libnice-0.1.16/stun/stunmessage.c:219: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 (buf, ptr, len); data/libnice-0.1.16/stun/stunmessage.c:256:9: [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 (&ip4->sin_port, ptr + 2, 2); data/libnice-0.1.16/stun/stunmessage.c:257:9: [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 (&ip4->sin_addr, ptr + 4, 4); data/libnice-0.1.16/stun/stunmessage.c:276:9: [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 (&ip6->sin6_port, ptr + 2, 2); data/libnice-0.1.16/stun/stunmessage.c:277:9: [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 (&ip6->sin6_addr, ptr + 4, 16); data/libnice-0.1.16/stun/stunmessage.c:382: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 (ptr, data, len); data/libnice-0.1.16/stun/stunmessage.c:477: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 (ptr + 2, &port, 2); data/libnice-0.1.16/stun/stunmessage.c:478: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 (ptr + 4, pa, alen); data/libnice-0.1.16/stun/stunmessage.c:493: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 (&tmpaddr, addr, addrlen); data/libnice-0.1.16/stun/stunmessage.c:515: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 (&tmpaddr, addr, addrlen); data/libnice-0.1.16/stun/stunmessage.c:540: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 (ptr + 4, str, len); data/libnice-0.1.16/stun/stunmessage.c:670: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 (id, msg->buffer + STUN_MESSAGE_TRANS_ID_POS, STUN_MESSAGE_TRANS_ID_LEN); data/libnice-0.1.16/stun/stunmessage.c:724: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 phrase[32]; data/libnice-0.1.16/stun/tests/test-format.c:109: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 (msg2.buffer, msg->buffer, sizeof(buf) > msg->buffer_len ? msg->buffer_len : sizeof(buf)); data/libnice-0.1.16/stun/tests/test-parse.c:365: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 str[STUN_MAX_STR]; data/libnice-0.1.16/stun/tools/stunbdc.c:67: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 hostbuf[NI_MAXHOST], servbuf[NI_MAXSERV]; data/libnice-0.1.16/stun/tools/stund.c:309:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). port = atoi (arg); data/libnice-0.1.16/stun/usages/bind.c:236: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 (&tr->dst, srv, srvlen); data/libnice-0.1.16/stun/usages/ice.c:117: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(buf, candidate_identifier, identifier_len); data/libnice-0.1.16/tests/test-fallback.c:543:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (lagent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-fallback.c:545:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (ragent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-fullmode.c:943:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (lagent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-fullmode.c:945:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (ragent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-fullmode.c:971:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_assert (stun_server_port == NULL || port == (guint)atoi (stun_server_port)); data/libnice-0.1.16/tests/test-io-stream-common.c:293:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). "stun-server-port", atoi (stun_server_port), data/libnice-0.1.16/tests/test-io-stream-common.c:531: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 (buf, "Done", buf_len); data/libnice-0.1.16/tests/test-pseudotcp-fuzzy.c:324: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 (data->buffer, buffer, len); data/libnice-0.1.16/tests/test-pseudotcp-fuzzy.c:423:10: [2] (misc) fopen: 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). in = fopen (argv[1], "r"); data/libnice-0.1.16/tests/test-pseudotcp-fuzzy.c:424:11: [2] (misc) fopen: 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). out = fopen (argv[2], "w"); data/libnice-0.1.16/tests/test-pseudotcp.c:202: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 (data->buffer, buffer, len); data/libnice-0.1.16/tests/test-pseudotcp.c:279:10: [2] (misc) fopen: 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). in = fopen (argv[1], "r"); data/libnice-0.1.16/tests/test-pseudotcp.c:280:11: [2] (misc) fopen: 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). out = fopen (argv[2], "w"); data/libnice-0.1.16/tests/test-restart.c:470:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (lagent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-restart.c:472:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (ragent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-thread.c:266:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (lagent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-thread.c:268:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_object_set (G_OBJECT (ragent), "stun-server-port", atoi (stun_server_port), NULL); data/libnice-0.1.16/tests/test-thread.c:281:58: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). g_assert (stun_server_port == NULL || port == (guint)atoi (stun_server_port)); data/libnice-0.1.16/tests/test-udp-turn-fragmentation.c:88: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 (priv->send_buffer + j, (guint8 *)msg->buffer + priv->offset, data/libnice-0.1.16/agent/conncheck.c:1532:27: [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). username_len = (size_t) strlen (cand->candidate->turn->username); data/libnice-0.1.16/agent/conncheck.c:1534:27: [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). password_len = (size_t) strlen (cand->candidate->turn->password); data/libnice-0.1.16/agent/conncheck.c:2296:22: [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). gsize remote_len = strlen (remote); data/libnice-0.1.16/agent/conncheck.c:2297:21: [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). gsize local_len = strlen (local); data/libnice-0.1.16/agent/conncheck.c:2341:66: [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). total_len = remote_decoded_len + local_decoded_len + 3 + 2*strlen (component_str); data/libnice-0.1.16/agent/conncheck.c:2352:44: [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). memcpy (dest + len, component_str, strlen (component_str)); data/libnice-0.1.16/agent/conncheck.c:2353:16: [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). len += strlen (component_str); data/libnice-0.1.16/agent/conncheck.c:2362:44: [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). memcpy (dest + len, component_str, strlen (component_str));; data/libnice-0.1.16/agent/conncheck.c:2363:16: [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). len += strlen (component_str); data/libnice-0.1.16/agent/conncheck.c:2437:12: [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 strlen (remote->password); data/libnice-0.1.16/agent/conncheck.c:2442:12: [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 strlen (stream->remote_password); data/libnice-0.1.16/agent/conncheck.c:3903:24: [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). ufrag_len = ufrag? strlen (ufrag) : 0; data/libnice-0.1.16/agent/conncheck.c:3927:25: [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). *password_len = strlen (pass); data/libnice-0.1.16/agent/discovery.c:245:27: [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). username_len = (size_t) strlen (cand->candidate->turn->username); data/libnice-0.1.16/agent/discovery.c:247:27: [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). password_len = (size_t) strlen (cand->candidate->turn->password); data/libnice-0.1.16/agent/discovery.c:1150:32: [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). gsize username_len = strlen (cand->turn->username); data/libnice-0.1.16/agent/discovery.c:1152:32: [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). gsize password_len = strlen (cand->turn->password); data/libnice-0.1.16/agent/interfaces.c:648:11: [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). if (strlen (interface_name) == strlen (tmp_str) && data/libnice-0.1.16/agent/interfaces.c:648:38: [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). if (strlen (interface_name) == strlen (tmp_str) && data/libnice-0.1.16/agent/interfaces.c:649: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). g_ascii_strncasecmp (interface_name, tmp_str, strlen (interface_name)) == 0) { data/libnice-0.1.16/examples/sdp-example.c:175: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). sdp64 = g_base64_encode ((const guchar *)sdp, strlen (sdp)); data/libnice-0.1.16/examples/sdp-example.c:224:44: [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). nice_agent_send(agent, stream_id, 1, strlen(line), line); data/libnice-0.1.16/examples/simple-example.c:257:42: [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). nice_agent_send(agent, stream_id, 1, strlen(line), line); data/libnice-0.1.16/examples/simple-example.c:314:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cand->foundation, tokens[0], NICE_CANDIDATE_MAX_FOUNDATION); data/libnice-0.1.16/examples/simple-example.c:394:9: [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). if (strlen (line_argv[i]) == 0) data/libnice-0.1.16/examples/threaded-example.c:239:44: [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). nice_agent_send(agent, stream_id, 1, strlen(line), line); data/libnice-0.1.16/examples/threaded-example.c:336:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cand->foundation, tokens[0], NICE_CANDIDATE_MAX_FOUNDATION); data/libnice-0.1.16/examples/threaded-example.c:416:9: [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). if (strlen (line_argv[i]) == 0) data/libnice-0.1.16/random/random.c:130: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). buf[i] = chars[nice_rng_generate_int (rng, 0, strlen (chars))]; data/libnice-0.1.16/socket/http.c:147:61: [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). gchar * auth = g_base64_encode ((guchar *)userpass, strlen (userpass)); data/libnice-0.1.16/socket/http.c:165:25: [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). local_bufs.size = strlen (msg); data/libnice-0.1.16/socket/socks5.c:222:26: [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). ulen = strlen (priv->username); data/libnice-0.1.16/socket/socks5.c:229:27: [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). plen = strlen (priv->password); data/libnice-0.1.16/socket/udp-turn.c:240:34: [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). priv->username_len = (gsize) strlen (username); data/libnice-0.1.16/socket/udp-turn.c:246:36: [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). priv->password_len = (gsize) strlen (password); data/libnice-0.1.16/socket/udp-turn.c:569:9: [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). strlen((char *)realm)); data/libnice-0.1.16/stun/debug.c:90:23: [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). size_t prefix_len = strlen (prefix); data/libnice-0.1.16/stun/stunmessage.c:419: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). return stun_message_append_bytes (msg, type, str, strlen (str)); data/libnice-0.1.16/stun/stunmessage.c:531:16: [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). size_t len = strlen (str); data/libnice-0.1.16/stun/tests/test-conncheck.c:87:22: [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). size_t ufrag_len = strlen ((char*) ufrag); data/libnice-0.1.16/stun/tests/test-conncheck.c:88:21: [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). size_t pass_len = strlen ((char*) pass); data/libnice-0.1.16/stun/tests/test-conncheck.c:96: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). {(uint8_t *) username, strlen (username), pass, pass_len}, data/libnice-0.1.16/stun/tests/test-format.c:77:23: [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). if (username_len != strlen ((char *) usr) || data/libnice-0.1.16/stun/tests/test-format.c:78:30: [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). memcmp (username, usr, strlen ((char *) usr)) != 0) data/libnice-0.1.16/stun/tests/test-format.c:82:19: [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). *password_len = strlen ((char *) pwd); data/libnice-0.1.16/stun/tests/test-format.c:122:55: [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). len = stun_agent_finish_message (agent, &msg2, pwd, strlen ((char *) pwd)); data/libnice-0.1.16/stun/tests/test-format.c:257: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). if (stun_agent_finish_message (&agent, &msg, pwd, strlen ((char *) pwd)) != 0) data/libnice-0.1.16/stun/tests/test-hmac.c:66:19: [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). stun_sha1 (str, strlen ((const char *) str), msg_len, hmac, data/libnice-0.1.16/stun/tests/test-hmac.c:67:19: [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). key, strlen ((const char *) key), TRUE /* padding */); data/libnice-0.1.16/stun/tests/test-parse.c:299:19: [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). *password_len = strlen ((char *) pwd); data/libnice-0.1.16/stun/tests/test-parse.c:465:23: [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). if (username_len != strlen (vector_username) || data/libnice-0.1.16/stun/tests/test-parse.c:466:42: [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). memcmp (username, vector_username, strlen (vector_username)) != 0) data/libnice-0.1.16/stun/tests/test-parse.c:470:19: [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). *password_len = strlen ((char *) vector_password); data/libnice-0.1.16/stun/tests/test-parse.c:641:7: [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). strlen ((char *) vector_password)); data/libnice-0.1.16/stun/tests/test-parse.c:716: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). stun_hash_creds ((uint8_t *) "realm", strlen ("realm"), data/libnice-0.1.16/stun/tests/test-parse.c:717: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). (uint8_t *) "user", strlen ("user"), data/libnice-0.1.16/stun/tests/test-parse.c:718:27: [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). (uint8_t *) "pass", strlen ("pass"), md5); data/libnice-0.1.16/stun/usages/ice.c:105:29: [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). size_t identifier_len = strlen(candidate_identifier); data/libnice-0.1.16/tests/test-fallback.c:224:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy (cdes.foundation, "1"); data/libnice-0.1.16/tests/test-fallback.c:359:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy (cdes.foundation, "1"); data/libnice-0.1.16/tests/test-io-stream-common.c:530:15: [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). buf_len = strlen ("Done"); data/libnice-0.1.16/tests/test-io-stream-common.c:540:31: [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). g_assert_cmpint (len, ==, strlen ("Done")); data/libnice-0.1.16/tests/test-io-stream-common.c:541:43: [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). g_assert_cmpint (memcmp (buf, "Done", strlen ("Done")), ==, 0); data/libnice-0.1.16/tests/test-restart.c:212:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy (cdes.foundation, "1"); ANALYSIS SUMMARY: Hits = 209 Lines analyzed = 57102 in approximately 1.59 seconds (35993 lines/second) Physical Source Lines of Code (SLOC) = 35453 Hits@level = [0] 89 [1] 64 [2] 121 [3] 20 [4] 4 [5] 0 Hits@level+ = [0+] 298 [1+] 209 [2+] 145 [3+] 24 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 8.40549 [1+] 5.89513 [2+] 4.08992 [3+] 0.676953 [4+] 0.112825 [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.