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/dcap-2.47.12/plugins/gssapi/base64.c
Examining data/dcap-2.47.12/plugins/gssapi/base64.h
Examining data/dcap-2.47.12/plugins/gssapi/client.c
Examining data/dcap-2.47.12/plugins/gssapi/gssIoTunnel.c
Examining data/dcap-2.47.12/plugins/gssapi/gssTunnel.h
Examining data/dcap-2.47.12/plugins/gssapi/server.c
Examining data/dcap-2.47.12/plugins/gssapi/tunnelQueue.c
Examining data/dcap-2.47.12/plugins/gssapi/tunnelQueue.h
Examining data/dcap-2.47.12/plugins/gssapi/util.c
Examining data/dcap-2.47.12/plugins/gssapi/util.h
Examining data/dcap-2.47.12/plugins/ssl/get_user.h
Examining data/dcap-2.47.12/plugins/ssl/sslTunnel.c
Examining data/dcap-2.47.12/plugins/ssl/user.c
Examining data/dcap-2.47.12/plugins/ssl/user_entry.h
Examining data/dcap-2.47.12/plugins/telnet/dcapPasswd.c
Examining data/dcap-2.47.12/plugins/telnet/get_user.h
Examining data/dcap-2.47.12/plugins/telnet/telnetTunnel.c
Examining data/dcap-2.47.12/plugins/telnet/user.c
Examining data/dcap-2.47.12/plugins/telnet/user_entry.h
Examining data/dcap-2.47.12/src/array.c
Examining data/dcap-2.47.12/src/array.h
Examining data/dcap-2.47.12/src/br.c
Examining data/dcap-2.47.12/src/char2crc.c
Examining data/dcap-2.47.12/src/char2crc.h
Examining data/dcap-2.47.12/src/dc_hack.h
Examining data/dcap-2.47.12/src/dc_job_hack.c
Examining data/dcap-2.47.12/src/dcap.h
Examining data/dcap-2.47.12/src/dcap_accept.c
Examining data/dcap-2.47.12/src/dcap_accept.h
Examining data/dcap-2.47.12/src/dcap_access.c
Examining data/dcap-2.47.12/src/dcap_acl.c
Examining data/dcap-2.47.12/src/dcap_ahead.c
Examining data/dcap-2.47.12/src/dcap_ahead.h
Examining data/dcap-2.47.12/src/dcap_checksum.c
Examining data/dcap-2.47.12/src/dcap_checksum.h
Examining data/dcap-2.47.12/src/dcap_chmod.c
Examining data/dcap-2.47.12/src/dcap_chown.c
Examining data/dcap-2.47.12/src/dcap_close.c
Examining data/dcap-2.47.12/src/dcap_close.h
Examining data/dcap-2.47.12/src/dcap_command.c
Examining data/dcap-2.47.12/src/dcap_command.h
Examining data/dcap-2.47.12/src/dcap_debug.c
Examining data/dcap-2.47.12/src/dcap_debug.h
Examining data/dcap-2.47.12/src/dcap_dirent.c
Examining data/dcap-2.47.12/src/dcap_dup.c
Examining data/dcap-2.47.12/src/dcap_errno.h
Examining data/dcap-2.47.12/src/dcap_error.c
Examining data/dcap-2.47.12/src/dcap_error.h
Examining data/dcap-2.47.12/src/dcap_fsync.c
Examining data/dcap-2.47.12/src/dcap_fsync.h
Examining data/dcap-2.47.12/src/dcap_functions.h
Examining data/dcap-2.47.12/src/dcap_interpreter.c
Examining data/dcap-2.47.12/src/dcap_interpreter.h
Examining data/dcap-2.47.12/src/dcap_lcb.c
Examining data/dcap-2.47.12/src/dcap_lcb.h
Examining data/dcap-2.47.12/src/dcap_lseek.c
Examining data/dcap-2.47.12/src/dcap_lseek.h
Examining data/dcap-2.47.12/src/dcap_mkdir.c
Examining data/dcap-2.47.12/src/dcap_mqueue.c
Examining data/dcap-2.47.12/src/dcap_mqueue.h
Examining data/dcap-2.47.12/src/dcap_open.c
Examining data/dcap-2.47.12/src/dcap_poll.c
Examining data/dcap-2.47.12/src/dcap_poll.h
Examining data/dcap-2.47.12/src/dcap_preload.c
Examining data/dcap-2.47.12/src/dcap_preload64.c
Examining data/dcap-2.47.12/src/dcap_protocol.c
Examining data/dcap-2.47.12/src/dcap_protocol.h
Examining data/dcap-2.47.12/src/dcap_read.c
Examining data/dcap-2.47.12/src/dcap_read.h
Examining data/dcap-2.47.12/src/dcap_reconnect.c
Examining data/dcap-2.47.12/src/dcap_reconnect.h
Examining data/dcap-2.47.12/src/dcap_rename.c
Examining data/dcap-2.47.12/src/dcap_signal.c
Examining data/dcap-2.47.12/src/dcap_signal.h
Examining data/dcap-2.47.12/src/dcap_stat.c
Examining data/dcap-2.47.12/src/dcap_str_util.c
Examining data/dcap-2.47.12/src/dcap_str_util.h
Examining data/dcap-2.47.12/src/dcap_stream.c
Examining data/dcap-2.47.12/src/dcap_test.c
Examining data/dcap-2.47.12/src/dcap_types.h
Examining data/dcap-2.47.12/src/dcap_unix2win.c
Examining data/dcap-2.47.12/src/dcap_unix2win.h
Examining data/dcap-2.47.12/src/dcap_unlink.c
Examining data/dcap-2.47.12/src/dcap_url.c
Examining data/dcap-2.47.12/src/dcap_url.h
Examining data/dcap-2.47.12/src/dcap_version.c
Examining data/dcap-2.47.12/src/dcap_win_poll.h
Examining data/dcap-2.47.12/src/dcap_write.c
Examining data/dcap-2.47.12/src/dcap_write.h
Examining data/dcap-2.47.12/src/dccp.c
Examining data/dcap-2.47.12/src/dccp_linux_directio.c
Examining data/dcap-2.47.12/src/dcsuck.c
Examining data/dcap-2.47.12/src/debug_map.h
Examining data/dcap-2.47.12/src/dispatcher.c
Examining data/dcap-2.47.12/src/fnal_thread.c
Examining data/dcap-2.47.12/src/gettrace.c
Examining data/dcap-2.47.12/src/gettrace.h
Examining data/dcap-2.47.12/src/input_parser.c
Examining data/dcap-2.47.12/src/input_parser.h
Examining data/dcap-2.47.12/src/io.c
Examining data/dcap-2.47.12/src/io.h
Examining data/dcap-2.47.12/src/ioTunnel.h
Examining data/dcap-2.47.12/src/lineparser.c
Examining data/dcap-2.47.12/src/lineparser.h
Examining data/dcap-2.47.12/src/links.c
Examining data/dcap-2.47.12/src/links.h
Examining data/dcap-2.47.12/src/linux_trace.c
Examining data/dcap-2.47.12/src/node_plays.c
Examining data/dcap-2.47.12/src/node_plays.h
Examining data/dcap-2.47.12/src/parser.c
Examining data/dcap-2.47.12/src/parser.h
Examining data/dcap-2.47.12/src/passive.c
Examining data/dcap-2.47.12/src/passive.h
Examining data/dcap-2.47.12/src/pnfs.c
Examining data/dcap-2.47.12/src/pnfs.h
Examining data/dcap-2.47.12/src/print_size.c
Examining data/dcap-2.47.12/src/print_size.h
Examining data/dcap-2.47.12/src/readv_test.c
Examining data/dcap-2.47.12/src/sigfig.c
Examining data/dcap-2.47.12/src/sigfig.h
Examining data/dcap-2.47.12/src/socket_nio.c
Examining data/dcap-2.47.12/src/socket_nio.h
Examining data/dcap-2.47.12/src/stack_trace.h
Examining data/dcap-2.47.12/src/str2errno.c
Examining data/dcap-2.47.12/src/str2errno.h
Examining data/dcap-2.47.12/src/string2stat.c
Examining data/dcap-2.47.12/src/string2stat.h
Examining data/dcap-2.47.12/src/sysdep.h
Examining data/dcap-2.47.12/src/system_io.c
Examining data/dcap-2.47.12/src/system_io.h
Examining data/dcap-2.47.12/src/thread_test.c
Examining data/dcap-2.47.12/src/tunnelManager.c
Examining data/dcap-2.47.12/src/tunnelManager.h
Examining data/dcap-2.47.12/src/wdccp.c
Examining data/dcap-2.47.12/src/win32_libdl.c
Examining data/dcap-2.47.12/src/win32_libdl.h
Examining data/dcap-2.47.12/src/xutil.c
Examining data/dcap-2.47.12/src/xutil.h
Examining data/dcap-2.47.12/src/dcap.c
Examining data/dcap-2.47.12/tests/test_url.c

