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/rtpproxy-1.2.1/rtp_server.c
Examining data/rtpproxy-1.2.1/rtp_resizer.h
Examining data/rtpproxy-1.2.1/rtpp_command.h
Examining data/rtpproxy-1.2.1/rtpp_record.h
Examining data/rtpproxy-1.2.1/rtpp_syslog_async.h
Examining data/rtpproxy-1.2.1/rtp.c
Examining data/rtpproxy-1.2.1/rtpp_util.c
Examining data/rtpproxy-1.2.1/rtp.h
Examining data/rtpproxy-1.2.1/rtp_resizer.c
Examining data/rtpproxy-1.2.1/rtp_server.h
Examining data/rtpproxy-1.2.1/rtpp_command.c
Examining data/rtpproxy-1.2.1/rtpp_log.c
Examining data/rtpproxy-1.2.1/g711.h
Examining data/rtpproxy-1.2.1/main.c
Examining data/rtpproxy-1.2.1/rtpp_defines.h
Examining data/rtpproxy-1.2.1/makeann.c
Examining data/rtpproxy-1.2.1/rtpp_log.h
Examining data/rtpproxy-1.2.1/rtpp_record.c
Examining data/rtpproxy-1.2.1/rtpp_session.h
Examining data/rtpproxy-1.2.1/rtpp_util.h
Examining data/rtpproxy-1.2.1/rtpp_session.c
Examining data/rtpproxy-1.2.1/rtpp_syslog_async.c

FINAL RESULTS:

data/rtpproxy-1.2.1/main.c:440:4:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
	  chown(cmd_sock, cf->run_uid, cf->run_gid) == -1)
