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/udpcast-20120424/udp-receiver.h
Examining data/udpcast-20120424/rateGovernor.h
Examining data/udpcast-20120424/process.c
Examining data/udpcast-20120424/rate-limit.c
Examining data/udpcast-20120424/fec.c
Examining data/udpcast-20120424/fec-test.c
Examining data/udpcast-20120424/participants.c
Examining data/udpcast-20120424/auto-rate.h
Examining data/udpcast-20120424/log.h
Examining data/udpcast-20120424/receivedata.c
Examining data/udpcast-20120424/udps-negotiate.c
Examining data/udpcast-20120424/statistics.h
Examining data/udpcast-20120424/fifo.h
Examining data/udpcast-20120424/udpc-protoc.h
Examining data/udpcast-20120424/udp-sender.c
Examining data/udpcast-20120424/fec.h
Examining data/udpcast-20120424/libbb_udpcast.h
Examining data/udpcast-20120424/rate-limit.h
Examining data/udpcast-20120424/udpc_version.c
Examining data/udpcast-20120424/util.h
Examining data/udpcast-20120424/usage.h
Examining data/udpcast-20120424/udp-receiver.c
Examining data/udpcast-20120424/udpc_version.h
Examining data/udpcast-20120424/udp-sender.h
Examining data/udpcast-20120424/produconsum.c
Examining data/udpcast-20120424/receiver-diskio.c
Examining data/udpcast-20120424/socklib.h
Examining data/udpcast-20120424/applets.h
Examining data/udpcast-20120424/participants.h
Examining data/udpcast-20120424/udpc_process.h
Examining data/udpcast-20120424/examples/rateGovernor/ipe.c
Examining data/udpcast-20120424/senddata.c
Examining data/udpcast-20120424/statistics.c
Examining data/udpcast-20120424/udpcast.c
Examining data/udpcast-20120424/log.c
Examining data/udpcast-20120424/socklib.c
Examining data/udpcast-20120424/rateGovernor.c
Examining data/udpcast-20120424/auto-rate.c
Examining data/udpcast-20120424/produconsum.h
Examining data/udpcast-20120424/threads.h
Examining data/udpcast-20120424/udpcast.h
Examining data/udpcast-20120424/udpr-negotiate.c
Examining data/udpcast-20120424/fifo.c
Examining data/udpcast-20120424/console.c
Examining data/udpcast-20120424/console.h
Examining data/udpcast-20120424/sender-diskio.c

FINAL RESULTS:

data/udpcast-20120424/log.c:45:5:  [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.
	r= vfprintf(logfile, fmt, ap);
data/udpcast-20120424/log.c:67:9:  [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.
	return vfprintf(stderr, fmt, ap);
data/udpcast-20120424/log.c:88:5:  [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, fmt, ap);
data/udpcast-20120424/log.c:128:6:  [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, digits);
data/udpcast-20120424/log.h:16:29:  [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.
    __attribute__ ((format (printf, 2, 3)));
data/udpcast-20120424/log.h:18:29:  [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.
    __attribute__ ((format (printf, 1, 2)));
data/udpcast-20120424/log.h:20:56:  [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.
    __attribute__ ((noreturn)) __attribute__ ((format (printf, 2, 3)));
data/udpcast-20120424/process.c:30:5:  [4] (shell) execvp:
  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.
    execvp(arg[0], arg);
data/udpcast-20120424/fec-test.c:282: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(seed);
data/udpcast-20120424/fec-test.c:335:13:  [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.
	int corr = random() % nrBlocks;
data/udpcast-20120424/fec-test.c:349: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.
		if(random() % 2)
data/udpcast-20120424/fec-test.c:453:13:  [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.
	block[i] = random();
data/udpcast-20120424/socklib.c:80:11:  [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.
	long r = random();
data/udpcast-20120424/socklib.c:100:8:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	while(random() < read_loss) {
data/udpcast-20120424/socklib.c:107:32:  [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.
	while(stashed < STASH_SIZE && random() < read_swap) {
data/udpcast-20120424/socklib.c:123:5:  [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.
	if(random() / stashed < read_swap) {
data/udpcast-20120424/socklib.c:124:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	    int slot = random() % stashed;
data/udpcast-20120424/socklib.c:169: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(seed);
data/udpcast-20120424/socklib.c:587: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.
	    wanted = getenv("IFNAME");
data/udpcast-20120424/threads.h:39:3:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  InitializeCriticalSection(mutex);
data/udpcast-20120424/threads.h:44:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(mutex);
data/udpcast-20120424/threads.h:72:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(mutex);
data/udpcast-20120424/threads.h:113:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(mutex);
data/udpcast-20120424/udp-receiver.c:81:26:  [3] (buffer) getopt_long:
  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.
# define getopt_l(c,v,o) getopt_long(c, v, o, options, NULL)
data/udpcast-20120424/udp-receiver.c:83:26:  [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.
# define getopt_l(c,v,o) getopt(c, v, o)
data/udpcast-20120424/udp-receiver.c:222:3:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		srandom(strtoul(optarg,0,0));
data/udpcast-20120424/udp-sender.c:136:26:  [3] (buffer) getopt_long:
  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.
# define getopt_l(c,v,o) getopt_long(c, v, o, options, NULL)
data/udpcast-20120424/udp-sender.c:138:26:  [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.
# define getopt_l(c,v,o) getopt(c, v, o)
data/udpcast-20120424/udp-sender.c:412:7:  [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(strtoul(optarg,0,0));
data/udpcast-20120424/console.c:29:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("/dev/tty", O_RDWR);
data/udpcast-20120424/console.c:139:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open("CON", O_RDONLY);
data/udpcast-20120424/console.c:184: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(&con->read_set, read_set, sizeof(*read_set));
data/udpcast-20120424/console.c:186: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(&con->tv, tv, sizeof(*tv));
data/udpcast-20120424/console.c:210: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(read_set, &con->read_set, sizeof(*read_set));
data/udpcast-20120424/fec-test.c:116: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).
    int width=atoi(argv[1]);
data/udpcast-20120424/fec-test.c:151: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.
static unsigned char exp8[(255+8)*16] __attribute__ ((aligned (4096)));
data/udpcast-20120424/fec-test.c:166: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.
static unsigned char dst2[SIZE] __attribute__ ((aligned (4096)));
data/udpcast-20120424/fec-test.c:262: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).
    int redundancy=atoi(argv[1]);
data/udpcast-20120424/fec-test.c:263:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int blocksize=atoi(argv[2]);
data/udpcast-20120424/fec-test.c:264:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int corrupted=atoi(argv[3]);
data/udpcast-20120424/fec-test.c:266: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 *data_blocks[128], *fec_blocks[128], *dec_fec_blocks[128];
data/udpcast-20120424/fec-test.c:408: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 block[SIZE*5] __attribute__((aligned(16)));
data/udpcast-20120424/fec-test.c:409: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 block2[SIZE*5] __attribute__((aligned(16)));
data/udpcast-20120424/fec-test.c:410: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 block3[SIZE*5] __attribute__((aligned(16)));
data/udpcast-20120424/fec-test.c:411: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 block4[SIZE*5] __attribute__((aligned(16)));
data/udpcast-20120424/fec-test.c:414: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 in[16] __attribute__((aligned(16)));
data/udpcast-20120424/fec-test.c:415: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 out1[16] __attribute__((aligned(16)));
data/udpcast-20120424/fec-test.c:416: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 out2[16] __attribute__((aligned(16)));
data/udpcast-20120424/fec-test.c:544: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(block3+SIZE, block3+3*SIZE, SIZE);
data/udpcast-20120424/fec-test.c:568:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int i = atoi(argv[1]);
data/udpcast-20120424/fec.c:868: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 matrix[nr_fec_blocks*nr_fec_blocks];
data/udpcast-20120424/log.c: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 buf[9];
data/udpcast-20120424/participants.c:33: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 ipBuffer[16];	
data/udpcast-20120424/participants.c:73: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 ipBuffer[16];
data/udpcast-20120424/receivedata.c:550: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 *fec_blocks[nr_fec_blocks];
data/udpcast-20120424/receivedata.c:553: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 *data_blocks[128];
data/udpcast-20120424/receivedata.c:761: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(shouldAddress, isAddress,  clst->net_config->blockSize);
data/udpcast-20120424/receivedata.c:820: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(shouldAddress, isAddress,  clst->net_config->blockSize);
data/udpcast-20120424/receivedata.c:1088: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 buffer1[16], buffer2[16];
data/udpcast-20120424/receiver-diskio.c:64: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 *arg[256];
data/udpcast-20120424/senddata.c:38: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 rxmitMap[MAX_SLICE_SIZE / BITS_PER_CHAR]; 
data/udpcast-20120424/senddata.c:41: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 isXmittedMap[MAX_SLICE_SIZE / BITS_PER_CHAR]; 
data/udpcast-20120424/senddata.c:53: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 readySet[MAX_CLIENTS / BITS_PER_CHAR]; /* who is already ok? */
data/udpcast-20120424/senddata.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 answeredSet[MAX_CLIENTS / BITS_PER_CHAR]; /* who answered at all? */
data/udpcast-20120424/senddata.c:217: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 ipBuffer[16];
data/udpcast-20120424/senddata.c:475: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((void*)&slice->answeredSet,(void*)&slice->sl_reqack.readySet,
data/udpcast-20120424/senddata.c:981: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 *fec_blocks[redundancy];
data/udpcast-20120424/senddata.c:982: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 *data_blocks[128];
data/udpcast-20120424/sender-diskio.c:27:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int in = open(config->fileName, O_RDONLY | O_BINARY, 0);
data/udpcast-20120424/sender-diskio.c:55: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 *arg[256];
data/udpcast-20120424/socklib.c:91: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 data[4092];
data/udpcast-20120424/socklib.c:134:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(msg->msg_iov[iovnr].iov_base, data, len);
data/udpcast-20120424/socklib.c:190: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((void *)&((struct sockaddr_in *)addr)->sin_addr, inaddr, len);
data/udpcast-20120424/socklib.c:301: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 ipBuffer[16];
data/udpcast-20120424/socklib.c:467: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(out, ifrow->bDescr, ifrow->dwDescrLen);
data/udpcast-20120424/socklib.c:473:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(ptr, " (");
data/udpcast-20120424/socklib.c:478: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(ptr, "%02x", 255 & ifrow->bPhysAddr[k]);
data/udpcast-20120424/socklib.c:720: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 buffer[16];
data/udpcast-20120424/socklib.c:855: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 buffer[16];
data/udpcast-20120424/socklib.c:939: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[16];
data/udpcast-20120424/socklib.c:956: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 buffer[16];
data/udpcast-20120424/socklib.c:965: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(buffer,"%ld.%ld.%ld.%ld",
data/udpcast-20120424/socklib.c:1013: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, (char *) &((struct sockaddr_in *)src)->sin_addr,
data/udpcast-20120424/socklib.c:1019: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 *) &dst->sin_addr, src, sizeof(struct in_addr));
data/udpcast-20120424/socklib.c:1136: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(msg->msg_iov[i].iov_base, ptr, l);
data/udpcast-20120424/socklib.c:1138: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(ptr, msg->msg_iov[i].iov_base, l);
data/udpcast-20120424/statistics.c:98: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 fn[80];
data/udpcast-20120424/statistics.c:100:2:  [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(fn, "/proc/self/fdinfo/%d", fd);
data/udpcast-20120424/statistics.c:101:6:  [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).
	pfd=open(fn, O_RDONLY);
data/udpcast-20120424/statistics.c:103: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 buf[161];
data/udpcast-20120424/udp-receiver.c:192: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).
		net_config.portBase = atoi(optarg);
data/udpcast-20120424/udp-receiver.c:195: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).
		udpc_log = fopen(optarg, "a");
data/udpcast-20120424/udp-receiver.c:201: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).
		net_config.ttl = atoi(optarg);
data/udpcast-20120424/udp-receiver.c:248: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).
		net_config.exitWait = atoi(optarg);
data/udpcast-20120424/udp-receiver.c:252: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).
		net_config.startTimeout = atoi(optarg);		
data/udpcast-20120424/udp-receiver.c:256:31:  [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).
		net_config.receiveTimeout = atoi(optarg);
data/udpcast-20120424/udp-receiver.c:260:28:  [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).
		stat_config.statPeriod = atoi(optarg) * 1000;
data/udpcast-20120424/udp-receiver.c:263: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).
		stat_config.printUncompressedPos = atoi(optarg);
data/udpcast-20120424/udp-sender.c:291: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).
		    net_config.portBase = atoi(optarg);
data/udpcast-20120424/udp-sender.c:314:36:  [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).
		    stat_config.log = udpc_log = fopen(optarg, "a");
data/udpcast-20120424/udp-sender.c:342:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    net_config.min_slice_size = atoi(optarg);
data/udpcast-20120424/udp-sender.c:347:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    net_config.default_slice_size = atoi(optarg);
data/udpcast-20120424/udp-sender.c:350:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    net_config.max_slice_size = atoi(optarg);
data/udpcast-20120424/udp-sender.c:355:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    net_config.ttl = atoi(optarg);
data/udpcast-20120424/udp-sender.c:394: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).
		    stat_config.statPeriod = atoi(optarg) * 1000;
data/udpcast-20120424/udp-sender.c:397:42:  [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).
		    stat_config.printUncompressedPos = atoi(optarg);
data/udpcast-20120424/udp-sender.c:419:42:  [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).
		    net_config.rexmit_hello_interval = atoi(optarg);
data/udpcast-20120424/udp-sender.c:422:30:  [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).
		    net_config.autostart = atoi(optarg);
data/udpcast-20120424/udp-sender.c:431:34:  [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).
		    net_config.min_receivers = atoi(optarg);
data/udpcast-20120424/udp-sender.c:434:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    net_config.max_receivers_wait = atoi(optarg);
data/udpcast-20120424/udp-sender.c:437:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		    net_config.min_receivers_wait = atoi(optarg);
data/udpcast-20120424/udp-sender.c:440:33:  [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).
		    net_config.startTimeout = atoi(optarg);
data/udpcast-20120424/udp-sender.c:447:37:  [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).
		    net_config.retriesUntilDrop = atoi(optarg);
data/udpcast-20120424/udp-sender.c:461:30:  [2] (integer) atol:
  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).
		    stat_config.bwPeriod = atol(optarg);
data/udpcast-20120424/udp-sender.c:472:34:  [2] (integer) atol:
  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).
		    net_config.rehelloOffset = atol(optarg);
data/udpcast-20120424/udp-sender.c:484: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 line[80];
data/udpcast-20120424/udp-sender.c:491:6:  [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).
	p = fopen(pidfile, "r");
data/udpcast-20120424/udp-sender.c:501:8:  [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).
	pid = atoi(line);
data/udpcast-20120424/udp-sender.c:611:16:  [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 *p = fopen(pidfile, "w");
data/udpcast-20120424/udpc-protoc.h:59: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 map[MAX_SLICE_SIZE / BITS_PER_CHAR];
data/udpcast-20120424/udpc-protoc.h:88: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 mcastAddr[16]; /* provide enough place for IPV6 */
data/udpcast-20120424/udpc-protoc.h:95: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 mcastAddr[16]; /* provide enough place for IPV6 */
data/udpcast-20120424/udpr-negotiate.c:91:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	outFile = open(disk_config->fileName, oflags | O_BINARY, 0644);
data/udpcast-20120424/udpr-negotiate.c:115: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 ipBuffer[16];
data/udpcast-20120424/udps-negotiate.c:302: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 ipBuffer[16];
data/udpcast-20120424/auto-rate.c:77:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(2500);
data/udpcast-20120424/console.c:90:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      r = read(c->fd, &ch, 1);
data/udpcast-20120424/console.c:122:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int n=read(con->fd, &con->ch, 1);
data/udpcast-20120424/fec-test.c:300:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    n = read(0, data, size);
data/udpcast-20120424/fec-test.c:460:5:  [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(1);
data/udpcast-20120424/fec-test.c:476:5:  [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(1);
data/udpcast-20120424/fec-test.c:491:5:  [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);
data/udpcast-20120424/rate-limit.c:94: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(sleepTime);
data/udpcast-20120424/rateGovernor.c:85:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  pos = params + strlen(params);
data/udpcast-20120424/sender-diskio.c:96:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(in, fifo->dataBuffer + pos, bytes);
data/udpcast-20120424/socklib.c:472:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char *ptr=out+strlen(out);
data/udpcast-20120424/socklib.c:481:2:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
	strcpy(ptr, ")");
data/udpcast-20120424/socklib.c:502:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)-1);
data/udpcast-20120424/socklib.c:531:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)-1);
data/udpcast-20120424/socklib.c:596:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    wantedLen=strlen(wanted);
data/udpcast-20120424/socklib.h:214: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/udpcast-20120424/statistics.c:105:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    n=read(pfd, buf, 160);

ANALYSIS SUMMARY:

Hits = 142
Lines analyzed = 10192 in approximately 0.25 seconds (40800 lines/second)
Physical Source Lines of Code (SLOC) = 7713
Hits@level = [0] 135 [1]  17 [2]  96 [3]  21 [4]   8 [5]   0
Hits@level+ = [0+] 277 [1+] 142 [2+] 125 [3+]  29 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 35.9134 [1+] 18.4105 [2+] 16.2064 [3+] 3.75989 [4+] 1.03721 [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.