FINAL RESULTS:

data/dcap-2.47.12/src/dc_hack.h:65:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
#define chmod      dc_chmod
data/dcap-2.47.12/src/dcap_preload.c:425:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
int chmod( const char *path, mode_t mode)
data/dcap-2.47.12/src/dcap_preload.c:431:5:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
int chown( const char *path, uid_t uid, gid_t gid)
data/dcap-2.47.12/src/gettrace.c:157:17:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    	if ((res = readlink("/proc/self/exe", exename, MAXPATHLEN - 1)) == -1)
data/dcap-2.47.12/plugins/telnet/dcapPasswd.c:35:34:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
      strncpy(savepasswd, (char*)crypt(newpasswd, user), 100);
data/dcap-2.47.12/plugins/telnet/dcapPasswd.c:56:32:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
    strncpy(savepasswd, (char*)crypt(newpasswd, user), 100);
data/dcap-2.47.12/src/dc_hack.h:40: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.
#define access     dc_access
data/dcap-2.47.12/src/dcap.c:349:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(conf_file, "%s%s", node->directory, PNFS_DC_LOCK);
data/dcap-2.47.12/src/dcap.c:350: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.
		while(access(conf_file, F_OK) == 0 ) {
data/dcap-2.47.12/src/dcap.c:375:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(conf_file, "%s%s", node->directory, PNFS_DC_CONF);
data/dcap-2.47.12/src/dcap.c:401:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buffer, "%s:%d", srv->hostname, srv->port);
data/dcap-2.47.12/src/dcap.c:510:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
					sprintf(buffer, "%s:%d", allServers[i]->hostname,allServers[i]->port);
