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/o2-1.0~repack/test/oscanytest.c Examining data/o2-1.0~repack/test/midiserver.c Examining data/o2-1.0~repack/test/cmtio.h Examining data/o2-1.0~repack/test/cmtio.c Examining data/o2-1.0~repack/test/lo_bndlrecv.c Examining data/o2-1.0~repack/test/clockslave.c Examining data/o2-1.0~repack/test/bundletest.c Examining data/o2-1.0~repack/test/lo_oscsend.c Examining data/o2-1.0~repack/test/arraytest.c Examining data/o2-1.0~repack/test/broadcastserver.c Examining data/o2-1.0~repack/test/oscsendtest.c Examining data/o2-1.0~repack/test/clockmaster.c Examining data/o2-1.0~repack/test/tcpclient.c Examining data/o2-1.0~repack/test/o2server.c Examining data/o2-1.0~repack/test/typestest.c Examining data/o2-1.0~repack/test/lo_oscrecv.c Examining data/o2-1.0~repack/test/statusserver.c Examining data/o2-1.0~repack/test/dispatchtest.c Examining data/o2-1.0~repack/test/broadcastclient2.c Examining data/o2-1.0~repack/test/tcpserver.c Examining data/o2-1.0~repack/test/lo_benchmk_server.c Examining data/o2-1.0~repack/test/lo_bndlsend.c Examining data/o2-1.0~repack/test/tcppollclient.c Examining data/o2-1.0~repack/test/oscrecvtest.c Examining data/o2-1.0~repack/test/midiclient.c Examining data/o2-1.0~repack/test/o2client.c Examining data/o2-1.0~repack/test/oscbndlrecv.c Examining data/o2-1.0~repack/test/tcppollserver.c Examining data/o2-1.0~repack/test/coercetest.c Examining data/o2-1.0~repack/test/statusclient.c Examining data/o2-1.0~repack/test/usleep.h Examining data/o2-1.0~repack/test/broadcastclient.c Examining data/o2-1.0~repack/test/oscbndlsend.c Examining data/o2-1.0~repack/test/longtest.c Examining data/o2-1.0~repack/test/lo_benchmk_client.c Examining data/o2-1.0~repack/src/o2_internal.h Examining data/o2-1.0~repack/src/o2_interoperation.h Examining data/o2-1.0~repack/src/o2_clock.c Examining data/o2-1.0~repack/src/o2_search.h Examining data/o2-1.0~repack/src/o2_debug.h Examining data/o2-1.0~repack/src/o2_message.h Examining data/o2-1.0~repack/src/o2_debug.c Examining data/o2-1.0~repack/src/o2_search.c Examining data/o2-1.0~repack/src/o2_discovery.h Examining data/o2-1.0~repack/src/o2_socket.h Examining data/o2-1.0~repack/src/o2_socket.c Examining data/o2-1.0~repack/src/o2_dynamic.h Examining data/o2-1.0~repack/src/o2.h Examining data/o2-1.0~repack/src/o2_discovery.c Examining data/o2-1.0~repack/src/o2_sched.h Examining data/o2-1.0~repack/src/o2_message.c Examining data/o2-1.0~repack/src/o2_sched.c Examining data/o2-1.0~repack/src/o2_dynamic.c Examining data/o2-1.0~repack/src/o2_send.c Examining data/o2-1.0~repack/src/o2.c Examining data/o2-1.0~repack/src/o2_send.h Examining data/o2-1.0~repack/src/o2_clock.h Examining data/o2-1.0~repack/src/o2_interoperation.c FINAL RESULTS: data/o2-1.0~repack/src/o2.c:700:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(o2_error_msg, "O2 error %s", error_strings[-i]); data/o2-1.0~repack/src/o2_clock.c:64:48: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #error o2_clock has no implementation for this system data/o2-1.0~repack/src/o2_clock.c:461:48: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #error o2_clock has no implementation for this system data/o2-1.0~repack/src/o2_internal.h:39:9: [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. #define snprintf _snprintf data/o2-1.0~repack/src/o2_internal.h:39:18: [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. #define snprintf _snprintf data/o2-1.0~repack/src/o2_interoperation.c:267:9: [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(o2msg->data.address + 1, service); data/o2-1.0~repack/src/o2_search.c:765: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(rslt, path); data/o2-1.0~repack/src/o2_socket.c:403:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s:%d", o2_local_ip, port); data/o2-1.0~repack/test/arraytest.c:33:9: [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. #define snprintf _snprintf data/o2-1.0~repack/test/arraytest.c:33:18: [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. #define snprintf _snprintf data/o2-1.0~repack/test/coercetest.c:12:9: [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. #define snprintf _snprintf data/o2-1.0~repack/test/coercetest.c:12:18: [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. #define snprintf _snprintf data/o2-1.0~repack/test/lo_benchmk_client.c:38:9: [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(addresses[i], path); data/o2-1.0~repack/test/lo_benchmk_server.c:39:9: [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(addresses[i], path); data/o2-1.0~repack/test/o2client.c:79:9: [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(server_addresses[i], path); data/o2-1.0~repack/test/o2server.c:81:9: [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(client_addresses[i], path); data/o2-1.0~repack/test/tcpclient.c:75:9: [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(server_addresses[i], path); data/o2-1.0~repack/test/tcppollclient.c:51:9: [4] (buffer) fscanf: 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 (fscanf(inf, "%s %d", ip, &tcp_port) != 2) { data/o2-1.0~repack/test/tcpserver.c:79:9: [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(client_addresses[i], path); data/o2-1.0~repack/test/broadcastserver.c:54:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand((int)td); data/o2-1.0~repack/src/o2.c:418: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 address[32]; data/o2-1.0~repack/src/o2.c:468:13: [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 address[32]; data/o2-1.0~repack/src/o2.c:561: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 padded_name[NAME_BUF_LEN]; data/o2-1.0~repack/src/o2.c:677: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 o2_error_msg[100]; data/o2-1.0~repack/src/o2.c:702:9: [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(o2_error_msg, "O2 error, code is %d", i); data/o2-1.0~repack/src/o2.h:424: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 address[4]; data/o2-1.0~repack/src/o2.h:480:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[4]; ///< the data, actually of variable length data/o2-1.0~repack/src/o2.h:543: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 s[4]; ///< Standard C, NULL terminated string. data/o2-1.0~repack/src/o2.h:546: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 S[4]; data/o2-1.0~repack/src/o2_clock.c:162: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 address[32]; data/o2-1.0~repack/src/o2_clock.c:349:17: [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 path[48]; // enough room for !IP:PORT/cs/get-reply data/o2-1.0~repack/src/o2_clock.c:407: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 address[1024]; data/o2-1.0~repack/src/o2_clock.c:408: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(address, replyto, len); data/o2-1.0~repack/src/o2_clock.c:409: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(address + len, "/get-reply", 11); // include EOS data/o2-1.0~repack/src/o2_discovery.c:175: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(o2_discovery_msg, msg, size); data/o2-1.0~repack/src/o2_discovery.c:299: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 address[32]; data/o2-1.0~repack/src/o2_discovery.c:329: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/o2-1.0~repack/src/o2_discovery.c:407: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/o2-1.0~repack/src/o2_dynamic.c:13: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(bigger, array->array, array->length * siz); data/o2-1.0~repack/src/o2_interoperation.c:130: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 padded_name[NAME_BUF_LEN]; data/o2-1.0~repack/src/o2_interoperation.c:139: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 port[24]; // can't overrun even with 64-bit int data/o2-1.0~repack/src/o2_interoperation.c:140: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(port, "%d", port_num); data/o2-1.0~repack/src/o2_interoperation.c:183:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&osc->udp_sa, &remote_addr, sizeof(remote_addr)); data/o2-1.0~repack/src/o2_interoperation.c:276:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(o2_ptr, oscmsg, addr_len); data/o2-1.0~repack/src/o2_interoperation.c:281:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(o2_ptr, osc_ptr, o2len); data/o2-1.0~repack/src/o2_message.c:265: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, s, s_len); data/o2-1.0~repack/src/o2_message.c:284: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, data, size); data/o2-1.0~repack/src/o2_message.c:317:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, data, length); data/o2-1.0~repack/src/o2_message.c:333: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, src, msg_len); data/o2-1.0~repack/src/o2_message.c:371:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst + 1, service, service_len); data/o2-1.0~repack/src/o2_message.c:374: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, address, addr_len); data/o2-1.0~repack/src/o2_message.c:384: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, msg_types.array, types_len); data/o2-1.0~repack/src/o2_message.c:386: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, msg_data.array, msg_data.length); data/o2-1.0~repack/src/o2_message.c:397: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(msg_data.array + msg_data.length, "#bundle", 8); data/o2-1.0~repack/src/o2_message.c:430: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(msg_data.array + msg_data.length, bytes, len); data/o2-1.0~repack/src/o2_search.c:119: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 *entry_tags[5] = { "PATTERN_NODE", "PATTERN_HANDLER", "SERVICES", data/o2-1.0~repack/src/o2_search.c:121: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 *info_tags[7] = { "UDP_SOCKET", "TCP_SOCKET", "OSC_SOCKET", data/o2-1.0~repack/src/o2_search.c:129:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char unknown[32]; data/o2-1.0~repack/src/o2_search.c:459: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[NAME_BUF_LEN]; data/o2-1.0~repack/src/o2_search.c:547: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(mhandler, handler, sizeof(handler_entry)); // copy the handler info data/o2-1.0~repack/src/o2_search.c:727: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 name[NAME_BUF_LEN]; data/o2-1.0~repack/src/o2_search.c:1041: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[NAME_BUF_LEN]; data/o2-1.0~repack/src/o2_send.c:69: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 key[NAME_BUF_LEN]; data/o2-1.0~repack/src/o2_send.c:198: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((char *) &(message->data), msg, len); data/o2-1.0~repack/src/o2_socket.c:51: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 o2_local_ip[24]; data/o2-1.0~repack/src/o2_socket.c:121:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d, src, sizeof(*d)); data/o2-1.0~repack/src/o2_socket.c:367: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]; // "100.100.100.100:65000" -> 21 chars data/o2-1.0~repack/src/o2_socket.c:484:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pfd, lastfd, sizeof(struct pollfd)); data/o2-1.0~repack/src/o2_socket.h:128: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 o2_local_ip[24]; data/o2-1.0~repack/test/arraytest.c:753: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_blob->data, "This is a blob", 15); data/o2-1.0~repack/test/arraytest.c:768: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 type_string[32]; data/o2-1.0~repack/test/arraytest.c:770: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 address[32]; data/o2-1.0~repack/test/arraytest.c:823: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 address[32]; data/o2-1.0~repack/test/broadcastclient.c:57: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 dgram[512]; /* Recv buffer */ data/o2-1.0~repack/test/broadcastclient2.c:44: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 dgram[512]; /* Recv buffer */ data/o2-1.0~repack/test/broadcastserver.c:96: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 bcbuf[512], *bp;/* Buffer and ptr */ data/o2-1.0~repack/test/broadcastserver.c:178:13: [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(bp, data/o2-1.0~repack/test/coercetest.c:366: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 address[32]; data/o2-1.0~repack/test/coercetest.c:369: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 send_types[4]; data/o2-1.0~repack/test/dispatchtest.c:18: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 p[100]; data/o2-1.0~repack/test/dispatchtest.c:19: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(p, "/two/benchmark/%d", s % N_ADDRS); data/o2-1.0~repack/test/dispatchtest.c:32: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 p[100]; data/o2-1.0~repack/test/dispatchtest.c:33: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(p, "/one/benchmark/%d", w % N_ADDRS); data/o2-1.0~repack/test/dispatchtest.c:50: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 path[100]; data/o2-1.0~repack/test/dispatchtest.c:51:9: [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(path, "/one/benchmark/%d", i); data/o2-1.0~repack/test/dispatchtest.c:57: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 path[100]; data/o2-1.0~repack/test/dispatchtest.c:58:9: [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(path, "/two/benchmark/%d", i); data/o2-1.0~repack/test/lo_benchmk_client.c:9: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 *addresses[N_ADDRS]; data/o2-1.0~repack/test/lo_benchmk_client.c:35: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 path[100]; data/o2-1.0~repack/test/lo_benchmk_client.c:36:9: [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(path, "/benchmark/%d", i); data/o2-1.0~repack/test/lo_benchmk_server.c:9: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 *addresses[N_ADDRS]; data/o2-1.0~repack/test/lo_benchmk_server.c:36: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 path[100]; data/o2-1.0~repack/test/lo_benchmk_server.c:37:9: [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(path, "/benchmark/%d", i); data/o2-1.0~repack/test/lo_bndlsend.c:58: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 s[128]; data/o2-1.0~repack/test/lo_bndlsend.c:64: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(s, "first string at %g", touter); data/o2-1.0~repack/test/lo_bndlsend.c:74: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(s, "msg1 string at %g", tinner); data/o2-1.0~repack/test/lo_bndlsend.c:80: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(s, "msg2 string at %g", tinner); data/o2-1.0~repack/test/lo_bndlsend.c:106: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 s[128]; data/o2-1.0~repack/test/lo_bndlsend.c:118:9: [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(s, "an arbitrary string at 2.%d", i); data/o2-1.0~repack/test/lo_bndlsend.c:124:9: [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(s, "another arbitrary string at 2.%d", i); data/o2-1.0~repack/test/longtest.c:14: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 a_midi_msg[4]; data/o2-1.0~repack/test/longtest.c:111: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 address[32]; data/o2-1.0~repack/test/longtest.c:112: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 types[200]; data/o2-1.0~repack/test/longtest.c:118:9: [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(address, "/one/f%d", i); data/o2-1.0~repack/test/longtest.c:136:9: [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(address, "/one/d%d", i); data/o2-1.0~repack/test/longtest.c:154:9: [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(address, "/one/fc%d", i); data/o2-1.0~repack/test/longtest.c:173:9: [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(address, "/one/dc%d", i); data/o2-1.0~repack/test/midiclient.c:19: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 *server_addresses[N_ADDRS]; data/o2-1.0~repack/test/o2client.c:22: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 *server_addresses[N_ADDRS]; data/o2-1.0~repack/test/o2client.c:55:25: [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). max_msg_count = atoi(argv[1]); data/o2-1.0~repack/test/o2client.c:70: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 path[100]; data/o2-1.0~repack/test/o2client.c:71:9: [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(path, "/client/benchmark/%d", i); data/o2-1.0~repack/test/o2client.c:76: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 path[100]; data/o2-1.0~repack/test/o2client.c:77:9: [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(path, "!server/benchmark/%d", i); data/o2-1.0~repack/test/o2server.c:26: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 *client_addresses[N_ADDRS]; data/o2-1.0~repack/test/o2server.c:70: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 path[100]; data/o2-1.0~repack/test/o2server.c:71:9: [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(path, "/server/benchmark/%d", i); data/o2-1.0~repack/test/o2server.c:78: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 path[100]; data/o2-1.0~repack/test/o2server.c:79:9: [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(path, "!client/benchmark/%d", i); data/o2-1.0~repack/test/oscbndlsend.c:57: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 s[128]; data/o2-1.0~repack/test/oscbndlsend.c:59: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(s, "first string at %g", touter); data/o2-1.0~repack/test/oscbndlsend.c:63: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(s, "msg1 string at %g", tinner); data/o2-1.0~repack/test/oscbndlsend.c:69: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(s, "msg2 string at %g", tinner); data/o2-1.0~repack/test/oscbndlsend.c:107: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 s[128]; data/o2-1.0~repack/test/oscbndlsend.c:130:9: [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(s, "an arbitrary string at 2.%d", i); data/o2-1.0~repack/test/oscbndlsend.c:135:9: [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(s, "another arbitrary string at 2.%d", i); data/o2-1.0~repack/test/tcpclient.c:22: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 *server_addresses[N_ADDRS]; data/o2-1.0~repack/test/tcpclient.c:52:25: [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). max_msg_count = atoi(argv[1]); data/o2-1.0~repack/test/tcpclient.c:66: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 path[100]; data/o2-1.0~repack/test/tcpclient.c:67:9: [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(path, "/client/benchmark/%d", i); data/o2-1.0~repack/test/tcpclient.c:72: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 path[100]; data/o2-1.0~repack/test/tcpclient.c:73:9: [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(path, "!server/benchmark/%d", i); data/o2-1.0~repack/test/tcppollclient.c:47:17: [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 *inf = fopen("port.dat", "r"); data/o2-1.0~repack/test/tcppollclient.c:49: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 ip[100]; data/o2-1.0~repack/test/tcppollserver.c:54: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 o2_local_ip[24]; data/o2-1.0~repack/test/tcppollserver.c:133:18: [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 *outf = fopen("port.dat", "w"); data/o2-1.0~repack/test/tcppollserver.c:174:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1001]; data/o2-1.0~repack/test/tcppollserver.c:207:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1001]; data/o2-1.0~repack/test/tcppollserver.c: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(d, src, sizeof(*d)); data/o2-1.0~repack/test/tcpserver.c:24: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 *client_addresses[N_ADDRS]; data/o2-1.0~repack/test/tcpserver.c:68: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 path[100]; data/o2-1.0~repack/test/tcpserver.c:69:9: [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(path, "/server/benchmark/%d", i); data/o2-1.0~repack/test/tcpserver.c:76: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 path[100]; data/o2-1.0~repack/test/tcpserver.c:77:9: [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(path, "!client/benchmark/%d", i); data/o2-1.0~repack/test/typestest.c:531:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a_blob->data, "This is a blob", 15); data/o2-1.0~repack/src/o2.c:606:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. #define usleep(x) Sleep((x)/1000) data/o2-1.0~repack/src/o2.c:616:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(sleep_usec); data/o2-1.0~repack/src/o2.h:439: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). WORD_ALIGN_PTR((msg)->address + strlen((msg)->address) + 4) + 1; data/o2-1.0~repack/src/o2_clock.c:402: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). int len = (int) strlen(replyto); data/o2-1.0~repack/src/o2_interoperation.c:260: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). int service_len = (int) strlen(service); data/o2-1.0~repack/src/o2_interoperation.c:269: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). int addr_len = (int) strlen(oscmsg); data/o2-1.0~repack/src/o2_interoperation.c:355: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). int service_len = (int) strlen(service->service_name) + 1; // include slash data/o2-1.0~repack/src/o2_message.c:259: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). int s_len = (int) strlen(s); data/o2-1.0~repack/src/o2_message.c:352: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). int addr_len = (int) strlen(address); data/o2-1.0~repack/src/o2_message.c:354: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). int service_len = (service ? (int) strlen(service) + 1 : 0); data/o2-1.0~repack/src/o2_message.c:601: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). return (int) ((strlen(s) + 4) & ~3); data/o2-1.0~repack/src/o2_message.c:731:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int types_len = (int) strlen(types); data/o2-1.0~repack/src/o2_message.c:985:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int types_len = (int) strlen(mx_types); data/o2-1.0~repack/src/o2_message.c:1315: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). MX_SKIP(strlen(mx_data_next) + 1); // add one for end-of-string data/o2-1.0~repack/src/o2_message.c:1452:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int types_len = (int) strlen(types); data/o2-1.0~repack/src/o2_search.c:218:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int types_len = (int) strlen(types); data/o2-1.0~repack/src/o2_search.c:299:46: [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 *path_end = remaining + strlen(remaining); data/o2-1.0~repack/src/o2_search.c:314:46: [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 *path_end = remaining + strlen(remaining); data/o2-1.0~repack/src/o2_search.c:488:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). types_len = (int) strlen(typespec); data/o2-1.0~repack/src/o2_search.c:1275: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). size_t len = strlen(src); data/o2-1.0~repack/src/o2_search.c:1283:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, src, len); data/o2-1.0~repack/test/broadcastserver.c:183: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). bp += strlen(bp); data/o2-1.0~repack/test/broadcastserver.c:191: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). strlen(bcbuf), data/o2-1.0~repack/test/broadcastserver.c:201: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). strlen(bcbuf), data/o2-1.0~repack/test/cmtio.c:111:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch(read(IOinputfd, &c, 1)) { data/o2-1.0~repack/test/cmtio.c:134:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch(read(IOinputfd, &c, 1)) { data/o2-1.0~repack/test/cmtio.c:159:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(IOinputfd, &c, 1) == 1) return c; data/o2-1.0~repack/test/lo_benchmk_client.c:37: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). addresses[i] = (char *) malloc(strlen(path)); data/o2-1.0~repack/test/lo_benchmk_server.c:38: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). addresses[i] = (char *) malloc(strlen(path)); data/o2-1.0~repack/test/lo_bndlrecv.c:114:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); // 10ms data/o2-1.0~repack/test/lo_oscrecv.c:79:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); // 10ms data/o2-1.0~repack/test/lo_oscsend.c:36:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/lo_oscsend.c:61:13: [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(2000); // 2ms data/o2-1.0~repack/test/midiclient.c:34:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/midiclient.c:54:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/midiserver.c:65:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); // 1ms data/o2-1.0~repack/test/o2client.c:78:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). server_addresses[i] = (char *) (O2_MALLOC(strlen(path))); data/o2-1.0~repack/test/o2client.c:84:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/o2client.c:91:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/o2server.c:80:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). client_addresses[i] = (char *) (O2_MALLOC(strlen(path))); data/o2-1.0~repack/test/o2server.c:90:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/o2server.c:99:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/oscanytest.c:83:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/oscbndlrecv.c:140:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); // 1ms data/o2-1.0~repack/test/oscbndlsend.c:111:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/oscrecvtest.c:76:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/oscsendtest.c:45:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/oscsendtest.c:60:13: [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(2000); // 2ms data/o2-1.0~repack/test/oscsendtest.c:71:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/statusclient.c:41:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/statusserver.c:36:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/statusserver.c:45:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/tcpclient.c:74:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). server_addresses[i] = (char *) (O2_MALLOC(strlen(path))); data/o2-1.0~repack/test/tcpclient.c:80:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/tcpclient.c:87:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/tcpclient.c:101:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/tcppollclient.c:77: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). if (write(sock, msg, strlen(msg) + 1) < 0) { data/o2-1.0~repack/test/tcpserver.c:78:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). client_addresses[i] = (char *) (O2_MALLOC(strlen(path))); data/o2-1.0~repack/test/tcpserver.c:88:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); // 2ms data/o2-1.0~repack/test/tcpserver.c:97:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(2000); data/o2-1.0~repack/test/usleep.h:24:6: [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. void usleep(long usec) ANALYSIS SUMMARY: Hits = 206 Lines analyzed = 14559 in approximately 0.40 seconds (35969 lines/second) Physical Source Lines of Code (SLOC) = 9134 Hits@level = [0] 385 [1] 61 [2] 125 [3] 1 [4] 19 [5] 0 Hits@level+ = [0+] 591 [1+] 206 [2+] 145 [3+] 20 [4+] 19 [5+] 0 Hits/KSLOC@level+ = [0+] 64.7033 [1+] 22.5531 [2+] 15.8748 [3+] 2.18962 [4+] 2.08014 [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.