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/libosmo-abis-1.0.1/include/internal.h Examining data/libosmo-abis-1.0.1/include/mISDNif.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/abis.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/e1_input.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/ipa.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/ipa_proxy.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/ipaccess.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/lapd.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/lapd_pcap.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/subchan_demux.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/trau_frame.h Examining data/libosmo-abis-1.0.1/include/osmocom/abis/unixsocket_proto.h Examining data/libosmo-abis-1.0.1/include/osmocom/trau/osmo_ortp.h Examining data/libosmo-abis-1.0.1/src/e1_input.c Examining data/libosmo-abis-1.0.1/src/e1_input_vty.c Examining data/libosmo-abis-1.0.1/src/init.c Examining data/libosmo-abis-1.0.1/src/input/dahdi.c Examining data/libosmo-abis-1.0.1/src/input/e1d.c Examining data/libosmo-abis-1.0.1/src/input/ipa.c Examining data/libosmo-abis-1.0.1/src/input/ipa_keepalive.c Examining data/libosmo-abis-1.0.1/src/input/ipaccess.c Examining data/libosmo-abis-1.0.1/src/input/lapd.c Examining data/libosmo-abis-1.0.1/src/input/lapd_pcap.c Examining data/libosmo-abis-1.0.1/src/input/misdn.c Examining data/libosmo-abis-1.0.1/src/input/rs232.c Examining data/libosmo-abis-1.0.1/src/input/unixsocket.c Examining data/libosmo-abis-1.0.1/src/ipa_proxy.c Examining data/libosmo-abis-1.0.1/src/subchan_demux.c Examining data/libosmo-abis-1.0.1/src/trau/osmo_ortp.c Examining data/libosmo-abis-1.0.1/src/trau_frame.c Examining data/libosmo-abis-1.0.1/tests/e1inp_ipa_bsc_test.c Examining data/libosmo-abis-1.0.1/tests/e1inp_ipa_bts_test.c Examining data/libosmo-abis-1.0.1/tests/ipa_proxy_test.c Examining data/libosmo-abis-1.0.1/tests/ipa_recv/ipa_recv_test.c Examining data/libosmo-abis-1.0.1/tests/rtp_test/rtp_test.c Examining data/libosmo-abis-1.0.1/tests/subchan_demux/subchan_demux_test.c FINAL RESULTS: data/libosmo-abis-1.0.1/src/trau/osmo_ortp.c:127:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s%s%s%s", domain_str, domain_len ? ": " : "", fmt, needs_endl ? "\n" : ""); data/libosmo-abis-1.0.1/tests/ipa_recv/ipa_recv_test.c:67: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((char *)l2, text); data/libosmo-abis-1.0.1/src/trau/osmo_ortp.c:404: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. rtp_session_set_seq_number(rs->sess, random()); data/libosmo-abis-1.0.1/src/trau/osmo_ortp.c:405:21: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rs->tx_timestamp = random(); data/libosmo-abis-1.0.1/include/mISDNif.h:292: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 name[MISDN_MAX_IDLEN]; data/libosmo-abis-1.0.1/include/mISDNif.h:297: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 name[MISDN_MAX_IDLEN]; data/libosmo-abis-1.0.1/src/e1_input.c:373: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 buf[512]; data/libosmo-abis-1.0.1/src/e1_input.c:483: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(clone, line, sizeof(struct e1inp_line)); data/libosmo-abis-1.0.1/src/e1_input_vty.c:64:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int e1_nr = atoi(argv[0]); data/libosmo-abis-1.0.1/src/e1_input_vty.c:86:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int e1_nr = atoi(argv[0]); data/libosmo-abis-1.0.1/src/e1_input_vty.c:94:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). line->port_nr = atoi(argv[1]); data/libosmo-abis-1.0.1/src/e1_input_vty.c:105:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int e1_nr = atoi(argv[0]); data/libosmo-abis-1.0.1/src/e1_input_vty.c:153:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return set_keepalive_params(vty, atoi(argv[0]), data/libosmo-abis-1.0.1/src/e1_input_vty.c:165:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return set_keepalive_params(vty, atoi(argv[0]), data/libosmo-abis-1.0.1/src/e1_input_vty.c:166:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(argv[1]), atoi(argv[2]), atoi(argv[3])); data/libosmo-abis-1.0.1/src/e1_input_vty.c:166:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(argv[1]), atoi(argv[2]), atoi(argv[3])); data/libosmo-abis-1.0.1/src/e1_input_vty.c:166:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(argv[1]), atoi(argv[2]), atoi(argv[3])); data/libosmo-abis-1.0.1/src/e1_input_vty.c:173:35: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return set_keepalive_params(vty, atoi(argv[0]), 0, 0, 0); data/libosmo-abis-1.0.1/src/e1_input_vty.c:207:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return set_ipa_keepalive_params(vty, atoi(argv[0]), atoi(argv[1]), atoi(argv[2])); data/libosmo-abis-1.0.1/src/e1_input_vty.c:207:54: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return set_ipa_keepalive_params(vty, atoi(argv[0]), atoi(argv[1]), atoi(argv[2])); data/libosmo-abis-1.0.1/src/e1_input_vty.c:207:69: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return set_ipa_keepalive_params(vty, atoi(argv[0]), atoi(argv[1]), atoi(argv[2])); data/libosmo-abis-1.0.1/src/e1_input_vty.c:214:39: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return set_ipa_keepalive_params(vty, atoi(argv[0]), 0, 0); data/libosmo-abis-1.0.1/src/e1_input_vty.c:222:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int e1_nr = atoi(argv[0]); data/libosmo-abis-1.0.1/src/e1_input_vty.c:245:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(argv[0], O_WRONLY | O_CREAT | O_TRUNC, 0660); data/libosmo-abis-1.0.1/src/e1_input_vty.c:372:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int num = atoi(argv[0]); data/libosmo-abis-1.0.1/src/e1_input_vty.c:422:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int num = atoi(argv[0]); data/libosmo-abis-1.0.1/src/e1_input_vty.c:437:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ts_nr = atoi(argv[1]); data/libosmo-abis-1.0.1/src/input/dahdi.c:75: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). if ((fd = open("/dev/dahdi/ctl", O_RDWR)) < 0) { data/libosmo-abis-1.0.1/src/input/dahdi.c:235: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, msg->data, msg->len); data/libosmo-abis-1.0.1/src/input/dahdi.c:293: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, msg->data, msg->len); data/libosmo-abis-1.0.1/src/input/dahdi.c:591: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 openstr[128]; data/libosmo-abis-1.0.1/src/input/dahdi.c:596:7: [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). rc = open(openstr, O_RDWR | O_NONBLOCK); data/libosmo-abis-1.0.1/src/input/dahdi.c:674: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 name[32]; data/libosmo-abis-1.0.1/src/input/e1d.c:406: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 name[32]; data/libosmo-abis-1.0.1/src/input/ipa.c:268: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[INET6_ADDRSTRLEN + 1]; data/libosmo-abis-1.0.1/src/input/ipaccess.c:737: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 str[IPA_STRING_MAX]; data/libosmo-abis-1.0.1/src/input/ipaccess.c:806: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(tag + 3, str, strlen(str) + 1); data/libosmo-abis-1.0.1/src/input/lapd.c:240: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 name[256]; data/libosmo-abis-1.0.1/src/input/lapd.c:356:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(msg->l2h, resp, 8); data/libosmo-abis-1.0.1/src/input/lapd_pcap.c:111:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, mode); data/libosmo-abis-1.0.1/src/input/lapd_pcap.c:134: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 buf[sizeof(struct pcap_rechdr) + data/libosmo-abis-1.0.1/src/input/lapd_pcap.c:159: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(buf + numbytes, &pcap_rechdr, sizeof(pcap_rechdr)); data/libosmo-abis-1.0.1/src/input/lapd_pcap.c:162: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(buf + numbytes, &header, sizeof(header)); data/libosmo-abis-1.0.1/src/input/lapd_pcap.c:165: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(buf + numbytes, msg->data, msg->len); data/libosmo-abis-1.0.1/src/input/misdn.c:639: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 name[32]; data/libosmo-abis-1.0.1/src/input/rs232.c:223:7: [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). rc = open(serial_port, O_RDWR); data/libosmo-abis-1.0.1/src/input/unixsocket.c:290: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[32]; data/libosmo-abis-1.0.1/src/ipa_proxy.c:52: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 name[IPA_INSTANCE_NAME]; data/libosmo-abis-1.0.1/src/ipa_proxy.c:241:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). port = atoi(argv[3]); data/libosmo-abis-1.0.1/src/subchan_demux.c:232: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(bits + num_bits, txe->bits + txe->next_bit, num_bits_thistime); data/libosmo-abis-1.0.1/src/subchan_demux.c:330: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(tqe->bits, data, len); data/libosmo-abis-1.0.1/src/trau/osmo_ortp.c:661: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. static char hostbuf[256]; data/libosmo-abis-1.0.1/src/trau_frame.c:60: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(fr->c_bits+0, trau_bits+17, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:62: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(fr->c_bits+15, trau_bits+310, 6); data/libosmo-abis-1.0.1/src/trau_frame.c:64: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(fr->t_bits+0, trau_bits+316, 4); data/libosmo-abis-1.0.1/src/trau_frame.c:67: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(fr->d_bits + d_idx, trau_bits+i+1, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:71: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(fr->d_bits + d_idx, trau_bits + 305, 5); data/libosmo-abis-1.0.1/src/trau_frame.c:81: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(fr->c_bits+0, trau_bits+17, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:83: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(fr->c_bits+15, trau_bits+33, 10); data/libosmo-abis-1.0.1/src/trau_frame.c:85: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(fr->t_bits+0, trau_bits+316, 4); data/libosmo-abis-1.0.1/src/trau_frame.c:87: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(fr->d_bits, trau_bits+43, 5); data/libosmo-abis-1.0.1/src/trau_frame.c:91: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(fr->d_bits + d_idx, trau_bits+i+1, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:95: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(fr->d_bits + d_idx, trau_bits + 305, 11); data/libosmo-abis-1.0.1/src/trau_frame.c:101: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(fr->c_bits+0, trau_bits+17, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:103: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(fr->d_bits, trau_bits+32, 288); data/libosmo-abis-1.0.1/src/trau_frame.c:157: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(fr->c_bits, ft_fr_down_bits, 5); data/libosmo-abis-1.0.1/src/trau_frame.c:177: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(fr->c_bits, ft_idle_down_bits, 5); data/libosmo-abis-1.0.1/src/trau_frame.c:185: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(fr->c_bits, ft_data_down_bits, 5); data/libosmo-abis-1.0.1/src/trau_frame.c:220: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(trau_bits+17, fr->c_bits+0, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:224: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(trau_bits+i+1, fr->d_bits + d_idx, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:229: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(trau_bits + 305, fr->d_bits + d_idx, 5); data/libosmo-abis-1.0.1/src/trau_frame.c:231: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(trau_bits+310, fr->c_bits+15, 6); data/libosmo-abis-1.0.1/src/trau_frame.c:236: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(trau_bits+316, fr->t_bits+0, 4); data/libosmo-abis-1.0.1/src/trau_frame.c:243: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(trau_bits+17, fr->c_bits+0, 15); data/libosmo-abis-1.0.1/src/trau_frame.c:245: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(trau_bits+32, fr->d_bits, 288); data/libosmo-abis-1.0.1/tests/e1inp_ipa_bsc_test.c:122:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, attr, att_len); data/libosmo-abis-1.0.1/tests/e1inp_ipa_bts_test.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(ptr, attr, att_len); data/libosmo-abis-1.0.1/tests/ipa_recv/ipa_recv_test.c:122: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 buf[256]; data/libosmo-abis-1.0.1/src/e1_input_vty.c:109:6: [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(argv[1]) > sizeof(sun.sun_path) - 1) { data/libosmo-abis-1.0.1/src/input/dahdi.c:181:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, TS1_ALLOC_SIZE - 16); data/libosmo-abis-1.0.1/src/input/dahdi.c:314:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, TS1_ALLOC_SIZE - 16); data/libosmo-abis-1.0.1/src/input/dahdi.c:376:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE); data/libosmo-abis-1.0.1/src/input/dahdi.c:443:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE); data/libosmo-abis-1.0.1/src/input/e1d.c:70:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, TS_SIGN_ALLOC_SIZE - 16); data/libosmo-abis-1.0.1/src/input/e1d.c:169:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE); data/libosmo-abis-1.0.1/src/input/e1d.c:236:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, D_TSX_ALLOC_SIZE); data/libosmo-abis-1.0.1/src/input/ipaccess.c:802: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). tag = msgb_put(nmsg, 3 + strlen(str) + 1); data/libosmo-abis-1.0.1/src/input/ipaccess.c:804: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). tag[1] = 1 + strlen(str) + 1; data/libosmo-abis-1.0.1/src/input/ipaccess.c:806: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). memcpy(tag + 3, str, strlen(str) + 1); data/libosmo-abis-1.0.1/src/input/rs232.c:110:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(sh->delay_ms*1000); data/libosmo-abis-1.0.1/src/input/rs232.c:133:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(bfd->fd, msg->tail, 2 - msg->len); data/libosmo-abis-1.0.1/src/input/rs232.c:158:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(bfd->fd, msg->tail, sh->rxmsg_bytes_missing); data/libosmo-abis-1.0.1/src/input/unixsocket.c:90:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(bfd->fd, msg->data, UNIXSOCKET_ALLOC_SIZE - 16); data/libosmo-abis-1.0.1/src/trau/osmo_ortp.c:112: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). size_t fmt_len = strlen(fmt); data/libosmo-abis-1.0.1/src/trau/osmo_ortp.c:119: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 domain_len = strlen(domain_str); data/libosmo-abis-1.0.1/tests/e1inp_ipa_bts_test.c:215:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(eventfds[0], &event_type, sizeof(unsigned int)) < 0) { data/libosmo-abis-1.0.1/tests/ipa_recv/ipa_recv_test.c:60: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(text) + 1; ANALYSIS SUMMARY: Hits = 97 Lines analyzed = 11755 in approximately 0.31 seconds (38176 lines/second) Physical Source Lines of Code (SLOC) = 8616 Hits@level = [0] 60 [1] 19 [2] 74 [3] 2 [4] 2 [5] 0 Hits@level+ = [0+] 157 [1+] 97 [2+] 78 [3+] 4 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 18.2219 [1+] 11.2581 [2+] 9.05292 [3+] 0.464253 [4+] 0.232126 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.