data/dcap-2.47.12/src/dcap.c:2062:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(tunnel, "lib%sTunnel.so", url->prefix);
data/dcap-2.47.12/src/dcap_debug.c:153:8:  [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.
	len = vsnprintf(msg, MAX_MESSAGE_LEN, format, ap);
data/dcap-2.47.12/src/dcap_debug.c:155:8:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	len = vsprintf(msg, format, ap);
data/dcap-2.47.12/src/dcap_open.c:168:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
					sprintf(tmpName, "%s;WINDCAP_%d", path, getpid() );
data/dcap-2.47.12/src/dcap_open.c:170:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
					sprintf(tmpName, "%s;%d_%d", path, getuid(), getpid() );
data/dcap-2.47.12/src/dcap_preload.c:231:5:  [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.
int access( const char *path, int mode)
data/dcap-2.47.12/src/dcap_stat.c:93:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(path, "%s%s://%s/%s", node->url->prefix , node->url->type == 1 ? "dcap" : "pnfs" , node->url->host, node->url->file);
data/dcap-2.47.12/src/dcap_stat.c:95:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(path, "%s://%s/%s", node->url->type == 1 ? "dcap" : "pnfs" , node->url->host, node->url->file);
data/dcap-2.47.12/src/dcap_stat.c:98:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%s/%s", node->directory, node->file_name);
data/dcap-2.47.12/src/dcap_str_util.c:70:29:  [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.
        characters_copied = vsnprintf(context->tmp_buff, new_buf_size, format, ap);
data/dcap-2.47.12/src/dcap_str_util.c:168: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.
    n = vsnprintf(p, size, format, ap);
data/dcap-2.47.12/src/dcap_unix2win.h:32: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.
#define access _access
data/dcap-2.47.12/src/dcap_url.c:252:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(s, "%sdcap://%s/%s",
data/dcap-2.47.12/src/dccp.c:343:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename, "%s%c%s", outfile, PATH_SEPARATOR, cp);
data/dcap-2.47.12/src/dccp.c:345:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(filename,outfile) ;
data/dcap-2.47.12/src/dccp.c:685:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat( buffer, item->content);
data/dcap-2.47.12/src/dccp.c:758: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( buffer, si_size);
data/dcap-2.47.12/src/dccp.c:776:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf( buffer, "(%s/s)", formatted_bytes);
data/dcap-2.47.12/src/dccp.c:791:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buffer, "%s%%", percent);
data/dcap-2.47.12/src/dccp_linux_directio.c:227:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename, "%s%c%s", outfile, PATH_SEPARATOR, cp);
data/dcap-2.47.12/src/dccp_linux_directio.c:229:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(filename,outfile) ;
data/dcap-2.47.12/src/dccp_linux_directio.c:232:22:  [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.
	if((!overwrite) && (access(filename, F_OK) == 0)) {
data/dcap-2.47.12/src/pnfs.c:82:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(pnfsLayer, "%s%c.(get)(cursor)", directory, PATH_SEPARATOR);
data/dcap-2.47.12/src/pnfs.c:139:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(pnfsLayer, "%s%c.(id)(%s)", node->directory, PATH_SEPARATOR, node->file_name);
data/dcap-2.47.12/src/pnfs.c:208:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(pnfsLayer, "%s%c.(id)(%s)", dir, PATH_SEPARATOR, file);
data/dcap-2.47.12/src/print_size.c:98:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf( buffer, "%s %s", tmp, prefix->symbol);
data/dcap-2.47.12/src/tunnelManager.c:106:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(fullpath, TUNNELLIBDIR);
data/dcap-2.47.12/src/tunnelManager.c:108:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(fullpath, libname);
data/dcap-2.47.12/src/wdccp.c:174:21:  [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.
		if( overwrite && (access(real_destination, F_OK) == 0)) {
data/dcap-2.47.12/src/win32_libdl.c:20:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(errbuf, "error code %d loading library %s", GetLastError(), name);
data/dcap-2.47.12/src/win32_libdl.c:25:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(errbuf, "error code %d loading library %s", (UINT) hdll, name);
data/dcap-2.47.12/src/win32_libdl.c:38:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(errbuf, "can't find symbol %s", name);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:32:6:  [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.
	if (getenv("DCACHE_IO_TUNNEL_TELNET_PWD") != NULL) {
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:33:17:  [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.
	  char* file = getenv("DCACHE_IO_TUNNEL_TELNET_PWD");
data/dcap-2.47.12/src/dcap.c:170:13:  [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.
	hostName = getenv("DCACHE_REPLY");
data/dcap-2.47.12/src/dcap.c:332:17:  [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.
		dcache_host = getenv("DCACHE_DOOR");
data/dcap-2.47.12/src/dcap.c:335:18:  [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.
			dcache_host = getenv("DCACHE_HOST");
data/dcap-2.47.12/src/dcap.c:474:4:  [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/dcap-2.47.12/src/dcap.c:476:4:  [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(time(NULL));
data/dcap-2.47.12/src/dcap.c:486:9:  [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.
				i = random()%serversNumber;
data/dcap-2.47.12/src/dcap.c:647:33:  [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.
	if( (configTunnel != NULL) || (getenv("DCACHE_IO_TUNNEL") != NULL) || (tunnel != NULL)) {
data/dcap-2.47.12/src/dcap.c:650: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.
		s = getenv("DCACHE_IO_TUNNEL");
data/dcap-2.47.12/src/dcap.c:655:8:  [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.
		tT = getenv("DCACHE_IO_TUNNEL_TYPE");
data/dcap-2.47.12/src/dcap.c:1657:24:  [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.
   if( (s == NULL) || (getenv("DCACHE_REPLY") != NULL) )
data/dcap-2.47.12/src/dcap.c:1995:10:  [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.
	first = getenv("DCACHE_CBPORT");
data/dcap-2.47.12/src/dcap.c:2024:24:  [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* env =  getenv("DCACHE_CLIENT_ACTIVE");
data/dcap-2.47.12/src/dcap.c:2057:14:  [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.
    tunnel = getenv("DCACHE_IO_TUNNEL");
data/dcap-2.47.12/src/dcap_ahead.c:46:6:  [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.
		if(getenv("DCACHE_RAHEAD") != NULL ) {
data/dcap-2.47.12/src/dcap_close.c:66:16:  [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.
	timeout_str = getenv(timeout_var);
data/dcap-2.47.12/src/dcap_debug.c:172:16:  [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 = (char *)getenv("DCACHE_DEBUG");
data/dcap-2.47.12/src/dcap_debug.c:178:21:  [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.
	out_file = (char *)getenv("DCACHE_DEBUG_FILE");
data/dcap-2.47.12/src/dcap_lcb.c:208:18:  [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.
    envvar_str = getenv(envvar_name);
data/dcap-2.47.12/src/dcap_open.c:313:5:  [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.
	   getenv("DC_LOCAL_CACHE_BUFFER") != NULL) {
data/dcap-2.47.12/src/dcap_read.c:144:6:  [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.
		if(getenv("DCACHE_RA_BUFFER") != NULL) {
data/dcap-2.47.12/src/dcap_read.c:145:22:  [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.
			ra_buffer = atoi( getenv("DCACHE_RA_BUFFER") );
data/dcap-2.47.12/src/dcap_test.c:243:6:  [3] (random) drand48:
  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.
	k = drand48() * (i+1); /* 0 <= k <= i */
data/dcap-2.47.12/src/dcap_test.c:279:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/dcap-2.47.12/src/dcap_write.c:116:33:  [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.
	if( (node->ahead == NULL) && ( getenv("DCACHE_WRBUFFER") != NULL ) ) {
data/dcap-2.47.12/src/dcap_write.c:118:6:  [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.
		if(getenv("DCACHE_WA_BUFFER") != NULL) {
data/dcap-2.47.12/src/dcap_write.c:119:22:  [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.
			wr_buffer = atoi( getenv("DCACHE_WA_BUFFER") );
data/dcap-2.47.12/src/dccp.c:35:12:  [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.
extern int getopt(int, char * const *, const char *);
data/dcap-2.47.12/src/dccp.c:175:6:  [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.
	if( getenv("DCACHE_SHOW_PROGRESS") != NULL) {
data/dcap-2.47.12/src/dccp.c:193:14:  [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( (c = getopt(argc, argv, "Ad:o:h:iX:Pt:l:aB:b:up:T:r:s:w:cC:H")) != EOF) {
data/dcap-2.47.12/src/dccp_linux_directio.c:34:12:  [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.
extern int getopt(int, char * const *, const char *);
data/dcap-2.47.12/src/dccp_linux_directio.c:96:14:  [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( (c = getopt(argc, argv, "d:o:h:iX:Pt:l:aB:b:up:T:r:s:w:c")) != EOF) {
data/dcap-2.47.12/src/dcsuck.c:30:12:  [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.
extern int getopt(int, char * const *, const char *);
data/dcap-2.47.12/src/dcsuck.c:62:14:  [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( (c = getopt(argc, argv, "Ad:o:h:iX:Pt:l:aB:b:up:T:r:s:w:c")) != EOF) {
data/dcap-2.47.12/src/dispatcher.c:35:19:  [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.
#define RAND(x)  (random()%(x) +1)
data/dcap-2.47.12/src/dispatcher.c:181: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(pid);
data/dcap-2.47.12/src/dispatcher.c:196: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(getppid());
data/dcap-2.47.12/src/links.c:57:8:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	ret = realpath(path, real_path);
data/dcap-2.47.12/src/node_plays.c:104:22:  [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.
	node->unsafeWrite = getenv("DCACHE_USE_UNSAFE") != NULL ? 1 : 0;
data/dcap-2.47.12/src/readv_test.c:55: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.
		vector[2].offset = 1024 + 4*(random()%4096);
data/dcap-2.47.12/src/system_io.c:234:6:  [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.
	if( getenv("DCACHE_IOLIB") != NULL ) {
data/dcap-2.47.12/src/system_io.c:235:13:  [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.
		libname = getenv("DCACHE_IOLIB");
data/dcap-2.47.12/src/wdccp.c:30:12:  [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.
extern int getopt(int, char * const *, const char *);
data/dcap-2.47.12/src/wdccp.c:381:14:  [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( (c = getopt(argc, argv, "Ad:o:h:iX:PB:p:T:r:s:w:nuc")) != EOF) {
data/dcap-2.47.12/src/win32_libdl.c:17:10:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
  hdll = LoadLibrary(name);
data/dcap-2.47.12/plugins/gssapi/client.c:48: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).
	serv_addr.sin_port = htons(atoi(argv[2]));
data/dcap-2.47.12/plugins/gssapi/client.c:59:3:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		bcopy(hp->h_addr_list[0], &serv_addr.sin_addr.s_addr, hp->h_length);
data/dcap-2.47.12/plugins/gssapi/gssIoTunnel.c:49: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 host[NI_MAXHOST];
data/dcap-2.47.12/plugins/gssapi/gssIoTunnel.c:91: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[MAXBUF];
data/dcap-2.47.12/plugins/gssapi/gssIoTunnel.c:149: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(data, data_buf.value, data_buf.length);
data/dcap-2.47.12/plugins/gssapi/gssIoTunnel.c:177:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, data+pos, len);
data/dcap-2.47.12/plugins/gssapi/server.c:115:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	port = atoi(argv[1]);
data/dcap-2.47.12/plugins/ssl/user.c:34: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 s[32];
data/dcap-2.47.12/plugins/ssl/user.c:80: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 s[32];
data/dcap-2.47.12/plugins/telnet/dcapPasswd.c:19: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 savepasswd[100];
data/dcap-2.47.12/plugins/telnet/dcapPasswd.c:25: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).
    pfd = open (argv[1], O_RDWR | O_CREAT, 0600);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:28:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char bf[1001], *user = NULL, *passwd = NULL;
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:34: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).
	  pf = fopen (file, "r");
data/dcap-2.47.12/plugins/telnet/user.c:34: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 s[32];
data/dcap-2.47.12/plugins/telnet/user.c:80: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 s[32];
data/dcap-2.47.12/src/br.c:35:10:  [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).
	count = atoi(argv[3]);
data/dcap-2.47.12/src/br.c:38:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	size = atoi(argv[2]);
data/dcap-2.47.12/src/dc_hack.h:33: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).
#define open       dc_open
data/dcap-2.47.12/src/dc_hack.h:73: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).
#define fopen      dc_fopen
data/dcap-2.47.12/src/dc_job_hack.c:56: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).
	serv_addr.sin_port = htons(atoi(argv[2]));
data/dcap-2.47.12/src/dc_job_hack.c:66:3:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		bcopy(hp->h_addr_list[0], &serv_addr.sin_addr.s_addr, hp->h_length);
data/dcap-2.47.12/src/dc_job_hack.c:73: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).
	sessionId = htonl(atoi(argv[3]));
data/dcap-2.47.12/src/dcap.c:321: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[MAXHOSTNAMELEN + 1];
data/dcap-2.47.12/src/dcap.c:640: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).
		srv->port = atoi(arg[1]);
data/dcap-2.47.12/src/dcap.c:718:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char s[6];
data/dcap-2.47.12/src/dcap.c:1567: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( (char *) &off, (char *) &ackinfo[3], sizeof(off));
data/dcap-2.47.12/src/dcap.c:1573: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( (char *) &ttmp, (char *) &ackinfo[3], sizeof(ttmp));
data/dcap-2.47.12/src/dcap.c:1575: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( (char *) &ttmp,(char *) &ackinfo[5], sizeof(ttmp));
data/dcap-2.47.12/src/dcap.c:1585: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( (char *) &lg,(char *) &ackinfo[3], sizeof(lg));
data/dcap-2.47.12/src/dcap.c:1745: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( (char *) &readmsg[5],(char *) &size, sizeof(size));
data/dcap-2.47.12/src/dcap.c:1757: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( (char *) &readmsg[2],(char *) &size, sizeof(size));
data/dcap-2.47.12/src/dcap.c:1776: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( (char *) &readmsg[2],(char *) &size, sizeof(size));
data/dcap-2.47.12/src/dcap.c:1788:13:  [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 *) &readmsg[2],(char *) &size, sizeof(size));
data/dcap-2.47.12/src/dcap.c:1844: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, extraOption, old);
data/dcap-2.47.12/src/dcap.c:1848: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(tmp + pos, s, strlen(s) );
data/dcap-2.47.12/src/dcap.c:1850: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(tmp + pos , " ", 1);
data/dcap-2.47.12/src/dcap.c:1999: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).
			callBackPort = atoi(first);
data/dcap-2.47.12/src/dcap.c:2004: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).
			callBackPort = atoi(first);
data/dcap-2.47.12/src/dcap.c:2007: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).
			callBackPortRange = atoi(last) - callBackPort;
data/dcap-2.47.12/src/dcap_accept.c:79: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(tmp, accepted, sizeof(acceptSocket)*i);
data/dcap-2.47.12/src/dcap_accept.c:80: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(&tmp[i], &accepted[i+1], sizeof(acceptSocket)*(qLen -i -1));
data/dcap-2.47.12/src/dcap_debug.c:74:6:  [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).
	i = atoi(str);
data/dcap-2.47.12/src/dcap_debug.c:149: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 msg[MAX_MESSAGE_LEN];
data/dcap-2.47.12/src/dcap_debug.c:174: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).
		dc_setDebugLevel(atoi(env));
data/dcap-2.47.12/src/dcap_dirent.c:155: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(ent.d_name, ep->d_name, 256);
data/dcap-2.47.12/src/dcap_dirent.c:173: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[CHAINSIZE];
data/dcap-2.47.12/src/dcap_dirent.c:332: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(ent->d_name, ss, strlen(ss));
data/dcap-2.47.12/src/dcap_error.c:106:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(sPtr,"Server Error Messages");
data/dcap-2.47.12/src/dcap_error.c:121:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char srvConstMessage[DC_MAX_SRV_ERR_MSG];
data/dcap-2.47.12/src/dcap_interpreter.c:76: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).
		result->destination = atoi(argv[0]);
data/dcap-2.47.12/src/dcap_interpreter.c:77: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).
		result->priority = atoi(argv[1]);
data/dcap-2.47.12/src/dcap_lcb.c:651: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( request->buf, copy_from, copy_len);
data/dcap-2.47.12/src/dcap_lcb.c:679: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 appended_format[MAX_MESSAGE_LEN];
data/dcap-2.47.12/src/dcap_lseek.c:237: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( (char *) &lseekmsg[2],(char *) &off, sizeof(off));
data/dcap-2.47.12/src/dcap_poll.c:78: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 m[256];
data/dcap-2.47.12/src/dcap_preload.c:38: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).
int open(const char *path, int flags,...)
data/dcap-2.47.12/src/dcap_preload.c:299:7:  [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 *fopen(const char *path, const char *mode)
data/dcap-2.47.12/src/dcap_read.c:145: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).
			ra_buffer = atoi( getenv("DCACHE_RA_BUFFER") );
data/dcap-2.47.12/src/dcap_read.c:178: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(buff, node->ahead->buffer + node->ahead->cur, buflen);
data/dcap-2.47.12/src/dcap_read.c:182: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(buff, node->ahead->buffer + node->ahead->cur, rest);
data/dcap-2.47.12/src/dcap_read.c:207: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( (char *) &readmsg[2], (char *) &size, sizeof(size));
data/dcap-2.47.12/src/dcap_read.c:235:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy( (char *) &readmsg[5], (char *) &size, sizeof(size));
data/dcap-2.47.12/src/dcap_read.c:242: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( (char *) &readmsg[2],(char *) &size, sizeof(size));
data/dcap-2.47.12/src/dcap_read.c:391: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((char *)buff + rest, node->ahead->buffer, totsize);
data/dcap-2.47.12/src/dcap_read.c:395: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((char *)buff + rest, node->ahead->buffer, buflen - rest);
data/dcap-2.47.12/src/dcap_read.c:484: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(vector[i].iov_base, iobuf + iobuf_pos, cain);
data/dcap-2.47.12/src/dcap_read.c:520: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( (char *) &readmsg[2], (char *) &requestSize, sizeof(requestSize));
data/dcap-2.47.12/src/dcap_read.c:663: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( (char *) &readvmsg[j], (char *) &offset, sizeof(offset));
data/dcap-2.47.12/src/dcap_reconnect.c:141: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 fail_message[64];
data/dcap-2.47.12/src/dcap_reconnect.c:144: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(fail_message, "%d 1 client fail\n", node->queueID);
data/dcap-2.47.12/src/dcap_reconnect.c:250: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 ping[64];
data/dcap-2.47.12/src/dcap_reconnect.c:258: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(ping, "%d 2 client ping\n", node->queueID);
data/dcap-2.47.12/src/dcap_stat.c:240:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, s, sizeof(struct _stati64) );
data/dcap-2.47.12/src/dcap_stat.c:243:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, s, sizeof(struct stat64) );
data/dcap-2.47.12/src/dcap_stat.c:319:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, s, sizeof(struct _stati64) );
data/dcap-2.47.12/src/dcap_stat.c:322:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, s, sizeof(struct stat64) );
data/dcap-2.47.12/src/dcap_test.c:377: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 mode[11];
data/dcap-2.47.12/src/dcap_unix2win.h:77:18:  [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).
#define atoll(a) atol(a)
data/dcap-2.47.12/src/dcap_url.c:188: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).
                        url->port = atoi(port_str);
data/dcap-2.47.12/src/dcap_url.c:222: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(url->host, DEFAULT_DOOR , def_door_len);
data/dcap-2.47.12/src/dcap_url.c:224: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(url->host + def_door_len, ".", 1);
data/dcap-2.47.12/src/dcap_url.c:226: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(url->host + def_door_len +1, domain, host_len);
data/dcap-2.47.12/src/dcap_write.c:119: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).
			wr_buffer = atoi( getenv("DCACHE_WA_BUFFER") );
data/dcap-2.47.12/src/dcap_write.c:156: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( node->ahead->buffer +node->ahead->cur ,  buff, buflen );
data/dcap-2.47.12/src/dcap_write.c:202: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( (char *) &writemsg[2],(char *) &offt, sizeof(offt));
data/dcap-2.47.12/src/dcap_write.c:345: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(iobuf + iobuf_pos, vector[i].iov_base, vector[i].iov_len);
data/dcap-2.47.12/src/dccp.c:145: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 filename[MAXPATHLEN],*inpfile, *outfile;
data/dcap-2.47.12/src/dccp.c:146: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 formatted_rate[12], formatted_size[12];
data/dcap-2.47.12/src/dccp.c:147: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 extraOption[MAXPATHLEN];
data/dcap-2.47.12/src/dccp.c:148: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 allocSpaceOption[MAXPATHLEN];
data/dcap-2.47.12/src/dccp.c:200:23:  [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).
				dc_setOpenTimeout(atol(optarg));
data/dcap-2.47.12/src/dccp.c:212: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).
				stagetime = atoi(optarg);
data/dcap-2.47.12/src/dccp.c:218:19:  [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).
				buffer_size = atol(optarg);
data/dcap-2.47.12/src/dccp.c:224:22:  [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).
				ra_buffer_size = atol(optarg);
data/dcap-2.47.12/src/dccp.c:235: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).
				    first_port = atoi(optarg);
data/dcap-2.47.12/src/dccp.c:241: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).
				    first_port = atoi(firstP);
data/dcap-2.47.12/src/dccp.c:242: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).
					last_port = atoi(lastP +1);
data/dcap-2.47.12/src/dccp.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).
				dc_setTCPReceiveBuffer( atoi(optarg) );
data/dcap-2.47.12/src/dccp.c:255:26:  [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).
				dc_setTCPSendBuffer( atoi(optarg) );
data/dcap-2.47.12/src/dccp.c:267: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).
				dc_setCloseTimeout(atoi(optarg));
data/dcap-2.47.12/src/dccp.c:629: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 tmp[15]; /* must ensure this is big enough for all items */
data/dcap-2.47.12/src/dccp.c:755: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 si_size[10];
data/dcap-2.47.12/src/dccp.c:767: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 formatted_bytes[10];
data/dcap-2.47.12/src/dccp.c:786: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 percent[5];
data/dcap-2.47.12/src/dccp.c:801:8:  [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_RDONLY);
data/dcap-2.47.12/src/dccp_linux_directio.c:71: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 filename[MAXPATHLEN],*inpfile, *outfile;
data/dcap-2.47.12/src/dccp_linux_directio.c:103:23:  [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).
				dc_setOpenTimeout(atol(optarg));
data/dcap-2.47.12/src/dccp_linux_directio.c:115: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).
				stagetime = atoi(optarg);
data/dcap-2.47.12/src/dccp_linux_directio.c:121:19:  [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).
				buffer_size = atol(optarg);
data/dcap-2.47.12/src/dccp_linux_directio.c:127:22:  [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).
				ra_buffer_size = atol(optarg);
data/dcap-2.47.12/src/dccp_linux_directio.c:138: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).
				    first_port = atoi(optarg);
data/dcap-2.47.12/src/dccp_linux_directio.c:144: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).
				    first_port = atoi(firstP);
data/dcap-2.47.12/src/dccp_linux_directio.c:145: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).
					last_port = atoi(lastP +1);
data/dcap-2.47.12/src/dccp_linux_directio.c:155: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).
				dc_setTCPReceiveBuffer( atoi(optarg) );
data/dcap-2.47.12/src/dccp_linux_directio.c:158:26:  [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).
				dc_setTCPSendBuffer( atoi(optarg) );
data/dcap-2.47.12/src/dccp_linux_directio.c:216: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(filename, "-alloc-size=%lld",(long long)sbuf.st_size);
data/dcap-2.47.12/src/dcsuck.c:50: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 extraOption[MAXPATHLEN];
data/dcap-2.47.12/src/fnal_thread.c:142: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).
         tnum = atoi(argv[1]);
data/dcap-2.47.12/src/gettrace.c:148: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 exename[MAXPATHLEN];
data/dcap-2.47.12/src/gettrace.c:184:32:  [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.
		more = printStackInfo((const char *) (returnStack[i]), i - 1);
data/dcap-2.47.12/src/print_size.c:95: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 tmp[6];
data/dcap-2.47.12/src/string2stat.c:28:18:  [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).
#define atoll(a) atol(a)
data/dcap-2.47.12/src/string2stat.c:135: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).
			s->st_dev = atoi(c);
data/dcap-2.47.12/src/string2stat.c:140: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).
			s->st_ino = atoi(c);
data/dcap-2.47.12/src/string2stat.c:150: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).
			s->st_nlink = atoi(c);
data/dcap-2.47.12/src/string2stat.c:155: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).
			s->st_uid = atoi(c);
data/dcap-2.47.12/src/string2stat.c:160: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).
			s->st_gid = atoi(c);
data/dcap-2.47.12/src/string2stat.c:165: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).
			s->st_rdev = atoi(c);
data/dcap-2.47.12/src/string2stat.c:177: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).
			s->st_blksize = atoi(c);
data/dcap-2.47.12/src/string2stat.c:182: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).
			s->st_blocks = atoi(c);
data/dcap-2.47.12/src/string2stat.c:188: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).
			s->st_atime = atoi(c);
data/dcap-2.47.12/src/string2stat.c:193: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).
			s->st_mtime = atoi(c);
data/dcap-2.47.12/src/string2stat.c:198: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).
			s->st_ctime = atoi(c);
data/dcap-2.47.12/src/system_io.h:93:32:  [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).
#    define system_open(a,b,c) open(a,b,c)
data/dcap-2.47.12/src/system_io.h:129:32:  [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).
#    define system_fopen(a, b) fopen(a, b)
data/dcap-2.47.12/src/system_io.h:167:32:  [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).
#    define system_fopen(a, b) fopen(a, b)
data/dcap-2.47.12/src/thread_test.c:32: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[BSIZE];
data/dcap-2.47.12/src/thread_test.c:77:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	tnum = atoi(argv[1]);
data/dcap-2.47.12/src/wdccp.c:91: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(newFile, path, dirLen);
data/dcap-2.47.12/src/wdccp.c:93: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( newFile + dirLen + 1, oFile, fileLen);
data/dcap-2.47.12/src/wdccp.c:121: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 extracommand[128];
data/dcap-2.47.12/src/wdccp.c:157: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(extracommand, "-alloc-size=%ld",sbuf.st_size);
data/dcap-2.47.12/src/wdccp.c:388:23:  [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).
				dc_setOpenTimeout(atol(optarg));
data/dcap-2.47.12/src/wdccp.c:400:19:  [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).
				buffer_size = atol(optarg);
data/dcap-2.47.12/src/wdccp.c:411: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).
				    first_port = atoi(optarg);
data/dcap-2.47.12/src/wdccp.c:417: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).
				    first_port = atoi(firstP);
data/dcap-2.47.12/src/wdccp.c:418: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).
					last_port = atoi(lastP +1);
data/dcap-2.47.12/src/wdccp.c:428: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).
				dc_setTCPReceiveBuffer( atoi(optarg) );
data/dcap-2.47.12/src/wdccp.c:431:26:  [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).
				dc_setTCPSendBuffer( atoi(optarg) );
data/dcap-2.47.12/src/win32_libdl.c:11:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char errbuf[512];
data/dcap-2.47.12/src/win32_libdl.c:50: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(errbuf, "error code %d closing library", GetLastError());
data/dcap-2.47.12/src/xutil.c:58: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(new_string, source, size);
data/dcap-2.47.12/src/xutil.c:67:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(new_string, source, len);
data/dcap-2.47.12/plugins/gssapi/base64.c:86:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return strlen(s);
data/dcap-2.47.12/plugins/gssapi/base64.c:97: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(token) < 4)
data/dcap-2.47.12/plugins/gssapi/gssIoTunnel.c:117:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			len = read(fd, &c, 1);
data/dcap-2.47.12/plugins/gssapi/util.c:222:11:  [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).
	width -= strlen((const char *)arg);
data/dcap-2.47.12/plugins/ssl/sslTunnel.c:110:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	SSL_write(ssl_con, en->login , strlen(en->login));
data/dcap-2.47.12/plugins/ssl/sslTunnel.c:112:34:  [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).
	SSL_write(ssl_con, en->passwd , strlen(en->passwd));
data/dcap-2.47.12/plugins/ssl/user.c:19:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memset(en->passwd, 0, strlen(en->passwd) );
data/dcap-2.47.12/plugins/ssl/user.c:41: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).
	write(output, prom, strlen(prom));
data/dcap-2.47.12/plugins/ssl/user.c:54:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(input, &c, 1);
data/dcap-2.47.12/plugins/ssl/user.c:67: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).
	memset(s, 0, strlen(s) );
data/dcap-2.47.12/plugins/ssl/user.c:87: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).
	write(output, prom, strlen(prom));
data/dcap-2.47.12/plugins/ssl/user.c:101:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(input, &c, 1);
data/dcap-2.47.12/plugins/ssl/user.c:120: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).
	memset(s, 0, strlen(s) );
