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/ortp-4.4.0/build/android/ortp_AndroidConfig.h Examining data/ortp-4.4.0/build/wp8/oRTP/inttypes.h Examining data/ortp-4.4.0/build/wp8/oRTP/stdint.h Examining data/ortp-4.4.0/include/MSVC/inttypes.h Examining data/ortp-4.4.0/include/MSVC/stdint.h Examining data/ortp-4.4.0/include/ortp/b64.h Examining data/ortp-4.4.0/include/ortp/event.h Examining data/ortp-4.4.0/include/ortp/logging.h Examining data/ortp-4.4.0/include/ortp/nack.h Examining data/ortp-4.4.0/include/ortp/ortp.h Examining data/ortp-4.4.0/include/ortp/payloadtype.h Examining data/ortp-4.4.0/include/ortp/port.h Examining data/ortp-4.4.0/include/ortp/rtcp.h Examining data/ortp-4.4.0/include/ortp/rtpprofile.h Examining data/ortp-4.4.0/include/ortp/rtpsignaltable.h Examining data/ortp-4.4.0/include/ortp/sessionset.h Examining data/ortp-4.4.0/include/ortp/str_utils.h Examining data/ortp-4.4.0/include/ortp/telephonyevents.h Examining data/ortp-4.4.0/include/ortp/utils.h Examining data/ortp-4.4.0/include/ortp/rtp.h Examining data/ortp-4.4.0/include/ortp/rtpsession.h Examining data/ortp-4.4.0/src/avprofile.c Examining data/ortp-4.4.0/src/b64.c Examining data/ortp-4.4.0/src/congestiondetector.c Examining data/ortp-4.4.0/src/congestiondetector.h Examining data/ortp-4.4.0/src/dll_entry.c Examining data/ortp-4.4.0/src/event.c Examining data/ortp-4.4.0/src/extremum.c Examining data/ortp-4.4.0/src/jitterctl.c Examining data/ortp-4.4.0/src/jitterctl.h Examining data/ortp-4.4.0/src/kalmanrls.c Examining data/ortp-4.4.0/src/logging.c Examining data/ortp-4.4.0/src/nack.c Examining data/ortp-4.4.0/src/netsim.c Examining data/ortp-4.4.0/src/ortp.c Examining data/ortp-4.4.0/src/payloadtype.c Examining data/ortp-4.4.0/src/port.c Examining data/ortp-4.4.0/src/rtcp.c Examining data/ortp-4.4.0/src/rtcp_fb.c Examining data/ortp-4.4.0/src/rtcp_xr.c Examining data/ortp-4.4.0/src/rtcpparse.c Examining data/ortp-4.4.0/src/rtpbundle.cc Examining data/ortp-4.4.0/src/rtpbundle.h Examining data/ortp-4.4.0/src/rtpparse.c Examining data/ortp-4.4.0/src/rtpprofile.c Examining data/ortp-4.4.0/src/rtpsession_priv.h Examining data/ortp-4.4.0/src/rtpsignaltable.c Examining data/ortp-4.4.0/src/rtptimer.c Examining data/ortp-4.4.0/src/rtptimer.h Examining data/ortp-4.4.0/src/scheduler.c Examining data/ortp-4.4.0/src/sessionset.c Examining data/ortp-4.4.0/src/str_utils.c Examining data/ortp-4.4.0/src/tests/fmtpparse.c Examining data/ortp-4.4.0/src/tests/mrtprecv.c Examining data/ortp-4.4.0/src/tests/mrtpsend.c Examining data/ortp-4.4.0/src/tests/rtpextensionheader.c Examining data/ortp-4.4.0/src/tests/rtpmemtest.c Examining data/ortp-4.4.0/src/tests/rtprecv.c Examining data/ortp-4.4.0/src/tests/test_timer.c Examining data/ortp-4.4.0/src/tests/tevmrtprecv.c Examining data/ortp-4.4.0/src/tests/tevrtprecv.c Examining data/ortp-4.4.0/src/tests/tevrtpsend.c Examining data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp Examining data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp Examining data/ortp-4.4.0/src/tests/rtpsend.c Examining data/ortp-4.4.0/src/tests/rtpsend_stupid.c Examining data/ortp-4.4.0/src/utils.c Examining data/ortp-4.4.0/src/utils.h Examining data/ortp-4.4.0/src/videobandwidthestimator.c Examining data/ortp-4.4.0/src/videobandwidthestimator.h Examining data/ortp-4.4.0/src/winrttimer.cpp Examining data/ortp-4.4.0/src/winrttimer.h Examining data/ortp-4.4.0/src/posixtimer.c Examining data/ortp-4.4.0/src/rtpsession.c Examining data/ortp-4.4.0/src/rtpsession_inet.c Examining data/ortp-4.4.0/src/scheduler.h Examining data/ortp-4.4.0/src/telephonyevents.c FINAL RESULTS: data/ortp-4.4.0/include/ortp/port.h:174:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define vsnprintf _vsnprintf data/ortp-4.4.0/src/port.c:94:2: [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(ret,tmp); data/ortp-4.4.0/src/port.c:155:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. return access(pathname,F_OK); data/ortp-4.4.0/src/tests/mrtprecv.c:115:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s%4.4d.dat",argv[1],i); data/ortp-4.4.0/src/tests/rtpmemtest.c:114:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s%4.4d.dat",argv[1],i); data/ortp-4.4.0/src/tests/tevmrtprecv.c:136:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename,"%s%4.4d.dat",argv[1],i); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:45:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *) &strBuffer, "= RTPReceiver V1.0 - Date : %s - %s\n", __DATE__, __TIME__); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:46:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(strBuffer); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:126:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(help); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:132:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(help); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:180:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(strFilename,"%s%4.4d.dat",argv[1],i); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:76:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(help); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:85:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(help); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:98:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(help); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:116:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(help); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:143:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *) &strBuffer, "= RTPSender V1.0 - Date : %s - %s\n", __DATE__, __TIME__); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:144:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(strBuffer); data/ortp-4.4.0/src/netsim.c:76:25: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *sched_pref=getenv("ORTP_SIMULATOR_SCHED_POLICY"); data/ortp-4.4.0/src/netsim.c:93:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env_prio_c = getenv("ORTP_SIMULATOR_SCHED_PRIO"); data/ortp-4.4.0/src/ortp.c:45:2: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(t.tv_usec+t.tv_sec); data/ortp-4.4.0/src/port.c:877:24: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. return (unsigned int) random(); data/ortp-4.4.0/src/port.c:912:3: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand((unsigned int)tv.tv_sec+tv.tv_usec); data/ortp-4.4.0/src/tests/mrtpsend.c:114:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. ssrc=getenv("SSRC"); data/ortp-4.4.0/src/tests/rtpextensionheader.c:33:2: [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(time(NULL)); data/ortp-4.4.0/src/tests/rtpsend.c:84:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. ssrc=getenv("SSRC"); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:88:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. ssrc=getenv("SSRC"); data/ortp-4.4.0/src/tests/tevrtpsend.c:69:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. ssrc=getenv("SSRC"); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:184:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. m_SSRC = getenv("SSRC"); data/ortp-4.4.0/include/ortp/event.h:48:4: [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 sas[32]; // up to 31 + null characters data/ortp-4.4.0/include/ortp/rtcp.h:180: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 content[1]; data/ortp-4.4.0/include/ortp/rtcp.h:193: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 content[1]; data/ortp-4.4.0/include/ortp/rtcp.h:404: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[4]; data/ortp-4.4.0/include/ortp/sessionset.h:123:37: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define session_set_copy(dest,src) memcpy(&(dest)->rtpset,&(src)->rtpset,sizeof(ortp_fd_set)) data/ortp-4.4.0/src/avprofile.c:28: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 offset0[4] = {0x00, 0x00, 0x00, 0x00}; data/ortp-4.4.0/src/b64.c:186:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char characters[NUM_ENCODED_DATA_BYTES]; data/ortp-4.4.0/src/b64.c:254:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char dummy[NUM_PLAIN_DATA_BYTES]; data/ortp-4.4.0/src/b64.c:325:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. signed char indexes[NUM_ENCODED_DATA_BYTES]; /* 4 */ data/ortp-4.4.0/src/b64.c:390:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bytes[NUM_PLAIN_DATA_BYTES]; /* 3 */ data/ortp-4.4.0/src/event.c:40: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(edv,ed,sizeof(OrtpEventData)); data/ortp-4.4.0/src/jitterctl.c:156: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(&session->rtp.jittctl.params, par, sizeof (JBParameters)); data/ortp-4.4.0/src/jitterctl.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(par, &session->rtp.jittctl.params, sizeof(JBParameters)); data/ortp-4.4.0/src/netsim.c:95:43: [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). env_prio = (env_prio_c == NULL)?max_prio:atoi(env_prio_c); data/ortp-4.4.0/src/payloadtype.c:52: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(newpayload,payload,sizeof(PayloadType)); data/ortp-4.4.0/src/port.c:145:5: [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). fd=fopen(pathname,"r"); data/ortp-4.4.0/src/port.c:337:9: [2] (buffer) TCHAR: 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 TCHAR msgBuf[256]; data/ortp-4.4.0/src/port.c:380: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 buf[80]; data/ortp-4.4.0/src/port.c:393:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "Error code : %d", error); data/ortp-4.4.0/src/port.c:650: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[64]; data/ortp-4.4.0/src/port.c:870:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (fd==-1) fd=open("/dev/urandom",O_RDONLY); data/ortp-4.4.0/src/rtcp_fb.c:178: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(&fci->bit_string, bit_string, bit_string_len / 8); data/ortp-4.4.0/src/rtcp_fb.c:271: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(fci, rtcp_RTPFB_tmmbr_get_fci(session->rtcp.tmmbr_info.received), sizeof(rtcp_fb_tmmbr_fci_t)); data/ortp-4.4.0/src/rtcpparse.c:270: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(name,app->name,4); data/ortp-4.4.0/src/rtpbundle.cc:459:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(m->b_rptr, primarymsg->b_rptr, len); data/ortp-4.4.0/src/rtpparse.c:202: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(&ed->source_addr,addr,addrlen); data/ortp-4.4.0/src/rtpprofile.c:93:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (rate_str) clock_rate = atoi(rate_str); data/ortp-4.4.0/src/rtpprofile.c:97:27: [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). if (chan_str) channels = atoi(chan_str); data/ortp-4.4.0/src/rtpsession.c:898: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(mp->b_wptr,payload,payload_size); data/ortp-4.4.0/src/rtpsession.c:913: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(mp->b_wptr,packet,packet_size); data/ortp-4.4.0/src/rtpsession.c:1431:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer,mp->b_rptr,plen); data/ortp-4.4.0/src/rtpsession.c:1438:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer,mp->b_rptr,len); data/ortp-4.4.0/src/rtpsession.c:2127: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(ext_p, data, size); data/ortp-4.4.0/src/rtpsession.c:2177: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(tmp, data, size); data/ortp-4.4.0/src/rtpsession.c:2539: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->net_addr, from, *fromlen); data/ortp-4.4.0/src/rtpsession_inet.c:286: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(bound_addr,&saddr,slen); data/ortp-4.4.0/src/rtpsession_inet.c:401: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 addr[NI_MAXHOST]; data/ortp-4.4.0/src/rtpsession_inet.c:453: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 optval[sizeof(DWORD)]; data/ortp-4.4.0/src/rtpsession_inet.c:817: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 rtp_printable_addr[64]; data/ortp-4.4.0/src/rtpsession_inet.c:818: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 rtcp_printable_addr[64]; data/ortp-4.4.0/src/rtpsession_inet.c:861:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(rtp_saddr, res->ai_addr, res->ai_addrlen); data/ortp-4.4.0/src/rtpsession_inet.c:887: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(rtcp_saddr, res->ai_addr, res->ai_addrlen); data/ortp-4.4.0/src/rtpsession_inet.c:1245:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&m->net_addr,destaddr,destlen); data/ortp-4.4.0/src/rtpsession_inet.c:1281: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 result[NI_MAXHOST] = { 0 }; data/ortp-4.4.0/src/rtpsession_inet.c:1282: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 dest[NI_MAXHOST] = { 0 }; data/ortp-4.4.0/src/rtpsession_inet.c:1303: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(&item->ss, from, fromlen); data/ortp-4.4.0/src/rtpsession_inet.c:1334: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(&m->recv_addr, recv_addr, sizeof(ortp_recv_addr_t)); data/ortp-4.4.0/src/rtpsession_inet.c:1364: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 printable_ip_address[65]={0}; data/ortp-4.4.0/src/rtpsession_inet.c:1518: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 control[512] = {0}; data/ortp-4.4.0/src/rtpsession_inet.c:1560: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->timestamp, (struct timeval *)CMSG_DATA(cmsghdr), sizeof(struct timeval)); data/ortp-4.4.0/src/rtpsession_inet.c:1606:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&msg->net_addr,from,*fromlen); data/ortp-4.4.0/src/rtpsession_inet.c:1722: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(&ed->source_addr,addr,addrlen); data/ortp-4.4.0/src/rtpsession_inet.c:2092:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char current_ip_address[64]={0}; data/ortp-4.4.0/src/rtpsession_inet.c:2093: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 new_ip_address[64]={0}; data/ortp-4.4.0/src/rtpsession_inet.c:2103: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(rem_addr,&mp->net_addr,mp->net_addrlen); data/ortp-4.4.0/src/rtpsession_inet.c:2121: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(&session->rtp.gs.used_loc_addr, session_addr_info->ai_addr, session_addr_info->ai_addrlen); data/ortp-4.4.0/src/rtpsession_inet.c:2131: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(&session->rtcp.gs.used_loc_addr, session_addr_info->ai_addr, session_addr_info->ai_addrlen); data/ortp-4.4.0/src/str_utils.c:44: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(&dest->net_addr,&source->net_addr,source->net_addrlen); data/ortp-4.4.0/src/str_utils.c:269:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&db->db_base[wlen],mp->b_rptr,mlen); data/ortp-4.4.0/src/str_utils.c:273:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&db->db_base[wlen],mp->b_rptr,remain); data/ortp-4.4.0/src/str_utils.c:292: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(newm->b_wptr,mp->b_rptr,len); data/ortp-4.4.0/src/str_utils.c:323:12: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (size) memcpy(mp->b_wptr,data,size); data/ortp-4.4.0/src/str_utils.c:411:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr_in6->sin6_addr, &recvaddr->addr.ipi6_addr, sizeof(recvaddr->addr.ipi6_addr)); data/ortp-4.4.0/src/str_utils.c:425: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(&recvaddr->addr.ipi6_addr, &addr_in6->sin6_addr, sizeof(addr_in6->sin6_addr)); data/ortp-4.4.0/src/tests/fmtpparse.c:24: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 value[256]={0}; data/ortp-4.4.0/src/tests/mrtprecv.c:89: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). channels=atoi(argv[3]); data/ortp-4.4.0/src/tests/mrtprecv.c:98:7: [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[2]); data/ortp-4.4.0/src/tests/mrtprecv.c:117:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filefd[i]=open(filename,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); data/ortp-4.4.0/src/tests/mrtprecv.c:119:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filefd[i]=open(filename,_O_BINARY | O_WRONLY | O_CREAT | O_TRUNC); data/ortp-4.4.0/src/tests/mrtpsend.c:66: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). channels=atoi(argv[4]); data/ortp-4.4.0/src/tests/mrtpsend.c:78:17: [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). packet_size=atoi(argv[i+1]); data/ortp-4.4.0/src/tests/mrtpsend.c:94:12: [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_inc=atoi(argv[i+1]); data/ortp-4.4.0/src/tests/mrtpsend.c:115:7: [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/ortp-4.4.0/src/tests/mrtpsend.c:123:51: [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). if (ssrc!=NULL) rtp_session_set_ssrc(session[i],atoi(ssrc)); data/ortp-4.4.0/src/tests/mrtpsend.c:128:9: [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). infile=fopen(argv[1],"r"); data/ortp-4.4.0/src/tests/mrtpsend.c:130:9: [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). infile=fopen(argv[1],"rb"); data/ortp-4.4.0/src/tests/rtpmemtest.c:53:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[160]; data/ortp-4.4.0/src/tests/rtpmemtest.c:92: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). channels=atoi(argv[3]); data/ortp-4.4.0/src/tests/rtpmemtest.c:101:7: [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[2]); data/ortp-4.4.0/src/tests/rtpmemtest.c:115:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filefd[i]=open(filename,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); data/ortp-4.4.0/src/tests/rtprecv.c:55:5: [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("/dev/audio",O_WRONLY); data/ortp-4.4.0/src/tests/rtprecv.c:78:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[160]; data/ortp-4.4.0/src/tests/rtprecv.c:97: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). local_port=atoi(argv[2]); data/ortp-4.4.0/src/tests/rtprecv.c:125: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). jittcomp=atoi(argv[i]); data/ortp-4.4.0/src/tests/rtprecv.c:131:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outfile=fopen(argv[1],"wb"); data/ortp-4.4.0/src/tests/rtprecv.c:149:47: [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). rtp_session_set_local_addr(session,"0.0.0.0",atoi(argv[2]),-1); data/ortp-4.4.0/src/tests/rtpsend.c:42:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[160]; data/ortp-4.4.0/src/tests/rtpsend.c:60:15: [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). clockslide=atoi(argv[i]); data/ortp-4.4.0/src/tests/rtpsend.c:69: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). jitter=atoi(argv[i]); data/ortp-4.4.0/src/tests/rtpsend.c:81:46: [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). rtp_session_set_remote_addr(session,argv[2],atoi(argv[3])); data/ortp-4.4.0/src/tests/rtpsend.c:86:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). printf("using SSRC=%i.\n",atoi(ssrc)); data/ortp-4.4.0/src/tests/rtpsend.c:87:32: [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). rtp_session_set_ssrc(session,atoi(ssrc)); data/ortp-4.4.0/src/tests/rtpsend.c:91:9: [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). infile=fopen(argv[1],"r"); data/ortp-4.4.0/src/tests/rtpsend.c:93:9: [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). infile=fopen(argv[1],"rb"); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:44:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[160]; data/ortp-4.4.0/src/tests/rtpsend_stupid.c:63:15: [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). clockslide=atoi(argv[i]); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:72: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). jitter=atoi(argv[i]); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:85:46: [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). rtp_session_set_remote_addr(session,argv[2],atoi(argv[3])); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:90:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). printf("using SSRC=%i.\n",atoi(ssrc)); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:91:32: [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). rtp_session_set_ssrc(session,atoi(ssrc)); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:95:9: [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). infile=fopen(argv[1],"r"); data/ortp-4.4.0/src/tests/rtpsend_stupid.c:97:9: [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). infile=fopen(argv[1],"rb"); data/ortp-4.4.0/src/tests/tevmrtprecv.c:70:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[160]; data/ortp-4.4.0/src/tests/tevmrtprecv.c:104: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). channels=atoi(argv[3]); data/ortp-4.4.0/src/tests/tevmrtprecv.c:116:7: [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[2]); data/ortp-4.4.0/src/tests/tevmrtprecv.c:138:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filefd[i]=open(filename,O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP); data/ortp-4.4.0/src/tests/tevmrtprecv.c:140:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filefd[i]=open(filename,_O_BINARY | O_WRONLY | O_CREAT | O_TRUNC); data/ortp-4.4.0/src/tests/tevrtprecv.c:56:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[160]; data/ortp-4.4.0/src/tests/tevrtprecv.c:77:47: [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). rtp_session_set_local_addr(session,"0.0.0.0",atoi(argv[2]),-1); data/ortp-4.4.0/src/tests/tevrtprecv.c:83:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outfile=fopen(argv[1],"wb"); data/ortp-4.4.0/src/tests/tevrtpsend.c:44:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[160]; data/ortp-4.4.0/src/tests/tevrtpsend.c:66:46: [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). rtp_session_set_remote_addr(session,argv[2],atoi(argv[3])); data/ortp-4.4.0/src/tests/tevrtpsend.c:71:29: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). printf("using SSRC=%i.\n",atoi(ssrc)); data/ortp-4.4.0/src/tests/tevrtpsend.c:72:32: [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). rtp_session_set_ssrc(session,atoi(ssrc)); data/ortp-4.4.0/src/tests/tevrtpsend.c:75:9: [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). infile=fopen(argv[1],"rb"); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:36: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 strBuffer[255]; data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:72: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 buffer[160]; data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:120: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 strFilename[MAX_PATH]; data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:130: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). channels=atoi(argv[3]); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:162:7: [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[2]); data/ortp-4.4.0/src/tests/win_receiver/RTPReceiver.cpp:182:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filefd[i]=fopen(strFilename, "wb"); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:80:16: [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). m_nChannels = atoi(argv[4]); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:95:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). m_nPacket_Size=atoi(argv[nCounter+1]); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:113:22: [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). m_nTimestamp_Inc=atoi(argv[nCounter+1]); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp: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 strBuffer[255]; data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:185:12: [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). m_nPort = atoi(argv[3]); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:200:45: [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). rtp_session_set_ssrc(m_Session[nCounter],atoi(m_SSRC)); data/ortp-4.4.0/src/tests/win_sender/RTPSender.cpp:206:9: [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). infile=fopen(argv[1],"rb"); data/ortp-4.4.0/src/payloadtype.c:32:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len=(int)strlen(pt->mime_type)+15; data/ortp-4.4.0/src/payloadtype.c:159: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). pos+=strlen(param); data/ortp-4.4.0/src/payloadtype.c:172: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). pos+=strlen(param); data/ortp-4.4.0/src/payloadtype.c:194:7: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal){ data/ortp-4.4.0/src/payloadtype.c:197: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). if (end==NULL) end=fmtp+strlen(fmtp); /*assuming this is the last param */ data/ortp-4.4.0/src/payloadtype.c:199:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(result,equal+1,copied); data/ortp-4.4.0/src/port.c:92:5: [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). sz=strlen(tmp)+1; data/ortp-4.4.0/src/port.c:173: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). int min=MIN((int)strlen(str),n)+1; data/ortp-4.4.0/src/port.c:175:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ret,str,min); data/ortp-4.4.0/src/port.c:427:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sa.sun_path,pipename,sizeof(sa.sun_path)-1); data/ortp-4.4.0/src/port.c:477:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sa.sun_path,pipename,sizeof(sa.sun_path)-1); data/ortp-4.4.0/src/port.c:487:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(p,buf,len); data/ortp-4.4.0/src/port.c:873:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd,&tmp,4)!=4){ data/ortp-4.4.0/src/rtcp.c:48: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). strsize=(int)MIN(strlen(reason),RTCP_BYE_REASON_MAX_STRING_SIZE); data/ortp-4.4.0/src/rtcp.c:85: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). si.len=(uint8_t) MIN(strlen(content),RTCP_SDES_MAX_STRING_SIZE); data/ortp-4.4.0/src/rtcp.c:135: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(cname)>255) { data/ortp-4.4.0/src/rtcp.c:388:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(app->name, name, sizeof(app->name) - 1); data/ortp-4.4.0/src/rtpprofile.c:76: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). if (rate_str && strlen(rate_str)>1) { data/ortp-4.4.0/src/rtpprofile.c:82:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (chan_str && strlen(chan_str)>1) { data/ortp-4.4.0/src/rtpsession.c:892:52: [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). rtp_add_extension_header(mp, RTP_EXTENSION_MID, strlen(mid), (uint8_t *)mid); data/ortp-4.4.0/src/rtpsession.c:952:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtp_add_extension_header(mp, RTP_EXTENSION_MID, strlen(mid), (uint8_t *)mid); data/ortp-4.4.0/src/tests/mrtprecv.c:113: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). filename=ortp_malloc(strlen(argv[1])+15); data/ortp-4.4.0/src/tests/rtpextensionheader.c:53: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). rtp_add_extension_header(packet, 10, strlen(tmp), tmp); data/ortp-4.4.0/src/tests/rtpextensionheader.c:62: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). expected_size = (strlen(tmp) + 1); // extension + 1-byte header + potential padding data/ortp-4.4.0/src/tests/rtpextensionheader.c:80:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtp_add_extension_header(packet, i + 1, strlen(test), test); data/ortp-4.4.0/src/tests/rtpextensionheader.c:83:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtp_add_extension_header(packet, i + 1, strlen(foo), foo); data/ortp-4.4.0/src/tests/rtpextensionheader.c:86:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rtp_add_extension_header(packet, i + 1, strlen(bar), bar); data/ortp-4.4.0/src/tests/rtpmemtest.c:112: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). filename=ortp_malloc(strlen(argv[1])+8); data/ortp-4.4.0/src/tests/tevmrtprecv.c:134: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). filename=ortp_malloc(strlen(argv[1])+8); ANALYSIS SUMMARY: Hits = 185 Lines analyzed = 22798 in approximately 0.63 seconds (35910 lines/second) Physical Source Lines of Code (SLOC) = 15692 Hits@level = [0] 96 [1] 29 [2] 128 [3] 11 [4] 17 [5] 0 Hits@level+ = [0+] 281 [1+] 185 [2+] 156 [3+] 28 [4+] 17 [5+] 0 Hits/KSLOC@level+ = [0+] 17.9072 [1+] 11.7894 [2+] 9.94137 [3+] 1.78435 [4+] 1.08335 [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.