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/bird2-2.0.7/test/birdtest.c Examining data/bird2-2.0.7/test/bt-utils.h Examining data/bird2-2.0.7/test/birdtest.h Examining data/bird2-2.0.7/test/bt-utils.c Examining data/bird2-2.0.7/lib/printf.c Examining data/bird2-2.0.7/lib/strtoul.c Examining data/bird2-2.0.7/lib/sha256.h Examining data/bird2-2.0.7/lib/patmatch_test.c Examining data/bird2-2.0.7/lib/flowspec.h Examining data/bird2-2.0.7/lib/mempool.c Examining data/bird2-2.0.7/lib/lists.h Examining data/bird2-2.0.7/lib/tbf.c Examining data/bird2-2.0.7/lib/ip_test.c Examining data/bird2-2.0.7/lib/net.c Examining data/bird2-2.0.7/lib/checksum_test.c Examining data/bird2-2.0.7/lib/unaligned.h Examining data/bird2-2.0.7/lib/buffer_test.c Examining data/bird2-2.0.7/lib/socket.h Examining data/bird2-2.0.7/lib/slists.c Examining data/bird2-2.0.7/lib/event.c Examining data/bird2-2.0.7/lib/fletcher16.h Examining data/bird2-2.0.7/lib/hash_test.c Examining data/bird2-2.0.7/lib/macro.h Examining data/bird2-2.0.7/lib/sha512.h Examining data/bird2-2.0.7/lib/resource.h Examining data/bird2-2.0.7/lib/xmalloc.c Examining data/bird2-2.0.7/lib/sha256.c Examining data/bird2-2.0.7/lib/mac.c Examining data/bird2-2.0.7/lib/bitops.c Examining data/bird2-2.0.7/lib/ip.h Examining data/bird2-2.0.7/lib/ip.c Examining data/bird2-2.0.7/lib/checksum.c Examining data/bird2-2.0.7/lib/checksum.h Examining data/bird2-2.0.7/lib/bitops.h Examining data/bird2-2.0.7/lib/heap_test.c Examining data/bird2-2.0.7/lib/net.h Examining data/bird2-2.0.7/lib/flowspec.c Examining data/bird2-2.0.7/lib/fletcher16_test.c Examining data/bird2-2.0.7/lib/sha1.h Examining data/bird2-2.0.7/lib/flowspec_test.c Examining data/bird2-2.0.7/lib/timer.h Examining data/bird2-2.0.7/lib/printf_test.c Examining data/bird2-2.0.7/lib/event_test.c Examining data/bird2-2.0.7/lib/hash.h Examining data/bird2-2.0.7/lib/buffer.h Examining data/bird2-2.0.7/lib/alloca.h Examining data/bird2-2.0.7/lib/resource.c Examining data/bird2-2.0.7/lib/lists_test.c Examining data/bird2-2.0.7/lib/idm.h Examining data/bird2-2.0.7/lib/md5.c Examining data/bird2-2.0.7/lib/slist_test.c Examining data/bird2-2.0.7/lib/event.h Examining data/bird2-2.0.7/lib/mac.h Examining data/bird2-2.0.7/lib/mac_test.c Examining data/bird2-2.0.7/lib/lists.c Examining data/bird2-2.0.7/lib/md5.h Examining data/bird2-2.0.7/lib/patmatch.c Examining data/bird2-2.0.7/lib/idm.c Examining data/bird2-2.0.7/lib/string.h Examining data/bird2-2.0.7/lib/timer.c Examining data/bird2-2.0.7/lib/slists.h Examining data/bird2-2.0.7/lib/birdlib.h Examining data/bird2-2.0.7/lib/sha1.c Examining data/bird2-2.0.7/lib/bitops_test.c Examining data/bird2-2.0.7/lib/sha512.c Examining data/bird2-2.0.7/lib/heap.h Examining data/bird2-2.0.7/lib/slab.c Examining data/bird2-2.0.7/conf/conf.h Examining data/bird2-2.0.7/conf/conf.c Examining data/bird2-2.0.7/client/client.c Examining data/bird2-2.0.7/client/client.h Examining data/bird2-2.0.7/client/util.c Examining data/bird2-2.0.7/client/commands.c Examining data/bird2-2.0.7/client/birdcl.c Examining data/bird2-2.0.7/client/birdc.c Examining data/bird2-2.0.7/sysdep/cf/linux.h Examining data/bird2-2.0.7/sysdep/cf/bsd.h Examining data/bird2-2.0.7/sysdep/config.h Examining data/bird2-2.0.7/sysdep/unix/krt.c Examining data/bird2-2.0.7/sysdep/unix/unix.h Examining data/bird2-2.0.7/sysdep/unix/log.c Examining data/bird2-2.0.7/sysdep/unix/random.c Examining data/bird2-2.0.7/sysdep/unix/io.c Examining data/bird2-2.0.7/sysdep/unix/krt.h Examining data/bird2-2.0.7/sysdep/unix/main.c Examining data/bird2-2.0.7/sysdep/unix/endian.h Examining data/bird2-2.0.7/sysdep/bsd/krt-sys.h Examining data/bird2-2.0.7/sysdep/bsd/setkey.h Examining data/bird2-2.0.7/sysdep/bsd/sysio.h Examining data/bird2-2.0.7/sysdep/bsd/krt-sock.c Examining data/bird2-2.0.7/sysdep/linux/netlink.c Examining data/bird2-2.0.7/sysdep/linux/syspriv.h Examining data/bird2-2.0.7/sysdep/linux/krt-sys.h Examining data/bird2-2.0.7/sysdep/linux/sysio.h Examining data/bird2-2.0.7/nest/attrs.h Examining data/bird2-2.0.7/nest/password.c Examining data/bird2-2.0.7/nest/a-set_test.c Examining data/bird2-2.0.7/nest/rt-attr.c Examining data/bird2-2.0.7/nest/locks.h Examining data/bird2-2.0.7/nest/cmds.h Examining data/bird2-2.0.7/nest/a-path.c Examining data/bird2-2.0.7/nest/rt-dev.c Examining data/bird2-2.0.7/nest/iface.c Examining data/bird2-2.0.7/nest/cmds.c Examining data/bird2-2.0.7/nest/rt-table.c Examining data/bird2-2.0.7/nest/bfd.h Examining data/bird2-2.0.7/nest/proto-hooks.c Examining data/bird2-2.0.7/nest/rt-fib.c Examining data/bird2-2.0.7/nest/a-set.c Examining data/bird2-2.0.7/nest/route.h Examining data/bird2-2.0.7/nest/a-path_test.c Examining data/bird2-2.0.7/nest/rt-dev.h Examining data/bird2-2.0.7/nest/neighbor.c Examining data/bird2-2.0.7/nest/bird.h Examining data/bird2-2.0.7/nest/proto.c Examining data/bird2-2.0.7/nest/cli.c Examining data/bird2-2.0.7/nest/cli.h Examining data/bird2-2.0.7/nest/rt-show.c Examining data/bird2-2.0.7/nest/password.h Examining data/bird2-2.0.7/nest/locks.c Examining data/bird2-2.0.7/nest/iface.h Examining data/bird2-2.0.7/nest/protocol.h Examining data/bird2-2.0.7/filter/f-inst.h Examining data/bird2-2.0.7/filter/filter_test.c Examining data/bird2-2.0.7/filter/f-inst.c Examining data/bird2-2.0.7/filter/trie_test.c Examining data/bird2-2.0.7/filter/trie.c Examining data/bird2-2.0.7/filter/tree.c Examining data/bird2-2.0.7/filter/filter.h Examining data/bird2-2.0.7/filter/data.h Examining data/bird2-2.0.7/filter/data.c Examining data/bird2-2.0.7/filter/tree_test.c Examining data/bird2-2.0.7/filter/f-util.c Examining data/bird2-2.0.7/filter/filter.c Examining data/bird2-2.0.7/proto/babel/packets.c Examining data/bird2-2.0.7/proto/babel/babel.c Examining data/bird2-2.0.7/proto/babel/babel.h Examining data/bird2-2.0.7/proto/mrt/mrt.h Examining data/bird2-2.0.7/proto/mrt/mrt.c Examining data/bird2-2.0.7/proto/perf/perf.h Examining data/bird2-2.0.7/proto/perf/perf.c Examining data/bird2-2.0.7/proto/radv/packets.c Examining data/bird2-2.0.7/proto/radv/radv.c Examining data/bird2-2.0.7/proto/radv/radv.h Examining data/bird2-2.0.7/proto/rpki/packets.c Examining data/bird2-2.0.7/proto/rpki/rpki.c Examining data/bird2-2.0.7/proto/rpki/transport.c Examining data/bird2-2.0.7/proto/rpki/tcp_transport.c Examining data/bird2-2.0.7/proto/rpki/transport.h Examining data/bird2-2.0.7/proto/rpki/packets.h Examining data/bird2-2.0.7/proto/rpki/rpki.h Examining data/bird2-2.0.7/proto/rpki/ssh_transport.c Examining data/bird2-2.0.7/proto/bgp/packets.c Examining data/bird2-2.0.7/proto/bgp/bgp.c Examining data/bird2-2.0.7/proto/bgp/bgp.h Examining data/bird2-2.0.7/proto/bgp/attrs.c Examining data/bird2-2.0.7/proto/ospf/ospf.h Examining data/bird2-2.0.7/proto/ospf/lsalib.c Examining data/bird2-2.0.7/proto/ospf/iface.c Examining data/bird2-2.0.7/proto/ospf/lsack.c Examining data/bird2-2.0.7/proto/ospf/rt.h Examining data/bird2-2.0.7/proto/ospf/topology.h Examining data/bird2-2.0.7/proto/ospf/dbdes.c Examining data/bird2-2.0.7/proto/ospf/lsalib.h Examining data/bird2-2.0.7/proto/ospf/topology.c Examining data/bird2-2.0.7/proto/ospf/neighbor.c Examining data/bird2-2.0.7/proto/ospf/lsupd.c Examining data/bird2-2.0.7/proto/ospf/ospf.c Examining data/bird2-2.0.7/proto/ospf/hello.c Examining data/bird2-2.0.7/proto/ospf/rt.c Examining data/bird2-2.0.7/proto/ospf/lsreq.c Examining data/bird2-2.0.7/proto/ospf/packet.c Examining data/bird2-2.0.7/proto/rip/packets.c Examining data/bird2-2.0.7/proto/rip/rip.c Examining data/bird2-2.0.7/proto/rip/rip.h Examining data/bird2-2.0.7/proto/static/static.c Examining data/bird2-2.0.7/proto/static/static.h Examining data/bird2-2.0.7/proto/pipe/pipe.h Examining data/bird2-2.0.7/proto/pipe/pipe.c Examining data/bird2-2.0.7/proto/bfd/packets.c Examining data/bird2-2.0.7/proto/bfd/io.h Examining data/bird2-2.0.7/proto/bfd/bfd.h Examining data/bird2-2.0.7/proto/bfd/bfd.c Examining data/bird2-2.0.7/proto/bfd/io.c FINAL RESULTS: data/bird2-2.0.7/sysdep/unix/main.c:500:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. if (chown(path_control_socket, use_uid, use_gid) < 0) data/bird2-2.0.7/sysdep/unix/main.c:503:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(path_control_socket, 0660) < 0) data/bird2-2.0.7/client/birdc.c:153:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(history_file, "%s%s", homedir, HISTORY); data/bird2-2.0.7/client/client.c:107:4: [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(tmp, argv[i]); data/bird2-2.0.7/client/client.c:259: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(sa.sun_path, server_path); data/bird2-2.0.7/client/client.c:267:59: [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 PRINTF(LEN, PARGS...) do { if (!skip_input) len = printf(PARGS); } while(0) data/bird2-2.0.7/client/commands.c:91:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s %s", c->command, c->args); data/bird2-2.0.7/client/commands.c:201:4: [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(buf, m->token + len); data/bird2-2.0.7/client/commands.c:321:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b, "%s%s", n->cmd->command, args); data/bird2-2.0.7/client/util.c:24:11: [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 n = vsnprintf(buf, sizeof(buf), msg, args); data/bird2-2.0.7/client/util.c:42: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, args); data/bird2-2.0.7/filter/f-util.c:159:5: [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(cas->name, name); data/bird2-2.0.7/lib/mac_test.c:263: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(buf+strlen(buf), size-strlen(buf), bt_is_char(data->data[i]) ? "%c" : " 0x%02x", data->data[i]); data/bird2-2.0.7/lib/mac_test.c:267: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(buf+strlen(buf), size-strlen(buf), bt_is_char(data->key[i]) ? "%c" : " 0x%02x", data->key[i]); data/bird2-2.0.7/lib/patmatch_test.c:45:3: [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(buf, size, *result ? "match" : "no-match"); data/bird2-2.0.7/sysdep/unix/io.c:953:5: [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(ifr.ifr_name, s->vrf->name); data/bird2-2.0.7/sysdep/unix/io.c:963:5: [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(ifr.ifr_name, s->iface->name); data/bird2-2.0.7/sysdep/unix/io.c:1500: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(sa.sun_path, name); data/bird2-2.0.7/sysdep/unix/io.c:2375: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(sa.sun_path, path); data/bird2-2.0.7/sysdep/unix/main.c:115: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(namebuf, prefix); data/bird2-2.0.7/sysdep/unix/main.c:132:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(p, "0x%x %s\n", &val, name) != 2 && data/bird2-2.0.7/sysdep/unix/main.c:133:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "0x%x %s #", &val, name) != 2 && data/bird2-2.0.7/sysdep/unix/main.c:134:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "%d %s\n", &val, name) != 2 && data/bird2-2.0.7/sysdep/unix/main.c:135:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "%d %s #", &val, name) != 2) data/bird2-2.0.7/test/birdtest.c:31: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(s + strlen(s), sizeof(s) - strlen(s), format, ##__VA_ARGS__) data/bird2-2.0.7/test/birdtest.c:212:5: [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. vsnprintf(pos, sizeof(msg_buf) - (pos - msg_buf), fmt, argptr); data/bird2-2.0.7/test/birdtest.c:320:5: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(dsc, args); data/bird2-2.0.7/test/birdtest.c:464: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(buf+strlen(buf), size-strlen(buf), bt_is_char(*s) ? "%c" : "\\%03u", *s); data/bird2-2.0.7/test/birdtest.h:95:7: [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. printf(format, ##__VA_ARGS__); \ data/bird2-2.0.7/test/birdtest.h:125: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(s + strlen(s), sizeof(s) - strlen(s), format, ##__VA_ARGS__) data/bird2-2.0.7/client/birdc.c:146:25: [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. const char *homedir = getenv("HOME"); data/bird2-2.0.7/client/client.c:73:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, opt_list)) >= 0) data/bird2-2.0.7/lib/timer.c:224:10: [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. when += random() % (t->randomize + 1); data/bird2-2.0.7/proto/babel/babel.c:1455:39: [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. ifa->next_hello = current_time() + (random() % ifa->cf->hello_interval); data/bird2-2.0.7/proto/babel/babel.c:1456:41: [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. ifa->next_regular = current_time() + (random() % ifa->cf->update_interval); data/bird2-2.0.7/proto/babel/babel.c:1705:41: [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. ifa->next_hello = current_time() + (random() % new->hello_interval); data/bird2-2.0.7/proto/babel/babel.c:1708:43: [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. ifa->next_regular = current_time() + (random() % new->update_interval); data/bird2-2.0.7/proto/babel/babel.c:2227:26: [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. p->router_id |= ((u64) random()) << 32; data/bird2-2.0.7/proto/bgp/bgp.c:351:23: [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. btime randomize = random() % ((time / 4) + 1); data/bird2-2.0.7/proto/perf/perf.c:40:12: [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. d[i] = random(); data/bird2-2.0.7/proto/radv/radv.c:69: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. t += random() % (r + 1); data/bird2-2.0.7/proto/rip/rip.c:509:41: [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. ifa->next_regular = current_time() + (random() % ifa->cf->update_time) + 100 MS; data/bird2-2.0.7/proto/rip/rip.c:694:43: [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. ifa->next_regular = current_time() + (random() % new->update_time) + 100 MS; data/bird2-2.0.7/sysdep/unix/io.c:2168:3: [3] (random) srandom: 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. srandom((uint) (now ^ (now >> 32))); data/bird2-2.0.7/sysdep/unix/main.c:778:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, opt_list)) >= 0) data/bird2-2.0.7/sysdep/unix/main.c:843:8: [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. if (!getenv("DMALLOC_OPTIONS")) data/bird2-2.0.7/sysdep/unix/random.c:18: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. rand_low = random(); data/bird2-2.0.7/sysdep/unix/random.c:19: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. rand_high = random(); data/bird2-2.0.7/test/birdtest.c:74:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "lcdftv")) >= 0) data/bird2-2.0.7/test/birdtest.h:37:17: [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. { return ((u64) random() & 0xffffffff) | ((u64) random() << 32); } data/bird2-2.0.7/test/birdtest.h:37:49: [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. { return ((u64) random() & 0xffffffff) | ((u64) random() << 32); } data/bird2-2.0.7/client/birdc.c:84: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/bird2-2.0.7/client/birdcl.c:66: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[INPUT_BUF_LEN]; data/bird2-2.0.7/client/client.c:340:7: [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(server_read_buf, "?<too-long>"); data/bird2-2.0.7/client/client.c:417: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(z, cmd, l); data/bird2-2.0.7/client/commands.c:34: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 token[1]; data/bird2-2.0.7/client/commands.c:72: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. memcpy(new->token, d, c-d); data/bird2-2.0.7/client/commands.c:89: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[strlen(c->command) + strlen(c->args) + 4]; data/bird2-2.0.7/client/util.c:22: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[1024]; data/bird2-2.0.7/conf/conf.c:98: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(ndup, name, nlen); data/bird2-2.0.7/conf/conf.c:511: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(c, config, sizeof(struct config)); data/bird2-2.0.7/conf/conf.c:532: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[1024]; data/bird2-2.0.7/conf/conf.c:537:5: [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(buf, "<bug: error message too long>"); data/bird2-2.0.7/conf/conf.c:561: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(z, c, l); data/bird2-2.0.7/conf/conf.c:575: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(dn, sn, node_size); data/bird2-2.0.7/conf/conf.h: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 name[0]; data/bird2-2.0.7/filter/data.c:352: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(res->data, tmp, nl); data/bird2-2.0.7/filter/data.c:386: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(res->data, tmp, nl); data/bird2-2.0.7/filter/data.c:418: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(res->data, tmp, nl); data/bird2-2.0.7/filter/data.c:491: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 buf2[1024]; data/bird2-2.0.7/filter/data.c:526:8: [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 char val_dump_buffer[1024]; data/bird2-2.0.7/filter/f-inst.c:1182:16: [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. FID_MEMBER(char *, s, [[strcmp(f1->s, f2->s)]], "string %s", item->s); data/bird2-2.0.7/filter/f-util.c:54: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[0]; data/bird2-2.0.7/filter/filter_test.c:38: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(filename, arg->filename, fn_size); data/bird2-2.0.7/lib/flowspec.c:786: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(&ip, px, BYTES(pxlen)); data/bird2-2.0.7/lib/flowspec.c:797: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(((byte *) &ip) + floor_offset, px, ceil_len - floor_offset); data/bird2-2.0.7/lib/flowspec.c:809: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(buf, fb->data.data + fb->parts[i].offset, fb->parts[i].length); data/bird2-2.0.7/lib/flowspec_test.c:17: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(what->data, &(data_), sizeof(data_)); \ data/bird2-2.0.7/lib/flowspec_test.c:25: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(what->data, &(data_), sizeof(data_)); \ data/bird2-2.0.7/lib/flowspec_test.c:565: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 b[1024]; data/bird2-2.0.7/lib/flowspec_test.c:597: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 b[1024]; data/bird2-2.0.7/lib/ip.h: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(&a, buf, 16); data/bird2-2.0.7/lib/ip.h:378: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, &a, 16); data/bird2-2.0.7/lib/mac.c:60: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(outbuf, hash_final(mctx, &hctx), mctx->type->hash_size); data/bird2-2.0.7/lib/mac.c:108: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(keybuf, key, keylen); data/bird2-2.0.7/lib/mac.c:261: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(mac, mac_final(&ctx), mac_get_length(&ctx)); data/bird2-2.0.7/lib/mac_test.c:1064: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_a[SHA256_HEX_SIZE]; data/bird2-2.0.7/lib/mac_test.c:1065: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_b[SHA256_HEX_SIZE]; data/bird2-2.0.7/lib/mac_test.c:1102: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_a[SHA512_HEX_SIZE]; data/bird2-2.0.7/lib/mac_test.c:1103: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_b[SHA512_HEX_SIZE]; data/bird2-2.0.7/lib/md5.c:82: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(p, buf, len); data/bird2-2.0.7/lib/md5.c:85: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(p, buf, t); data/bird2-2.0.7/lib/md5.c:95: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->in, buf, 64); data/bird2-2.0.7/lib/md5.c:103: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(ctx->in, buf, len); data/bird2-2.0.7/lib/net.h:233: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(f->data, data, dlen); data/bird2-2.0.7/lib/net.h:240: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(f->data, data, dlen); data/bird2-2.0.7/lib/net.h:448: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(dst, src, src->length); } data/bird2-2.0.7/lib/net.h:451: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(dst, src, sizeof(net_addr_ip4)); } data/bird2-2.0.7/lib/net.h:454: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(dst, src, sizeof(net_addr_ip6)); } data/bird2-2.0.7/lib/net.h:457: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(dst, src, sizeof(net_addr_vpn4)); } data/bird2-2.0.7/lib/net.h:460: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(dst, src, sizeof(net_addr_vpn6)); } data/bird2-2.0.7/lib/net.h:463: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(dst, src, sizeof(net_addr_roa4)); } data/bird2-2.0.7/lib/net.h:466: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(dst, src, sizeof(net_addr_roa6)); } data/bird2-2.0.7/lib/net.h:469: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(dst, src, src->length); } data/bird2-2.0.7/lib/net.h:472: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(dst, src, src->length); } data/bird2-2.0.7/lib/net.h:475: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(dst, src, sizeof(net_addr_ip6_sadr)); } data/bird2-2.0.7/lib/net.h: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(dst, src, sizeof(net_addr_mpls)); } data/bird2-2.0.7/lib/printf.c:40:2: [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 c,sign,tmp[66]; data/bird2-2.0.7/lib/printf.c:145:2: [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 ipbuf[NET_MAX_TEXT_LENGTH+1]; data/bird2-2.0.7/lib/printf_test.c:24: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/bird2-2.0.7/lib/printf_test.c:77: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/bird2-2.0.7/lib/printf_test.c:90: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/bird2-2.0.7/lib/resource.c:182: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 x[16]; data/bird2-2.0.7/lib/sha1.c:51: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(x, data, 64); data/bird2-2.0.7/lib/sha1.c: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(ctx->buf, buf, len); data/bird2-2.0.7/lib/sha256.c:257: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(ctx->buf, buf, len); data/bird2-2.0.7/lib/sha512.c:427: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(ctx->buf, buf, len); data/bird2-2.0.7/lib/string.h:43: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(z, c, l); data/bird2-2.0.7/lib/string.h:52: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(z, c, l); data/bird2-2.0.7/lib/timer.c:309:5: [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(x, "<error>"); data/bird2-2.0.7/lib/unaligned.h:33: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(&x, p, 2); data/bird2-2.0.7/lib/unaligned.h:48: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(&x, p, 4); data/bird2-2.0.7/lib/unaligned.h:56: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(&xh, p, 4); data/bird2-2.0.7/lib/unaligned.h:57: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(&xl, p+4, 4); data/bird2-2.0.7/lib/unaligned.h:64: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(p, &x, 1); data/bird2-2.0.7/lib/unaligned.h:71: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(p, &x, 2); data/bird2-2.0.7/lib/unaligned.h:78: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(p, ((char *) &x) + 1, 3); data/bird2-2.0.7/lib/unaligned.h:85: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(p, &x, 4); data/bird2-2.0.7/lib/unaligned.h:94: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(p, &xh, 4); data/bird2-2.0.7/lib/unaligned.h:95: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(p+4, &xl, 4); data/bird2-2.0.7/lib/unaligned.h:102: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(x, p, 4*n); data/bird2-2.0.7/nest/a-path.c:188: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(dst, src, slen); data/bird2-2.0.7/nest/a-path.c:217: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(np->data + 2 + BS, pos + 2, dlen); data/bird2-2.0.7/nest/a-path.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(dst, pos, len); data/bird2-2.0.7/nest/a-path.c:250: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(res->data, path->data, path->length); data/bird2-2.0.7/nest/a-path.c:305: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(res->data, path->data, res->length); data/bird2-2.0.7/nest/a-path.c:322: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(res->data, path->data, res->length); data/bird2-2.0.7/nest/a-path.c:340: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(res->data, p1->data, p1->length); data/bird2-2.0.7/nest/a-path.c:341: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(res->data + p1->length, p2->data, p2->length); data/bird2-2.0.7/nest/a-path.c:389:5: [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(b->end - 12, "..."); data/bird2-2.0.7/nest/a-path.c:657: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(res->data, buf, nl); data/bird2-2.0.7/nest/a-set.c:50:6: [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(buf, " ..."); data/bird2-2.0.7/nest/a-set.c:72: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 tbuf[16]; data/bird2-2.0.7/nest/a-set.c:129:6: [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(buf, " ..."); data/bird2-2.0.7/nest/a-set.c:164:6: [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(buf, "..."); data/bird2-2.0.7/nest/a-set.c:248: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(res->data + 4, list->data, list->length); data/bird2-2.0.7/nest/a-set.c:269: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(res->data, list->data, list->length); data/bird2-2.0.7/nest/a-set.c:287: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(res->data, list->data, list->length); data/bird2-2.0.7/nest/a-set.c:307: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(res->data, list->data, list->length); data/bird2-2.0.7/nest/a-set.c:410: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(res->data, l1->data, l1->length); data/bird2-2.0.7/nest/a-set.c:411: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(res->data + l1->length, tmp, len); data/bird2-2.0.7/nest/a-set.c:443: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(res->data, l1->data, l1->length); data/bird2-2.0.7/nest/a-set.c:444: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(res->data + l1->length, tmp, len); data/bird2-2.0.7/nest/a-set.c:473: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(res->data, l1->data, l1->length); data/bird2-2.0.7/nest/a-set.c:474: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(res->data + l1->length, tmp, len); data/bird2-2.0.7/nest/a-set.c:514: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(dst->data, src->data, src->length); data/bird2-2.0.7/nest/a-set.c:532: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(dst->data, src->data, src->length); data/bird2-2.0.7/nest/a-set.c:562: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(dst->data, src->data, src->length); data/bird2-2.0.7/nest/attrs.h:92: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(dst+4, src+2, 4); data/bird2-2.0.7/nest/attrs.h:100: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(dst+2, src+4, 4); data/bird2-2.0.7/nest/attrs.h:115: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(d->data + 4, a->data + 4, 4); data/bird2-2.0.7/nest/attrs.h:194: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(dst, src, LCOMM_LENGTH); return dst + 3; } data/bird2-2.0.7/nest/cli.c:159: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(cli_alloc_out(c, size), buf, size); data/bird2-2.0.7/nest/cli.c:173: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(cli_alloc_out(c, n), buf, n); data/bird2-2.0.7/nest/cli.c:248: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, cli_rh_pos, max); data/bird2-2.0.7/nest/cli.c:394: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(c->ring_write, m, i); data/bird2-2.0.7/nest/iface.c:318:6: [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->addrs, &i->addrs, sizeof(i->addrs)); data/bird2-2.0.7/nest/iface.c:319:6: [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(i, new, sizeof(*i)); data/bird2-2.0.7/nest/iface.c:332: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(i, new, sizeof(*i)); data/bird2-2.0.7/nest/iface.c:607: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, a, sizeof(struct ifa)); data/bird2-2.0.7/nest/iface.c:845: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 mbuf[16 + sizeof(i->name)] = {}; data/bird2-2.0.7/nest/iface.h:33: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[16]; data/bird2-2.0.7/nest/password.h: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 buf[size]; data/bird2-2.0.7/nest/proto.c:603: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(dst, src, src->channel->config_size); data/bird2-2.0.7/nest/proto.c:890: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(dest, src, src->protocol->config_size); data/bird2-2.0.7/nest/proto.c:1548: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(p->message, msg, len); data/bird2-2.0.7/nest/proto.c:1580: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 *dir_name[PLD_MAX] = { "receive", "import" , "export" }; data/bird2-2.0.7/nest/route.h:461: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. const char * rta_dest_names[RTD_MAX]; data/bird2-2.0.7/nest/route.h:622: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(a->data, data, len); data/bird2-2.0.7/nest/route.h:637: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(&a->nh, from, nexthop_size(from)); } data/bird2-2.0.7/nest/rt-attr.c:63: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. const char * const rta_src_names[RTS_MAX] = { data/bird2-2.0.7/nest/rt-attr.c:81: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. const char * rta_dest_names[RTD_MAX] = { data/bird2-2.0.7/nest/rt-attr.c:244: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(n, src, nexthop_size(src)); data/bird2-2.0.7/nest/rt-attr.c:704: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(d, e->attrs, sizeof(eattr)*e->count); data/bird2-2.0.7/nest/rt-attr.c:754: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(n, o, len); data/bird2-2.0.7/nest/rt-attr.c:763: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(d, a->u.ptr, size); data/bird2-2.0.7/nest/rt-attr.c:812:2: [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(buf, " ..."); data/bird2-2.0.7/nest/rt-attr.c:836:4: [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(buf, " ..."); data/bird2-2.0.7/nest/rt-attr.c:1135: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(r, o, rta_size(o)); data/bird2-2.0.7/nest/rt-attr.c:1235: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(r, o, rta_size(o)); data/bird2-2.0.7/nest/rt-attr.c:1239: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(*nhn, nho, nexthop_size(nho)); data/bird2-2.0.7/nest/rt-show.c:67: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 mpls[MPLS_MAX_LABEL_STACK*12 + 5], *lsp = mpls; data/bird2-2.0.7/nest/rt-show.c:69: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 weight[16] = ""; data/bird2-2.0.7/nest/rt-table.c:295: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(e, r, sizeof(rte)); data/bird2-2.0.7/nest/rt-table.c:2091: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(a->nh.label, mls->stack, mls->len * sizeof(u32)); data/bird2-2.0.7/nest/rt-table.c:2098: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(&(a->nh), &(he->src->nh), nexthop_size(&(he->src->nh))); data/bird2-2.0.7/nest/rt-table.c:2125:2: [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(nhp->label, nh->label, nh->labels * sizeof(u32)); /* First the hostentry labels */ data/bird2-2.0.7/nest/rt-table.c:2126:2: [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(&(nhp->label[nh->labels]), mls->stack, mls->len * sizeof(u32)); /* Then the bottom labels */ data/bird2-2.0.7/nest/rt-table.c:2140: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(nhp->label, nh->label, nh->labels * sizeof(u32)); data/bird2-2.0.7/nest/rt-table.c:2171: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(a, old->attrs, rta_size(old->attrs)); data/bird2-2.0.7/nest/rt-table.c:2174: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(mls.stack, &a->nh.label[a->nh.labels - mls.len], mls.len * sizeof(u32)); data/bird2-2.0.7/nest/rt-table.c:2180: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(e, old, sizeof(rte)); data/bird2-2.0.7/proto/babel/babel.c:1866: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(&rid, a->u.ptr->data, sizeof(u64)); data/bird2-2.0.7/proto/babel/babel.c:2096: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->data, &rt->u.babel.router_id, sizeof(u64)); data/bird2-2.0.7/proto/babel/packets.c:196: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, p, BYTES(plen)); data/bird2-2.0.7/proto/babel/packets.c: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(p, &addr, NET_SIZE(n)); data/bird2-2.0.7/proto/babel/packets.c:211: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, p, BYTES(plen)); data/bird2-2.0.7/proto/babel/packets.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(p, &addr, NET_SIZE(n)); data/bird2-2.0.7/proto/babel/packets.c:622: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, state->def_ip4_prefix, tlv->omitted); data/bird2-2.0.7/proto/babel/packets.c:623: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 + tlv->omitted, tlv->addr, len); data/bird2-2.0.7/proto/babel/packets.c:647: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, state->def_ip6_prefix, tlv->omitted); data/bird2-2.0.7/proto/babel/packets.c:648: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 + tlv->omitted, tlv->addr, len); data/bird2-2.0.7/proto/babel/packets.c:766: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(tlv->addr, buf + omit, NET_SIZE(&msg->net) - omit); data/bird2-2.0.7/proto/bfd/io.c:99: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[64]; data/bird2-2.0.7/proto/bfd/packets.c: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(auth->password, pass->password, pass_len); data/bird2-2.0.7/proto/bfd/packets.c:264: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(auth_data, auth->data, hash_len); data/bird2-2.0.7/proto/bfd/packets.c:288: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 fb[8]; data/bird2-2.0.7/proto/bfd/packets.c:328: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 fb[8]; data/bird2-2.0.7/proto/bgp/attrs.c:190: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 + hdr, data, len); data/bird2-2.0.7/proto/bgp/attrs.c:296: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(dst, pos, plen); data/bird2-2.0.7/proto/bgp/attrs.c:312: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(tlv + 3, data, dlen); data/bird2-2.0.7/proto/bgp/attrs.c:430: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 err[128]; data/bird2-2.0.7/proto/bgp/attrs.c:756: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 err[128]; data/bird2-2.0.7/proto/bgp/attrs.c:768: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(a->data, data, len); data/bird2-2.0.7/proto/bgp/attrs.c:791: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 err[128]; data/bird2-2.0.7/proto/bgp/attrs.c:1455: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->eattrs, new, ea_size); data/bird2-2.0.7/proto/bgp/attrs.c:1467: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(na, oa, sizeof(struct adata) + oa->length); data/bird2-2.0.7/proto/bgp/bgp.c:492: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 fmt[SYM_MAX_LEN]; data/bird2-2.0.7/proto/bgp/bgp.c:1646: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(data+1, message, msg_len); data/bird2-2.0.7/proto/bgp/bgp.c:2260:5: [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(b.end - 32, " ... <too long>"); data/bird2-2.0.7/proto/bgp/bgp.h:542: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(a->data, data, len); data/bird2-2.0.7/proto/bgp/packets.c:168: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+2, conn->notify_data, conn->notify_size); data/bird2-2.0.7/proto/bgp/packets.c:959: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(a->nh.label, labels, 4*lnum); data/bird2-2.0.7/proto/bgp/packets.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(ms.stack, labels, 4*lnum); data/bird2-2.0.7/proto/bgp/packets.c:1384: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(s->mpls_labels->data, labels, 4*lnum); data/bird2-2.0.7/proto/bgp/packets.c:1424: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(pos, &a, b); data/bird2-2.0.7/proto/bgp/packets.c:1468: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(&addr, pos, b); data/bird2-2.0.7/proto/bgp/packets.c:1509: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(pos, &a, b); data/bird2-2.0.7/proto/bgp/packets.c:1553: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(&addr, pos, b); data/bird2-2.0.7/proto/bgp/packets.c:1597: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(pos, &a, b); data/bird2-2.0.7/proto/bgp/packets.c:1649: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(&addr, pos, b); data/bird2-2.0.7/proto/bgp/packets.c:1694: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(pos, &a, b); data/bird2-2.0.7/proto/bgp/packets.c:1746: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(&addr, pos, b); data/bird2-2.0.7/proto/bgp/packets.c:1781: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(pos, net->data, flen); data/bird2-2.0.7/proto/bgp/packets.c:1838: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(&px, data+2, BYTES(pxlen)); data/bird2-2.0.7/proto/bgp/packets.c:1873: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(pos, net->data, flen); data/bird2-2.0.7/proto/bgp/packets.c:1930: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(&px, data+2, BYTES(pxlen)); data/bird2-2.0.7/proto/bgp/packets.c:2187: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(pos, abuf, la); data/bird2-2.0.7/proto/bgp/packets.c:2941:10: [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 char buff[32]; data/bird2-2.0.7/proto/mrt/mrt.c:152: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->pos, src, n); data/bird2-2.0.7/proto/mrt/mrt.c:201: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(pos, last, step); data/bird2-2.0.7/proto/mrt/mrt.c:204: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(pos, val, vlen); data/bird2-2.0.7/proto/mrt/mrt.c:212: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(pos, last, step); data/bird2-2.0.7/proto/mrt/mrt.c:258: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 fmt1[BIRD_PATH_MAX]; data/bird2-2.0.7/proto/mrt/mrt.c:259: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[BIRD_PATH_MAX]; data/bird2-2.0.7/proto/ospf/lsack.c:62: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(&no->lsa, h_n, sizeof(struct ospf_lsa_header)); data/bird2-2.0.7/proto/ospf/lsack.c:99: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(&lsas[i], &no->lsa, sizeof(struct ospf_lsa_header)); data/bird2-2.0.7/proto/ospf/lsalib.h:17:79: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline void lsa_hton_body(void *h, void *n, u16 len) { ASSERT(h != n); memcpy(n, h, len); }; data/bird2-2.0.7/proto/ospf/lsalib.h:18:79: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. static inline void lsa_ntoh_body(void *n, void *h, u16 len) { ASSERT(n != h); memcpy(h, n, len); }; data/bird2-2.0.7/proto/ospf/ospf.c:582:7: [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(buf, "Alone"); data/bird2-2.0.7/proto/ospf/ospf.c:584:7: [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(buf, "Running"); data/bird2-2.0.7/proto/ospf/ospf.c:1174: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_via[IPA_MAX_TEXT_LENGTH + 8] = ""; data/bird2-2.0.7/proto/ospf/ospf.c:1175: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_tag[16] = ""; data/bird2-2.0.7/proto/ospf/ospf.h:906: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(&a, buf, 16); data/bird2-2.0.7/proto/ospf/ospf.h:915: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, &a, 16); data/bird2-2.0.7/proto/ospf/packet.c: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(pass_key, pass->password, pass->length); data/bird2-2.0.7/proto/ospf/packet.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(auth_data, auth_tail, auth_len); data/bird2-2.0.7/proto/ospf/packet.c:339: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(auth_data, auth->data, mac_len); data/bird2-2.0.7/proto/ospf/packet.c:348: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(pass_key, pass->password, pass->length); data/bird2-2.0.7/proto/ospf/rt.c:273: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(&o->n, new, sizeof(orta)); data/bird2-2.0.7/proto/ospf/topology.c:395: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(en->next_lsa_body, en->lsa_body, en->next_lsa_blen); data/bird2-2.0.7/proto/ospf/topology.c:649: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(r, p->lsab, p->lsab_used); data/bird2-2.0.7/proto/ospf/topology.c:1640: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(pxl, px, pxspace); data/bird2-2.0.7/proto/perf/perf.c:42: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(p, d, len); data/bird2-2.0.7/proto/pipe/pipe.c:69: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(a, new->attrs, rta_size(new->attrs)); data/bird2-2.0.7/proto/pipe/pipe.c:77: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(&(e->u), &(new->u), sizeof(e->u)); data/bird2-2.0.7/proto/radv/packets.c:114: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(opt->prefix, &px_addr, 8 * px_blocks); data/bird2-2.0.7/proto/radv/packets.c:237:2: [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(op->domain + bpos, dcf->domain, dcf->dlen_all); data/bird2-2.0.7/proto/radv/radv.c:722:5: [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(buf, "Suppressed"); data/bird2-2.0.7/proto/rip/packets.c:62: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 password[16]; data/bird2-2.0.7/proto/rip/packets.c:345: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(auth_data, tail->auth_data, auth_len); data/bird2-2.0.7/proto/rip/rip.c:100: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(rt, src, sizeof(struct rip_rte)); data/bird2-2.0.7/proto/rpki/packets.c:357: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(out, in, in->len); data/bird2-2.0.7/proto/rpki/packets.c:369: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 detail[256]; data/bird2-2.0.7/proto/rpki/packets.c:432: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. char txt[len_err_txt + 1]; data/bird2-2.0.7/proto/rpki/packets.c:511: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(sk->tbuf, pdu, len); data/bird2-2.0.7/proto/rpki/packets.c:998: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 msg[128]; data/bird2-2.0.7/proto/rpki/packets.c:1028: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(e->rest, erroneous_pdu, err_pdu_len); data/bird2-2.0.7/proto/rpki/packets.c:1032: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(e->rest + err_pdu_len + 4, msg, msg_len); data/bird2-2.0.7/proto/static/static.c:79:2: [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(nh->label, r2->mls->stack, r2->mls->len * sizeof(u32)); data/bird2-2.0.7/proto/static/static.c:591: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(dnh, snh, sizeof(struct static_route)); data/bird2-2.0.7/sysdep/bsd/krt-sock.c:186: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(p, body, (l > sizeof(*p) ? sizeof(*p) : l));\ data/bird2-2.0.7/sysdep/bsd/krt-sock.c:634: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(f.name, dl->sdl_data, nlen); data/bird2-2.0.7/sysdep/bsd/krt-sock.c:641: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(f.name, dl->sdl_data, nlen); data/bird2-2.0.7/sysdep/bsd/setkey.h:99: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(pos + sizeof(struct sadb_key), passwd, passwd_len); data/bird2-2.0.7/sysdep/bsd/setkey.h:126: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(pos + sizeof(struct sadb_address), &src->sa, src->sa.sa_len); data/bird2-2.0.7/sysdep/bsd/setkey.h:136: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(pos + sizeof(struct sadb_address), &dst->sa, dst->sa.sa_len); data/bird2-2.0.7/sysdep/linux/netlink.c:503: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(RTA_DATA(a), data, dlen); data/bird2-2.0.7/sysdep/linux/netlink.c:559: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[len*4]; data/bird2-2.0.7/sysdep/linux/netlink.c:1207: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[0]; data/bird2-2.0.7/sysdep/linux/netlink.c:1746: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(ad->data, &ps, sizeof(ps)); data/bird2-2.0.7/sysdep/linux/netlink.c:2050: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 *krt_metrics_names[KRT_METRICS_MAX] = { data/bird2-2.0.7/sysdep/linux/netlink.c:2055: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 *krt_features_names[KRT_FEATURES_MAX] = { data/bird2-2.0.7/sysdep/linux/sysio.h:187: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(&md5.tcpm_key, passwd, len); data/bird2-2.0.7/sysdep/unix/io.c:96:13: [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). FILE *f = fopen(name, mode); data/bird2-2.0.7/sysdep/unix/log.c:159:5: [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(buf->end - 100, " ... <too long>"); data/bird2-2.0.7/sysdep/unix/log.c:175: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(tbuf, "<error>"); data/bird2-2.0.7/sysdep/unix/log.c:425:21: [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). else if (!(dbgf = fopen(f, "a"))) data/bird2-2.0.7/sysdep/unix/main.c:110: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[512], namebuf[512]; data/bird2-2.0.7/sysdep/unix/main.c:118:8: [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). fp = fopen(file, "r"); data/bird2-2.0.7/sysdep/unix/main.c:195: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). conf->file_fd = open(name, O_RDONLY); data/bird2-2.0.7/sysdep/unix/main.c:520: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). pid_fd = open(pid_file, O_WRONLY|O_CREAT, 0664); data/bird2-2.0.7/sysdep/unix/main.c:529: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 ps[24]; data/bird2-2.0.7/sysdep/unix/main.c:896: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 (open("/dev/null", O_RDWR) < 0) data/bird2-2.0.7/sysdep/unix/unix.h: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 padding[SOCKADDR_SIZE - sizeof(struct sockaddr)]; data/bird2-2.0.7/test/birdtest.c:52:1: [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 bt_out_fmt_buf[1024]; /* Temporary memory buffer for output of testing function */ data/bird2-2.0.7/test/birdtest.c:198:10: [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 char msg_buf[BT_BUFFER_SIZE]; data/bird2-2.0.7/test/birdtest.c:428: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 b[BT_BUFFER_SIZE]; data/bird2-2.0.7/test/birdtest.h:22:8: [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. extern char bt_out_fmt_buf[1024]; data/bird2-2.0.7/test/bt-utils.c:39: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(dest, bt_config_parse_pos, max_len); data/bird2-2.0.7/test/bt-utils.c:87:13: [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). FILE *f = fopen(filename, "rb"); data/bird2-2.0.7/test/bt-utils.c:185: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). cfg->file_fd = open(filepath, O_RDONLY); data/bird2-2.0.7/test/bt-utils.c:222:5: [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. sprintf(buf + i*2, "%02x", in_data[i]); data/bird2-2.0.7/client/birdc.c:149: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). history_file = malloc(strlen(homedir) + sizeof(HISTORY)); data/bird2-2.0.7/client/birdcl.c:75: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). int l = strlen(buf); data/bird2-2.0.7/client/birdcl.c:93: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). cmd_help(buf, strlen(buf)); data/bird2-2.0.7/client/client.c:102: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). len += strlen(argv[i]) + 1; data/bird2-2.0.7/client/client.c:108: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). tmp += strlen(tmp); data/bird2-2.0.7/client/client.c:221:11: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch (getchar()) data/bird2-2.0.7/client/client.c:254: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). if (strlen(server_path) >= sizeof(sa.sun_path)) data/bird2-2.0.7/client/client.c:279: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). else if (strlen(x) > 4 && data/bird2-2.0.7/client/client.c:311:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = read(server_fd, server_read_pos, server_read_buf + sizeof(server_read_buf) - server_read_pos); data/bird2-2.0.7/client/client.c:414: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). int l = strlen(cmd); data/bird2-2.0.7/client/commands.c:89: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). char buf[strlen(c->command) + strlen(c->args) + 4]; data/bird2-2.0.7/client/commands.c:89:33: [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). char buf[strlen(c->command) + strlen(c->args) + 4]; data/bird2-2.0.7/client/commands.c:320:14: [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). b = malloc(strlen(n->cmd->command) + strlen(args) + 1); data/bird2-2.0.7/client/commands.c:320:40: [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). b = malloc(strlen(n->cmd->command) + strlen(args) + 1); data/bird2-2.0.7/conf/conf.c:96: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). uint nlen = strlen(name) + 1; data/bird2-2.0.7/conf/conf.c:559: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). int l = strlen(c) + 1; data/bird2-2.0.7/filter/f-util.c:47:33: [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). #define CA_FN(n,t) (mem_hash(n, strlen(n)) ^ (t*0xaae99453U)) data/bird2-2.0.7/filter/f-util.c:155: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). cas = mb_allocz(&root_pool, sizeof(struct ca_storage) + strlen(name) + 1); data/bird2-2.0.7/filter/filter_test.c:36:20: [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 fn_size = strlen(arg->filename) + 1; data/bird2-2.0.7/lib/fletcher16_test.c:15: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). int count = strlen(data); data/bird2-2.0.7/lib/fletcher16_test.c:55: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). fletcher16_update(&ctxt, in, strlen(in)); data/bird2-2.0.7/lib/fletcher16_test.c:69:13: [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). int len = strlen(in); data/bird2-2.0.7/lib/flowspec.c:1139:37: [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). b.pos = b.start + MIN(blen - 6, strlen(b.start)); data/bird2-2.0.7/lib/flowspec_test.c:587: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). bt_assert(flow4_net_format(b, sizeof(b), input) == strlen(expect)); data/bird2-2.0.7/lib/flowspec_test.c:614: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). bt_assert(flow6_net_format(b, sizeof(b), input) == strlen(expect)); data/bird2-2.0.7/lib/mac_test.c:25: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). mac_update(&ctx, in, strlen(in)); \ data/bird2-2.0.7/lib/mac_test.c:263:18: [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). snprintf(buf+strlen(buf), size-strlen(buf), bt_is_char(data->data[i]) ? "%c" : " 0x%02x", data->data[i]); data/bird2-2.0.7/lib/mac_test.c:263: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). snprintf(buf+strlen(buf), size-strlen(buf), bt_is_char(data->data[i]) ? "%c" : " 0x%02x", data->data[i]); data/bird2-2.0.7/lib/mac_test.c:265: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). snprintf(buf+strlen(buf), size-strlen(buf), "', key: '"); data/bird2-2.0.7/lib/mac_test.c:265: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). snprintf(buf+strlen(buf), size-strlen(buf), "', key: '"); data/bird2-2.0.7/lib/mac_test.c:267:18: [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). snprintf(buf+strlen(buf), size-strlen(buf), bt_is_char(data->key[i]) ? "%c" : " 0x%02x", data->key[i]); data/bird2-2.0.7/lib/mac_test.c:267: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). snprintf(buf+strlen(buf), size-strlen(buf), bt_is_char(data->key[i]) ? "%c" : " 0x%02x", data->key[i]); data/bird2-2.0.7/lib/mac_test.c:268: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). snprintf(buf+strlen(buf), size-strlen(buf), "'"); data/bird2-2.0.7/lib/mac_test.c:268: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). snprintf(buf+strlen(buf), size-strlen(buf), "'"); data/bird2-2.0.7/lib/mac_test.c:1077: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). sha256_update(&ctx_a, str_a, strlen(str_a)); data/bird2-2.0.7/lib/mac_test.c:1083:33: [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). sha256_update(&ctx_b, str_b1, strlen(str_b1)); data/bird2-2.0.7/lib/mac_test.c:1084:33: [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). sha256_update(&ctx_b, str_b2, strlen(str_b2)); data/bird2-2.0.7/lib/mac_test.c:1085:33: [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). sha256_update(&ctx_b, str_b3, strlen(str_b3)); data/bird2-2.0.7/lib/mac_test.c:1086:33: [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). sha256_update(&ctx_b, str_b4, strlen(str_b4)); data/bird2-2.0.7/lib/mac_test.c:1087:33: [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). sha256_update(&ctx_b, str_b5, strlen(str_b5)); data/bird2-2.0.7/lib/mac_test.c:1088:33: [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). sha256_update(&ctx_b, str_b6, strlen(str_b6)); data/bird2-2.0.7/lib/mac_test.c:1115: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). sha512_update(&ctx_a, str_a, strlen(str_a)); data/bird2-2.0.7/lib/mac_test.c:1121:33: [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). sha512_update(&ctx_b, str_b1, strlen(str_b1)); data/bird2-2.0.7/lib/mac_test.c:1122:33: [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). sha512_update(&ctx_b, str_b2, strlen(str_b2)); data/bird2-2.0.7/lib/mac_test.c:1123:33: [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). sha512_update(&ctx_b, str_b3, strlen(str_b3)); data/bird2-2.0.7/lib/mac_test.c:1124:33: [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). sha512_update(&ctx_b, str_b4, strlen(str_b4)); data/bird2-2.0.7/lib/mac_test.c:1125:33: [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). sha512_update(&ctx_b, str_b5, strlen(str_b5)); data/bird2-2.0.7/lib/mac_test.c:1126:33: [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). sha512_update(&ctx_b, str_b6, strlen(str_b6)); data/bird2-2.0.7/lib/printf.c:256:10: [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(s); data/bird2-2.0.7/lib/string.h:41:14: [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 l = strlen(c) + 1; data/bird2-2.0.7/lib/string.h:50:14: [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 l = strlen(c) + 1; data/bird2-2.0.7/nest/a-path_test.c:90:60: [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). bt_assert_msg(strcmp(buf, "") == 0, "Buffer(%zu): '%s'", strlen(buf), buf); data/bird2-2.0.7/nest/a-path_test.c:93:169: [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). bt_assert_msg(strcmp(buf, "4294967294 4294967293 4294967292 4294967291 4294967290 4294967289 4294967288 4294967287 4294967286 4294967285") == 0, "Buffer(%zu): '%s'", strlen(buf), buf); data/bird2-2.0.7/nest/a-path_test.c:98: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). bt_assert_msg(strcmp(buf2, "4294967294 42...") == 0, "Small Buffer(%zu): '%s'", strlen(buf2), buf2); data/bird2-2.0.7/nest/cli.c:268: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). cli_rh_len = strlen(c->rx_buf); data/bird2-2.0.7/nest/cli.c:367: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). len = strlen(msg) + 1; data/bird2-2.0.7/nest/iface.c:277:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(f.name, old->name, sizeof(f.name)-1); data/bird2-2.0.7/nest/iface.c:468:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(i->name, name, sizeof(i->name)-1); data/bird2-2.0.7/nest/password.h:31:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, p1->password, size); data/bird2-2.0.7/nest/proto.c:1542: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). len = strlen(msg); data/bird2-2.0.7/nest/rt-attr.c:921:14: [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). pos += strlen(pos); data/bird2-2.0.7/proto/bfd/io.c:103:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rv = read(fd, buf, 64); data/bird2-2.0.7/proto/bfd/packets.c:172:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(auth->data, pass->password, hash_len); data/bird2-2.0.7/proto/bfd/packets.c:265:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(auth->data, pass->password, hash_len); data/bird2-2.0.7/proto/bgp/attrs.c:2327: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(buf, "]"); data/bird2-2.0.7/proto/bgp/bgp.c:1638:20: [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). uint msg_len = strlen(message); data/bird2-2.0.7/proto/mrt/mrt.c:193: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 step, klen = strlen(key), vlen = strlen(val); data/bird2-2.0.7/proto/mrt/mrt.c:193: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). size_t step, klen = strlen(key), vlen = strlen(val); data/bird2-2.0.7/proto/mrt/mrt.c:208:10: [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). step = strlen(last); data/bird2-2.0.7/proto/mrt/mrt.c:311: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). uint name_length = name ? strlen(name) : 0; data/bird2-2.0.7/proto/ospf/packet.c:59:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(auth->password, pass->password, sizeof(auth->password)); data/bird2-2.0.7/proto/ospf/packet.c:106:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(auth_tail, pass->password, auth_len); data/bird2-2.0.7/proto/ospf/packet.c:230:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(auth_tail, pass->password, auth_len); data/bird2-2.0.7/proto/radv/packets.c:184:45: [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 = dom_end ? (uint)(dom_end - dom) : strlen(dom); data/bird2-2.0.7/proto/rip/packets.c:221:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(auth->password, pass->password, RIP_PASSWD_LENGTH); data/bird2-2.0.7/proto/rip/packets.c:260:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tail->auth_data, pass->password, auth_len); data/bird2-2.0.7/proto/rip/packets.c:349:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tail->auth_data, pass->password, auth_len); data/bird2-2.0.7/proto/rpki/packets.c:435:33: [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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ": '%s'", txt)); data/bird2-2.0.7/proto/rpki/packets.c:435: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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ": '%s'", txt)); data/bird2-2.0.7/proto/rpki/packets.c:439: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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ", malformed size")); data/bird2-2.0.7/proto/rpki/packets.c:439:59: [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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ", malformed size")); data/bird2-2.0.7/proto/rpki/packets.c:446: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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ", %s packet:", str_pdu_type(((struct pdu_header *) err->rest)->type))); data/bird2-2.0.7/proto/rpki/packets.c:446: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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ", %s packet:", str_pdu_type(((struct pdu_header *) err->rest)->type))); data/bird2-2.0.7/proto/rpki/packets.c:450: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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), " %02X", *c)); data/bird2-2.0.7/proto/rpki/packets.c:450: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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), " %02X", *c)); data/bird2-2.0.7/proto/rpki/packets.c:454: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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ")")); data/bird2-2.0.7/proto/rpki/packets.c:454:62: [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). SAVE(bsnprintf(detail + strlen(detail), sizeof(detail) - strlen(detail), ")")); data/bird2-2.0.7/proto/rpki/ssh_transport.c:56: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(username) + 1 + strlen(host) + 1 + 5 + 1; /* <user> + '@' + <host> + ':' + <port> + '\0' */ data/bird2-2.0.7/proto/rpki/ssh_transport.c:56:39: [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(username) + 1 + strlen(host) + 1 + 5 + 1; /* <user> + '@' + <host> + ':' + <port> + '\0' */ data/bird2-2.0.7/proto/rpki/tcp_transport.c:53:17: [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). ident_len = strlen(host) + colon_and_port_len + 1; data/bird2-2.0.7/sysdep/bsd/krt-sock.c:966:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int l = read(sk->fd, (char *)&msg, sizeof(msg)); data/bird2-2.0.7/sysdep/bsd/krt-sock.c:1158:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, i->name, IFNAMSIZ); data/bird2-2.0.7/sysdep/bsd/setkey.h:68: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). uint passwd_len = passwd ? strlen(passwd) : 0; data/bird2-2.0.7/sysdep/bsd/setkey.h:159: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). int len = strlen(passwd); data/bird2-2.0.7/sysdep/linux/netlink.c:842:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(f.name, name, sizeof(f.name)-1); data/bird2-2.0.7/sysdep/linux/sysio.h:181: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). int len = strlen(passwd); data/bird2-2.0.7/sysdep/unix/io.c:1865:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = read(s->fd, s->rpos, s->rbuf + s->rbsize - s->rpos); data/bird2-2.0.7/sysdep/unix/io.c:2371: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). if (strlen(path) >= sizeof(sa.sun_path)) data/bird2-2.0.7/sysdep/unix/log.c:179: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). off_t msg_len = strlen(tbuf) + strlen(class_names[class]) + data/bird2-2.0.7/sysdep/unix/log.c:179: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). off_t msg_len = strlen(tbuf) + strlen(class_names[class]) + data/bird2-2.0.7/sysdep/unix/main.c:116:20: [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). name = namebuf + strlen(prefix); data/bird2-2.0.7/sysdep/unix/main.c:159:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int l = read(fd, dest, len); data/bird2-2.0.7/sysdep/unix/unix.h:98:73: [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). #define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path)) data/bird2-2.0.7/test/birdtest.c:31:18: [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). snprintf(s + strlen(s), sizeof(s) - strlen(s), format, ##__VA_ARGS__) data/bird2-2.0.7/test/birdtest.c:31: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). snprintf(s + strlen(s), sizeof(s) - strlen(s), format, ##__VA_ARGS__) data/bird2-2.0.7/test/birdtest.c:205:13: [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). (fmt && strlen(fmt) > 0) ? ": " : "", data/bird2-2.0.7/test/birdtest.c:209: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). pos = msg_buf + strlen(msg_buf); data/bird2-2.0.7/test/birdtest.c:215: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). for (uint i = 0; i < strlen(msg_buf); i += get_num_terminal_cols()) data/bird2-2.0.7/test/birdtest.c:431:20: [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). opts->in_fmt(b+strlen(b), sizeof(b)-strlen(b), opts->data[i].in); data/bird2-2.0.7/test/birdtest.c:431: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). opts->in_fmt(b+strlen(b), sizeof(b)-strlen(b), opts->data[i].in); data/bird2-2.0.7/test/birdtest.c:433: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). opts->out_fmt(b+strlen(b), sizeof(b)-strlen(b), opts->out_buf); data/bird2-2.0.7/test/birdtest.c:433: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). opts->out_fmt(b+strlen(b), sizeof(b)-strlen(b), opts->out_buf); data/bird2-2.0.7/test/birdtest.c:438: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). opts->out_fmt(b+strlen(b), sizeof(b)-strlen(b), opts->data[i].out); data/bird2-2.0.7/test/birdtest.c:438: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). opts->out_fmt(b+strlen(b), sizeof(b)-strlen(b), opts->data[i].out); data/bird2-2.0.7/test/birdtest.c:464:18: [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). snprintf(buf+strlen(buf), size-strlen(buf), bt_is_char(*s) ? "%c" : "\\%03u", *s); data/bird2-2.0.7/test/birdtest.c:464: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). snprintf(buf+strlen(buf), size-strlen(buf), bt_is_char(*s) ? "%c" : "\\%03u", *s); data/bird2-2.0.7/test/birdtest.c:467: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). snprintf(buf+strlen(buf), size-strlen(buf), "\""); data/bird2-2.0.7/test/birdtest.c:467: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). snprintf(buf+strlen(buf), size-strlen(buf), "\""); data/bird2-2.0.7/test/birdtest.h:125:18: [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). snprintf(s + strlen(s), sizeof(s) - strlen(s), format, ##__VA_ARGS__) data/bird2-2.0.7/test/birdtest.h:125: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). snprintf(s + strlen(s), sizeof(s) - strlen(s), format, ##__VA_ARGS__) data/bird2-2.0.7/test/bt-utils.c:50:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int l = read(fd, dest, max_len); data/bird2-2.0.7/test/bt-utils.c:174: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). bt_config_parse_remain_len = strlen(cfg_str); ANALYSIS SUMMARY: Hits = 445 Lines analyzed = 82659 in approximately 1.96 seconds (42156 lines/second) Physical Source Lines of Code (SLOC) = 56951 Hits@level = [0] 46 [1] 122 [2] 272 [3] 21 [4] 28 [5] 2 Hits@level+ = [0+] 491 [1+] 445 [2+] 323 [3+] 51 [4+] 30 [5+] 2 Hits/KSLOC@level+ = [0+] 8.62145 [1+] 7.81373 [2+] 5.67154 [3+] 0.895507 [4+] 0.526769 [5+] 0.0351179 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.