data/dcap-2.47.12/plugins/telnet/dcapPasswd.c:35:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(savepasswd, (char*)crypt(newpasswd, user), 100);
data/dcap-2.47.12/plugins/telnet/dcapPasswd.c:56:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(savepasswd, (char*)crypt(newpasswd, user), 100);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:15:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return read (fd, buff, len);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:40: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).
		bf[strlen(bf)-1] = 0;
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:41: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).
		user = strdup (bf + strlen ("dCap_Username = "));
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:44: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).
		bf[strlen(bf)-1] = 0;
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:45:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		passwd = strdup (bf + strlen("dCap_Password = "));
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:72:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	  ret = read (fd, bf, 1);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:74:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read (fd, bf, 1);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:75:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        write(fd, user, strlen(user));
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:79:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          read (fd, bf, 1);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:81:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read (fd, bf, 1);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:82: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).
        write(fd, passwd , strlen(passwd));
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:87:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          ret = read (fd, bf, 1);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:90:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read (fd, bf, 1);
data/dcap-2.47.12/plugins/telnet/telnetTunnel.c:91:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read (fd, bf, 1);
data/dcap-2.47.12/plugins/telnet/user.c:19:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memset(en->passwd, 0, strlen(en->passwd) );
data/dcap-2.47.12/plugins/telnet/user.c:41: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).
	write(output, prom, strlen(prom));