data/rtpproxy-1.2.1/main.c:293:6:  [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(cf->timeout_handler.socket_name, optarg);
data/rtpproxy-1.2.1/main.c:431: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(ifsun.sun_path, cmd_sock);
data/rtpproxy-1.2.1/makeann.c:148:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(efiles[k].path, "%s.%d", template, efiles[k].pt);
data/rtpproxy-1.2.1/rtp_server.c:54:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(path, "%s.%d", name, codec);
data/rtpproxy-1.2.1/rtpp_command.c:174:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len = sprintf(buf, "%s %d\n", cookie, number);
data/rtpproxy-1.2.1/rtpp_command.c:199:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len = sprintf(cp, "%s ", cookie);
data/rtpproxy-1.2.1/rtpp_command.c:205:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len += sprintf(cp, "%d %s%s\n", lport, addr2char(lia[0]),
data/rtpproxy-1.2.1/rtpp_command.c:218:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len = sprintf(buf, "%s E%d\n", cookie, ecode);
data/rtpproxy-1.2.1/rtpp_command.c:427:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    len = sprintf(buf, "%s sessions created: %llu\nactive sessions: %d\n"
data/rtpproxy-1.2.1/rtpp_command.c:451:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(addrs[1], "%s:%d", addr2char(spb->addr[1]),
data/rtpproxy-1.2.1/rtpp_command.c:458:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(addrs[3], "%s:%d", addr2char(spb->addr[0]),
data/rtpproxy-1.2.1/rtpp_command.c:462:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    len += sprintf(buf + len,
data/rtpproxy-1.2.1/rtpp_command.c:1154:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	len = sprintf(buf, "%s %d %lu %lu %lu %lu\n", cookie, get_ttl(spa),
data/rtpproxy-1.2.1/rtpp_log.c:144:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(rtpp_log_buff, sizeof(rtpp_log_buff), fmt, strlvl(level),
data/rtpproxy-1.2.1/rtpp_log.c:147:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, rtpp_log_buff, ap);
data/rtpproxy-1.2.1/rtpp_log.c:173:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(rtpp_log_buff, sizeof(rtpp_log_buff), fmt, strlvl(level),
data/rtpproxy-1.2.1/rtpp_log.c:177:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, rtpp_log_buff, ap);
data/rtpproxy-1.2.1/rtpp_record.c:154:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(rrc->rpath, "%s/%s=%s.%c.%s", cf->rdir, sp->call_id, sp->tag,
data/rtpproxy-1.2.1/rtpp_record.c:157:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf(rrc->rpath, "%s/%s.%s", cf->rdir, rname,
data/rtpproxy-1.2.1/rtpp_record.c:162:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(rrc->spath, "%s/%s=%s.%c.%s", sdir, sp->call_id, sp->tag,
data/rtpproxy-1.2.1/rtpp_record.c:165:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(rrc->spath, "%s/%s.%s", sdir, rname,
data/rtpproxy-1.2.1/rtpp_syslog_async.c:231:10:  [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.
    s2 = vsnprintf(p, s1, format, ap);
data/rtpproxy-1.2.1/rtpp_util.h:117:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(stderr, format "\n", ## args)
data/rtpproxy-1.2.1/main.c:150:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((ch = getopt(argc, argv, "vf2Rl:6:s:S:t:r:p:T:L:m:M:u:Fin:Pad:")) != -1)
data/rtpproxy-1.2.1/makeann.c:102:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((ch = getopt(argc, argv, "l:L")) != -1)
data/rtpproxy-1.2.1/rtp_server.c:78:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    rp->rtp->ssrc = random();
data/rtpproxy-1.2.1/rtpp_session.c:53:22:  [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.
	cf->rand_table[i] = random();
data/rtpproxy-1.2.1/rtpp_util.c:182:5:  [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((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk);
data/rtpproxy-1.2.1/rtpp_util.c:259:6:  [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.
	j = random() % cf->port_table_len;
data/rtpproxy-1.2.1/main.c:127: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 *bh[2], *bh6[2], *cp;
data/rtpproxy-1.2.1/main.c:191: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).
	    cf->tos = atoi(optarg);
data/rtpproxy-1.2.1/main.c:226: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).
	    cf->max_ttl = atoi(optarg);
data/rtpproxy-1.2.1/main.c:230:62:  [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).
	    cf->nofile_limit.rlim_cur = cf->nofile_limit.rlim_max = atoi(optarg);
data/rtpproxy-1.2.1/main.c:235:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    if (cf->nofile_limit.rlim_max < atoi(optarg))
data/rtpproxy-1.2.1/main.c:238:5:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		  atoi(optarg));
data/rtpproxy-1.2.1/main.c:242:21:  [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).
	    cf->port_min = atoi(optarg);
data/rtpproxy-1.2.1/main.c:246:21:  [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).
	    cf->port_max = atoi(optarg);
data/rtpproxy-1.2.1/main.c:582:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(sp->addr[ridx], &packet->raddr, packet->rlen);
data/rtpproxy-1.2.1/main.c:617: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(sp->rtcp->addr[ridx], &packet->raddr, packet->rlen);
data/rtpproxy-1.2.1/main.c:766:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/rtpproxy-1.2.1/main.c:789:9:  [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).
    i = open(pid_file, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE);
data/rtpproxy-1.2.1/main.c:791:8:  [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.
	len = sprintf(buf, "%u\n", (unsigned int)getpid());
data/rtpproxy-1.2.1/makeann.c:81: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 path[PATH_MAX + 1];
data/rtpproxy-1.2.1/makeann.c:105:21:  [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).
            limit = atoi(optarg);
data/rtpproxy-1.2.1/makeann.c:141:14:  [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[0], "r");
data/rtpproxy-1.2.1/makeann.c:149:23:  [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).
        efiles[k].f = fopen(efiles[k].path, "w");
data/rtpproxy-1.2.1/rtp.h:110: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   buf[8192];
data/rtpproxy-1.2.1/rtp_resizer.c:155: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.buf[dst->data_offset + dst->data_size], 
data/rtpproxy-1.2.1/rtp_resizer.c:168: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.buf[dst->data_offset + dst->data_size], 
data/rtpproxy-1.2.1/rtp_resizer.c:187:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&dst->data.buf[dst->data_offset],
data/rtpproxy-1.2.1/rtp_resizer.c:248:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(ret, p, offsetof(struct rtp_packet, data.buf));
data/rtpproxy-1.2.1/rtp_server.c:52: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 path[PATH_MAX + 1];
data/rtpproxy-1.2.1/rtp_server.c:55:10:  [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(path, O_RDONLY);
data/rtpproxy-1.2.1/rtp_server.h:42:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[1024];
data/rtpproxy-1.2.1/rtpp_command.c:100: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(&iac, ia, SA_LEN(ia));
data/rtpproxy-1.2.1/rtpp_command.c:171:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024 * 8];
data/rtpproxy-1.2.1/rtpp_command.c:176:8:  [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.
	len = sprintf(buf, "%d\n", number);
data/rtpproxy-1.2.1/rtpp_command.c:194:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024 * 8], *cp;
data/rtpproxy-1.2.1/rtpp_command.c:203: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.
	len += sprintf(cp, "%d\n", lport);
data/rtpproxy-1.2.1/rtpp_command.c:215:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024 * 8];
data/rtpproxy-1.2.1/rtpp_command.c:220:8:  [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.
	len = sprintf(buf, "E%d\n", ecode);
data/rtpproxy-1.2.1/rtpp_command.c:255:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024 * 8];
data/rtpproxy-1.2.1/rtpp_command.c:259: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 **ap, *argv[10];
data/rtpproxy-1.2.1/rtpp_command.c:423:12:  [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.
	    len = sprintf(buf, "sessions created: %llu\nactive sessions: %d\n"
data/rtpproxy-1.2.1/rtpp_command.c:431:6:  [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 addrs[4][256];
data/rtpproxy-1.2.1/rtpp_command.c:449:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(addrs[1], "NONE");
data/rtpproxy-1.2.1/rtpp_command.c:456:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(addrs[3], "NONE");
data/rtpproxy-1.2.1/rtpp_command.c:517:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    playcount = atoi(argv[0] + 1);
data/rtpproxy-1.2.1/rtpp_command.c:638: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(codecs, t, cp - t);
data/rtpproxy-1.2.1/rtpp_command.c:662: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(ia[i], &tia, SS_LEN(&tia));
data/rtpproxy-1.2.1/rtpp_command.c:1150:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024 * 8];
data/rtpproxy-1.2.1/rtpp_command.c:1158:8:  [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.
	len = sprintf(buf, "%d %lu %lu %lu %lu\n", get_ttl(spa),
data/rtpproxy-1.2.1/rtpp_defines.h:82: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 notify_buf[64];
data/rtpproxy-1.2.1/rtpp_log.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 rtpp_log_buff[2048];
data/rtpproxy-1.2.1/rtpp_log.c:159: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 rtpp_log_buff[2048];
data/rtpproxy-1.2.1/rtpp_record.c:52: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 spath[PATH_MAX + 1];
data/rtpproxy-1.2.1/rtpp_record.c:53: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 rpath[PATH_MAX + 1];
data/rtpproxy-1.2.1/rtpp_record.c:56: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 rbuf[4096];
data/rtpproxy-1.2.1/rtpp_record.c:100: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).
	    port = atoi(cp);
data/rtpproxy-1.2.1/rtpp_record.c:107:6:  [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(cp, "%d", port + 1);
data/rtpproxy-1.2.1/rtpp_record.c:168:15:  [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).
    rrc->fd = open(rrc->spath, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE);
data/rtpproxy-1.2.1/rtpp_record.c:355: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(RRC_CAST(rrc)->rbuf + RRC_CAST(rrc)->rbuf_len, packet->data.buf, packet->size);
data/rtpproxy-1.2.1/rtpp_session.h:89: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 *codecs[2];
data/rtpproxy-1.2.1/rtpp_syslog_async.c:48: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 data[SYSLOG_WI_DATA_LEN];
data/rtpproxy-1.2.1/rtpp_util.c:122: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 buf[256];
data/rtpproxy-1.2.1/rtpp_util.c:161: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(ia, res->ai_addr, res->ai_addrlen);
data/rtpproxy-1.2.1/rtpp_util.c:175:10:  [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/random", O_RDONLY, 0);
data/rtpproxy-1.2.1/rtpp_util.c:345:27:  [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 (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
data/rtpproxy-1.2.1/main.c:288:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if(strlen(optarg) == 0)
data/rtpproxy-1.2.1/main.c:290:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    cf->timeout_handler.socket_name = (char *)malloc(strlen(optarg) + 1);
data/rtpproxy-1.2.1/main.c:428: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).
	ifsun.sun_len = strlen(cmd_sock);
data/rtpproxy-1.2.1/main.c:836: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.
	    usleep((1000000 / POLL_LIMIT) - delay);
data/rtpproxy-1.2.1/rtp_server.c:142:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(rp->fd, rp->pload, rlen) != rlen) {
data/rtpproxy-1.2.1/rtp_server.c:144:4:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  read(rp->fd, rp->pload, rlen) != rlen)
data/rtpproxy-1.2.1/rtpp_command.c:279:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    len = read(controlfd, buf, sizeof(buf) - 1);
data/rtpproxy-1.2.1/rtpp_command.c:524:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = url_unquote((uint8_t *)notify_tag, strlen(notify_tag));
data/rtpproxy-1.2.1/rtpp_command.c:649:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (op != DELETE && addr != NULL && port != NULL && strlen(addr) >= 7) {
data/rtpproxy-1.2.1/rtpp_session.c:228:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len0 = strlen(tag0);
data/rtpproxy-1.2.1/rtpp_session.c:297:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(remote.sun_path, th->socket_name, sizeof(remote.sun_path) - 1);
data/rtpproxy-1.2.1/rtpp_session.c:299:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    remote.sun_len = strlen(remote.sun_path);
data/rtpproxy-1.2.1/rtpp_util.c:177:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(fd, &junk, sizeof(junk));

ANALYSIS SUMMARY:

Hits = 102
Lines analyzed = 7799 in approximately 0.37 seconds (21105 lines/second)
Physical Source Lines of Code (SLOC) = 6219
Hits@level = [0]  11 [1]  13 [2]  59 [3]   6 [4]  23 [5]   1
Hits@level+ = [0+] 113 [1+] 102 [2+]  89 [3+]  30 [4+]  24 [5+]   1
Hits/KSLOC@level+ = [0+] 18.1701 [1+] 16.4014 [2+] 14.311 [3+] 4.82393 [4+] 3.85914 [5+] 0.160798
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.