data/dcap-2.47.12/plugins/telnet/user.c:54:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(input, &c, 1);
data/dcap-2.47.12/plugins/telnet/user.c:67: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).
	memset(s, 0, strlen(s) );
data/dcap-2.47.12/plugins/telnet/user.c:87: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).
	write(output, prom, strlen(prom));
data/dcap-2.47.12/plugins/telnet/user.c:101:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(input, &c, 1);
data/dcap-2.47.12/plugins/telnet/user.c:120: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).
	memset(s, 0, strlen(s) );
data/dcap-2.47.12/src/array.c:41:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
   size_t keysize = strlen((const char *)key);
data/dcap-2.47.12/src/dc_hack.h:36:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define read       dc_read
data/dcap-2.47.12/src/dc_hack.h:84:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define fgetc      dc_fgetc
data/dcap-2.47.12/src/dcap.c:343:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(node->directory) + strlen(PNFS_DC_LOCK) + 1;	/* dir/file */
data/dcap-2.47.12/src/dcap.c:343:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(node->directory) + strlen(PNFS_DC_LOCK) + 1;	/* dir/file */
data/dcap-2.47.12/src/dcap.c:369:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(node->directory) + strlen(PNFS_DC_CONF) + 1;	/* dir/file */
data/dcap-2.47.12/src/dcap.c:369:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(node->directory) + strlen(PNFS_DC_CONF) + 1;	/* dir/file */
data/dcap-2.47.12/src/dcap.c:784:39:  [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 (sendControlMessage(fd, helloStr, strlen(helloStr), en) < 0) {
data/dcap-2.47.12/src/dcap.c:1141:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(outStr);
data/dcap-2.47.12/src/dcap.c:1590:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(text, ((char *)&ackinfo[3]) + 2 , lg);
data/dcap-2.47.12/src/dcap.c:1825: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).
	if( (s == NULL) || (strlen(s)==0) ) {
data/dcap-2.47.12/src/dcap.c:1831: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).
		old = strlen(extraOption);
data/dcap-2.47.12/src/dcap.c:1834:8:  [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).
	new = strlen(s) + old + 1; /* have an space between options */
data/dcap-2.47.12/src/dcap.c:1848: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).
	memcpy(tmp + pos, s, strlen(s) );
data/dcap-2.47.12/src/dcap.c:1849: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(s);
data/dcap-2.47.12/src/dcap.c:2061:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        tunnel = malloc(strlen(url->prefix) + 12 + 1); // len(prefix) + len(libTunnel.so) + '\0'
data/dcap-2.47.12/src/dcap_command.c:78: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).
		system_write(2, argv[i], strlen(argv[i]) );
data/dcap-2.47.12/src/dcap_dirent.c:296:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if( (line == NULL) || (strlen(line) < 5) ) {
data/dcap-2.47.12/src/dcap_dirent.c:332:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(ent->d_name, ss, strlen(ss));
data/dcap-2.47.12/src/dcap_dirent.c:333:14:  [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).
	ent->d_name[strlen(ss)] = '\0';
data/dcap-2.47.12/src/dcap_error.c:169: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).
	if ((msg != NULL) && strlen(msg)) {
data/dcap-2.47.12/src/dcap_error.c:170: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).
		system_write(2, msg, strlen(msg) );
data/dcap-2.47.12/src/dcap_error.c:175:41:  [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).
	system_write(2, dc_strerror(dc_errno), strlen(dc_strerror(dc_errno)) );
data/dcap-2.47.12/src/dcap_error.c:180: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).
		system_write(2, se, strlen(se) );
data/dcap-2.47.12/src/dcap_error.c:219:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(msg);
data/dcap-2.47.12/src/dcap_error.c:224:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(p, msg, len);
data/dcap-2.47.12/src/dcap_lcb.c:684:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(appended_format);
data/dcap-2.47.12/src/dcap_lcb.c:686:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat( appended_format, format, sizeof(appended_format) - len -1);
data/dcap-2.47.12/src/dcap_mkdir.c:60:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mask = umask(0);
data/dcap-2.47.12/src/dcap_mkdir.c:61:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask);
data/dcap-2.47.12/src/dcap_open.c:161:17:  [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).
					tmpIndex = strlen(path);
data/dcap-2.47.12/src/dcap_open.c:270:8:  [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).
	stamp[strlen(stamp) -1] = '\0';
data/dcap-2.47.12/src/dcap_preload.c:189:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ssize_t  read(int fd, void *buff, size_t n)
data/dcap-2.47.12/src/dcap_preload.c:380:5:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int fgetc(FILE *stream)
data/dcap-2.47.12/src/dcap_preload.c:387:5:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
int getc(FILE *stream)
data/dcap-2.47.12/src/dcap_reconnect.c:145: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).
	sendControlMessage(node->fd, fail_message, strlen(fail_message), node->tunnel);
data/dcap-2.47.12/src/dcap_str_util.c:129:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  dest_used_space = strlen( dest);
data/dcap-2.47.12/src/dcap_str_util.c:134:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( &dest [dest_used_space], src, available_space);
data/dcap-2.47.12/src/dcap_url.c:59: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).
	buf = malloc(strlen(s) * 3 + 1); // every escaped character takes 3 symbols. Potentially all can be escaped
data/dcap-2.47.12/src/dcap_url.c:136: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).
	s = (char *)(s + strlen(DCAP_PREFIX));
data/dcap-2.47.12/src/dcap_url.c:208:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			w = (char *) domain + strlen(domain);
data/dcap-2.47.12/src/dcap_url.c:212: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).
		def_door_len = strlen(DEFAULT_DOOR);
data/dcap-2.47.12/src/dcap_url.c:244: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).
	s = malloc((url->prefix == NULL ? 0 : strlen(url->prefix)) +
data/dcap-2.47.12/src/dcap_url.c:245:3:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strlen(url->host) + strlen(url->file) + 9);
data/dcap-2.47.12/src/dcap_url.c:245: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).
		strlen(url->host) + strlen(url->file) + 9);
data/dcap-2.47.12/src/dccp.c:570:12:  [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).
	current = strlen( buffer);
data/dcap-2.47.12/src/dccp.c:635:17:  [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).
	item->length = strlen( tmp);
data/dcap-2.47.12/src/dccp.c:684:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
			strcat( buffer, " ");
data/dcap-2.47.12/src/dispatcher.c:301:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				n = read(fd, msg, sizeof(message));
data/dcap-2.47.12/src/input_parser.c:150: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).
	write(p[1], MSG, strlen(MSG));
data/dcap-2.47.12/src/lineparser.c:41:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((buffer == NULL) || (strlen(buffer) > MAXLINELEN)) {
data/dcap-2.47.12/src/lineparser.c:44:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(buffer);
data/dcap-2.47.12/src/parser.c:52:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((buffer == NULL) || (strlen(buffer) > MAXLINELEN)) {
data/dcap-2.47.12/src/parser.c:55:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(buffer);
data/dcap-2.47.12/src/passive.c:49: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).
    passive[1] = htonl(strlen(pool->challenge));
data/dcap-2.47.12/src/passive.c:52:39:  [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).
    system_write(fd, pool->challenge, strlen(pool->challenge));
data/dcap-2.47.12/src/pnfs.c:71:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(directory, path, ds);
data/dcap-2.47.12/src/pnfs.c:75:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	pnfsLayer = (char *) malloc(strlen("/.(get)(cursor)") + 1 + ds);
data/dcap-2.47.12/src/pnfs.c:132:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	pnfsLayer = (char *) malloc(strlen(node->file_name) + strlen("/.(id)()") + 1 + strlen(node->directory));
data/dcap-2.47.12/src/pnfs.c:132:56:  [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).
	pnfsLayer = (char *) malloc(strlen(node->file_name) + strlen("/.(id)()") + 1 + strlen(node->directory));
data/dcap-2.47.12/src/pnfs.c:132:81:  [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).
	pnfsLayer = (char *) malloc(strlen(node->file_name) + strlen("/.(id)()") + 1 + strlen(node->directory));
data/dcap-2.47.12/src/pnfs.c:201:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	pnfsLayer = (char *) malloc(strlen(file) + strlen("/.(id)()") + 1 + strlen(dir));
data/dcap-2.47.12/src/pnfs.c:201: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).
	pnfsLayer = (char *) malloc(strlen(file) + strlen("/.(id)()") + 1 + strlen(dir));
data/dcap-2.47.12/src/pnfs.c:201:70:  [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).
	pnfsLayer = (char *) malloc(strlen(file) + strlen("/.(id)()") + 1 + strlen(dir));
data/dcap-2.47.12/src/string2stat.c:41: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( str_mode ) < 9 ) {
data/dcap-2.47.12/src/system_io.c:341: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).
				s_write(2, em, strlen(em) );
data/dcap-2.47.12/src/system_io.h:94:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#    define system_read(a,b,c) read(a,b,c)
data/dcap-2.47.12/src/system_io.h:99:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
              return read(a, b, c);
data/dcap-2.47.12/src/system_io.h:178:29:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#    define system_fgetc(a) fgetc(a)
data/dcap-2.47.12/src/tunnelManager.c:105:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		fullpath = malloc(strlen(TUNNELLIBDIR) + strlen(libname) + 2);
data/dcap-2.47.12/src/tunnelManager.c:105: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).
		fullpath = malloc(strlen(TUNNELLIBDIR) + strlen(libname) + 2);
data/dcap-2.47.12/src/tunnelManager.c:107:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(fullpath, "/");
data/dcap-2.47.12/src/wdccp.c:77:11:  [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).
	dirLen = strlen(path);
data/dcap-2.47.12/src/wdccp.c:81:12:  [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).
	fileLen = strlen(oFile);
data/dcap-2.47.12/src/xutil.c:49:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(source);
data/dcap-2.47.12/src/xutil.c:103: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(path) == 1 ) {
data/dcap-2.47.12/src/xutil.c:111: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).
	if( fname == path + strlen(path) -1) {
data/dcap-2.47.12/src/xutil.c:112: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).
		s = xstrndup( path , strlen(path) -1 );
data/dcap-2.47.12/src/xutil.c:148: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).
	if( dir == path + strlen(path) -1) {
data/dcap-2.47.12/src/xutil.c:149: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).
		s = xstrndup( path , strlen(path) -1);

ANALYSIS SUMMARY:

Hits = 359
Lines analyzed = 22046 in approximately 0.53 seconds (41772 lines/second)
Physical Source Lines of Code (SLOC) = 14723
Hits@level = [0] 213 [1] 116 [2] 153 [3]  46 [4]  40 [5]   4
Hits@level+ = [0+] 572 [1+] 359 [2+] 243 [3+]  90 [4+]  44 [5+]   4
Hits/KSLOC@level+ = [0+] 38.8508 [1+] 24.3836 [2+] 16.5048 [3+] 6.11288 [4+] 2.98852 [5+] 0.271684
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.