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/dmucs-0.6.1/dmucs.h Examining data/dmucs-0.6.1/dmucs_dprop.h Examining data/dmucs-0.6.1/dmucs_host.cc Examining data/dmucs-0.6.1/dmucs_host.h Examining data/dmucs-0.6.1/dmucs_host_state.cc Examining data/dmucs-0.6.1/dmucs_host_state.h Examining data/dmucs-0.6.1/dmucs_msg.h Examining data/dmucs-0.6.1/dmucs_pkt.cc Examining data/dmucs-0.6.1/dmucs_pkt.h Examining data/dmucs-0.6.1/dmucs_resolve.cc Examining data/dmucs-0.6.1/dmucs_resolve.h Examining data/dmucs-0.6.1/test.cc Examining data/dmucs-0.6.1/COSMIC/Saccept.c Examining data/dmucs-0.6.1/COSMIC/Sclose.c Examining data/dmucs-0.6.1/COSMIC/Sgets.c Examining data/dmucs-0.6.1/COSMIC/Sinit.c Examining data/dmucs-0.6.1/COSMIC/Smaskwait.c Examining data/dmucs-0.6.1/COSMIC/Smkskt.c Examining data/dmucs-0.6.1/COSMIC/Sopenv.c Examining data/dmucs-0.6.1/COSMIC/Speek.c Examining data/dmucs-0.6.1/COSMIC/Speeraddr.c Examining data/dmucs-0.6.1/COSMIC/Speername.c Examining data/dmucs-0.6.1/COSMIC/Sprintf.c Examining data/dmucs-0.6.1/COSMIC/Sprtskt.c Examining data/dmucs-0.6.1/COSMIC/Sread.c Examining data/dmucs-0.6.1/COSMIC/Sreadbytes.c Examining data/dmucs-0.6.1/COSMIC/Srmsrvr.c Examining data/dmucs-0.6.1/COSMIC/Sscanf.c Examining data/dmucs-0.6.1/COSMIC/Stest.c Examining data/dmucs-0.6.1/COSMIC/Stimeoutwait.c Examining data/dmucs-0.6.1/COSMIC/Swait.c Examining data/dmucs-0.6.1/COSMIC/cprt.c Examining data/dmucs-0.6.1/COSMIC/error.c Examining data/dmucs-0.6.1/COSMIC/fopenv.c Examining data/dmucs-0.6.1/COSMIC/outofmem.c Examining data/dmucs-0.6.1/COSMIC/rdcolor.c Examining data/dmucs-0.6.1/COSMIC/sprt.c Examining data/dmucs-0.6.1/COSMIC/srmtrblk.c Examining data/dmucs-0.6.1/COSMIC/stpblk.c Examining data/dmucs-0.6.1/COSMIC/stpnxt.c Examining data/dmucs-0.6.1/COSMIC/strnxtfmt.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/multiskt.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/oobrecv.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/oobsend.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/sktfork.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/sktpoll.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/sktsig.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/smclient.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/smsrvr.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/talkclient.c Examining data/dmucs-0.6.1/COSMIC/EXAMPLES/talksrvr.c Examining data/dmucs-0.6.1/COSMIC/EXE/Spm.c Examining data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c Examining data/dmucs-0.6.1/COSMIC/EXE/spmchk.c Examining data/dmucs-0.6.1/COSMIC/EXE/spmtable.c Examining data/dmucs-0.6.1/COSMIC/EXE/srmsrvr.c Examining data/dmucs-0.6.1/COSMIC/HDR/rdcolor.h Examining data/dmucs-0.6.1/COSMIC/HDR/setproto.h Examining data/dmucs-0.6.1/COSMIC/HDR/xstdlib.h Examining data/dmucs-0.6.1/COSMIC/HDR/xtdio.h Examining data/dmucs-0.6.1/COSMIC/HDR/sockets.h Examining data/dmucs-0.6.1/COSMIC/Sopen.c Examining data/dmucs-0.6.1/COSMIC/Sputs.c Examining data/dmucs-0.6.1/COSMIC/Swrite.c Examining data/dmucs-0.6.1/COSMIC/Svprintf.c Examining data/dmucs-0.6.1/dmucs_db.cc Examining data/dmucs-0.6.1/dmucs_db.h Examining data/dmucs-0.6.1/dmucs_hosts_file.cc Examining data/dmucs-0.6.1/dmucs_hosts_file.h Examining data/dmucs-0.6.1/dmucs_msg.cc Examining data/dmucs-0.6.1/gethost.cc Examining data/dmucs-0.6.1/loadavg.cc Examining data/dmucs-0.6.1/main.cc Examining data/dmucs-0.6.1/monitor.cc Examining data/dmucs-0.6.1/remhost.cc FINAL RESULTS: data/dmucs-0.6.1/COSMIC/EXE/Spm.c:601:1: [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(p->sktname,sktname); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:610: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(p->sharehost,sharehost); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:785:4: [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(cw->sktname,sktname); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1138:1: [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 (command_string,STRTSRVR_PGM); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1142:1: [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 (command_string,sktname); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1145:1: [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 (command_string,sktname); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1149:1: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(command_string); data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:257:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(buf,"%s",cmdbuf); data/dmucs-0.6.1/COSMIC/EXE/spmchk.c:59:14: [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). if(argc > 1) strcpy(hostnm, argv[1]); data/dmucs-0.6.1/COSMIC/Smkskt.c:46:1: [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(skt->hostname,hostname); data/dmucs-0.6.1/COSMIC/Smkskt.c:51:1: [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(skt->sktname,sktname); data/dmucs-0.6.1/COSMIC/Sopen.c:148:13: [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(sktname,skthost? skthost : ""); data/dmucs-0.6.1/COSMIC/Sopen.c:151:13: [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(sktname,skthost); data/dmucs-0.6.1/COSMIC/Sopenv.c:81:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s@%s",sktname,env); data/dmucs-0.6.1/COSMIC/Speername.c:63:27: [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). if(host && host->h_name) strcpy(buf,host->h_name); data/dmucs-0.6.1/COSMIC/Sprintf.c:53:6: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. ret= vsprintf(buf,fmt,args); data/dmucs-0.6.1/COSMIC/Sprtskt.c:43:1: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b,"#%d:p%d:%s:%s@%s", data/dmucs-0.6.1/COSMIC/Sscanf.c:143:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if(sscanf(buf,snglfmt,arg)) ++cnt; data/dmucs-0.6.1/COSMIC/Svprintf.c:53:6: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. ret= vsprintf(buf,fmt,__va_list args); data/dmucs-0.6.1/COSMIC/Svprintf.c:55:6: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. ret= vsprintf(buf,fmt,args); data/dmucs-0.6.1/COSMIC/error.c:91:1: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr,fmt,args); data/dmucs-0.6.1/COSMIC/error.c:95:1: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr,fmt,args); data/dmucs-0.6.1/COSMIC/fopenv.c:59:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s%s",env,filename); data/dmucs-0.6.1/COSMIC/fopenv.c:62:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s/%s",env,filename); data/dmucs-0.6.1/COSMIC/fopenv.c:65:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s\\%s",env,filename); data/dmucs-0.6.1/COSMIC/fopenv.c:68:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s\\%s",env,filename); data/dmucs-0.6.1/COSMIC/fopenv.c:71:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s/%s",env,filename); data/dmucs-0.6.1/COSMIC/fopenv.c:74:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"%s\\%s",env,filename); data/dmucs-0.6.1/COSMIC/outofmem.c:40:1: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr,fmt,args); data/dmucs-0.6.1/COSMIC/rdcolor.c:222:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(cmd,"%s",color); data/dmucs-0.6.1/COSMIC/rdcolor.c:274:16: [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). if(newdef[0]) strcpy(*colors[icolor].color,newdef); data/dmucs-0.6.1/dmucs.h:29:39: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DMUCS_DEBUG(x) if (debugMode) fprintf x data/dmucs-0.6.1/dmucs_hosts_file.cc:95:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(line.c_str(), "%s %d %d", machine, &numcpus, data/dmucs-0.6.1/dmucs_msg.cc:54:12: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. int res = sscanf(buffer, "host %s %s", cliIpStr, dpropstr); data/dmucs-0.6.1/dmucs_msg.cc:68:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "load %s %f %f %f %s", machname, &ldavg1, data/dmucs-0.6.1/dmucs_msg.cc:70:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "load %s %f %f %f", machname, &ldavg1, data/dmucs-0.6.1/dmucs_msg.cc:90:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "status %s %s %s", machname, state, dpropstr)!= 3){ data/dmucs-0.6.1/dmucs_msg.cc:91:17: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "status %s %s", machname, state) != 2) { data/dmucs-0.6.1/dmucs_pkt.cc:48:12: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. int res = sscanf(buffer, "host %s", dpropstr); data/dmucs-0.6.1/dmucs_pkt.cc:62:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "load %s %f %f %f", machname, &ldavg1, data/dmucs-0.6.1/dmucs_pkt.cc:64:10: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "load %s %f %f %f %s", machname, &ldavg1, data/dmucs-0.6.1/dmucs_pkt.cc:84:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "status %s %s", machname, state) != 2) { data/dmucs-0.6.1/dmucs_pkt.cc:85:10: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buffer, "status %s %s %s", machname, state, data/dmucs-0.6.1/gethost.cc:237:6: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (execvp(argv[nextarg], &argv[nextarg]) < 0) { data/dmucs-0.6.1/loadavg.cc:134:17: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *output = popen("uptime", "r"); data/dmucs-0.6.1/main.cc:314:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s:%d", inet_ntoa(sin->sin_addr), sin->sin_port); data/dmucs-0.6.1/test.cc:103:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(o.str().c_str()); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1034: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. fwfile= getenv("SPMFIREWALL"); data/dmucs-0.6.1/COSMIC/EXE/spmtable.c:56: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. machines= getenv(*envvar? envvar : "SKTPATH"); data/dmucs-0.6.1/COSMIC/EXE/spmtable.c:84:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pmshare= getenv("PMSHARE"); data/dmucs-0.6.1/COSMIC/HDR/xstdlib.h:23: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. extern char *getenv(); data/dmucs-0.6.1/COSMIC/Sopen.c:113: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. if(!getenv("PMSHARE")) { data/dmucs-0.6.1/COSMIC/Sopen.c:214:12: [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. pmshare= getenv("PMSHARE"); data/dmucs-0.6.1/COSMIC/Sopen.c:432: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. pmshare= getenv("PMSHARE"); data/dmucs-0.6.1/COSMIC/Sopenv.c:74: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. env= getenv(env_var); data/dmucs-0.6.1/COSMIC/Srmsrvr.c:56:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pmshare= getenv("PMSHARE"); data/dmucs-0.6.1/COSMIC/fopenv.c:50: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. env= getenv(env_var); data/dmucs-0.6.1/COSMIC/rdcolor.c:172: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. term= getenv("TERM"); data/dmucs-0.6.1/dmucs_db.cc:134:2: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom((unsigned int) time(NULL)); data/dmucs-0.6.1/dmucs_db.cc:135:10: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. int n = random() % itr->second.size(); data/dmucs-0.6.1/gethost.cc:88:23: [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("DMUCS_SERVER"); data/dmucs-0.6.1/COSMIC/EXAMPLES/multiskt.c:46: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 mesg[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXAMPLES/oobrecv.c:60:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXAMPLES/oobrecv.c:108:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXAMPLES/oobsend.c:51:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXAMPLES/sktfork.c:72:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXAMPLES/sktsig.c:61:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXAMPLES/smclient.c:10:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/dmucs-0.6.1/COSMIC/EXAMPLES/talkclient.c:56:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXAMPLES/talksrvr.c:75:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:102: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 hostname[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:103: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 hostaddr[4]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:104: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 sktname[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:268: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 argv[1][4]={"Spm"}; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:655: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 sharehost[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:927:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char locbuf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1015:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1038:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp= fopen(fwfile,"r"); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1136:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char command_string[1024] = ""; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:137:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:138:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmdbuf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:411: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 locbuf[BIGBUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:497:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char locbuf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:504:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp= fopen(b,"r"); data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:533:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char locbuf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:561:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char locbuf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:683:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char locbuf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:743:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf1[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/spmchk.c:54:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostnm[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/spmtable.c:42:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char localhost[BUFSIZE]; data/dmucs-0.6.1/COSMIC/EXE/spmtable.c:111:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char locbuf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/Sopen.c:75: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 localhost[BUFSIZE] = ""; data/dmucs-0.6.1/COSMIC/Sopen.c:76: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 sktname[BUFSIZE]; data/dmucs-0.6.1/COSMIC/Sopen.c:204:10: [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 hostname[BUFSIZE]; data/dmucs-0.6.1/COSMIC/Sopen.c:417: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 skthost[BUFSIZE]; /* client's hostname */ data/dmucs-0.6.1/COSMIC/Sopen.c:554:10: [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 localhost[BUFSIZE]; data/dmucs-0.6.1/COSMIC/Sopenv.c:50: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 buf[BUFSIZE]; data/dmucs-0.6.1/COSMIC/Speek.c:54: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 *) buf)[0]= '\0'; data/dmucs-0.6.1/COSMIC/Speeraddr.c:53: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. unsigned char byte[4]; data/dmucs-0.6.1/COSMIC/Speername.c:34: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 buf1[PEERBUF]; data/dmucs-0.6.1/COSMIC/Speername.c:35: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 buf2[PEERBUF]; data/dmucs-0.6.1/COSMIC/Speername.c:36: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 buf3[PEERBUF]; data/dmucs-0.6.1/COSMIC/Speername.c:52:10: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. if(!skt) strcpy(buf,"null socket"); data/dmucs-0.6.1/COSMIC/Speername.c:56:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf,"unknown"); data/dmucs-0.6.1/COSMIC/Speername.c:64:27: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. else if(!host) strcpy(buf,"unable to get host"); data/dmucs-0.6.1/COSMIC/Speername.c:65:27: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. else strcpy(buf,"unknown hostname"); data/dmucs-0.6.1/COSMIC/Sprintf.c:33: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 buf[PM_BIGBUF]; data/dmucs-0.6.1/COSMIC/Sprtskt.c:33: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 buf1[BUFSIZE]; data/dmucs-0.6.1/COSMIC/Sprtskt.c:34: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 buf2[BUFSIZE]; data/dmucs-0.6.1/COSMIC/Sread.c:50: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 *) buf)[0]= '\0'; data/dmucs-0.6.1/COSMIC/Srmsrvr.c:45: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 localhost[BUFSIZE] = ""; data/dmucs-0.6.1/COSMIC/Sscanf.c:48: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 buf[PM_BIGBUF]; data/dmucs-0.6.1/COSMIC/Stest.c:41: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 buf[PM_BIGBUF]; data/dmucs-0.6.1/COSMIC/Stimeoutwait.c:44: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 buf[PM_BIGBUF]; data/dmucs-0.6.1/COSMIC/Svprintf.c:44: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 buf[PM_BIGBUF]; data/dmucs-0.6.1/COSMIC/Swait.c:35: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 buf[PM_BIGBUF]; data/dmucs-0.6.1/COSMIC/cprt.c:14: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 buf1[10]; data/dmucs-0.6.1/COSMIC/cprt.c:15: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 buf2[10]; data/dmucs-0.6.1/COSMIC/cprt.c:16: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 buf3[10]; data/dmucs-0.6.1/COSMIC/cprt.c:17: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 buf4[10]; data/dmucs-0.6.1/COSMIC/cprt.c:18: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 buf5[10]; data/dmucs-0.6.1/COSMIC/cprt.c:23:20: [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. if(ic < 32) sprintf(buf,"^%c",(char) (ic + 64)); data/dmucs-0.6.1/COSMIC/cprt.c:24:20: [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. else if(ic == 127) sprintf(buf,"^<DEL>"); data/dmucs-0.6.1/COSMIC/cprt.c:25:20: [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. else if(ic >= 128) sprintf(buf,"^<%3d>",ic); data/dmucs-0.6.1/COSMIC/cprt.c:26:20: [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. else sprintf(buf,"%c",c); data/dmucs-0.6.1/COSMIC/fopenv.c:44:5: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp= fopen(filename,ctrl); data/dmucs-0.6.1/COSMIC/fopenv.c:78:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp= fopen(buf,ctrl); data/dmucs-0.6.1/COSMIC/rdcolor.c:139: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 color[LINESIZE]; data/dmucs-0.6.1/COSMIC/rdcolor.c:140: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 line[LINESIZE]; data/dmucs-0.6.1/COSMIC/rdcolor.c:141: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 newdef[LINESIZE+LINESIZE]; data/dmucs-0.6.1/COSMIC/sprt.c:19: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 buf1[BUFSIZE]; data/dmucs-0.6.1/COSMIC/sprt.c:20: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 buf2[BUFSIZE]; data/dmucs-0.6.1/COSMIC/sprt.c:21: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 buf3[BUFSIZE]; data/dmucs-0.6.1/COSMIC/sprt.c:22: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 buf4[BUFSIZE]; data/dmucs-0.6.1/COSMIC/sprt.c:38:21: [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. if(ic < 31) sprintf(b,"^%c",(char) (ic + 64)); data/dmucs-0.6.1/COSMIC/sprt.c:39:21: [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. else if(ic >= 128) sprintf(b,"~%3d",ic); data/dmucs-0.6.1/COSMIC/strnxtfmt.c:29: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 locbuf[BUFSIZE]; data/dmucs-0.6.1/dmucs_hosts_file.cc:93: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 machine[256]; data/dmucs-0.6.1/dmucs_msg.cc:42: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 dpropstr[DPROP_MAX_STRLEN + 1]; data/dmucs-0.6.1/dmucs_msg.cc:53: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 cliIpStr[64]; data/dmucs-0.6.1/dmucs_msg.cc:66: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 machname[64]; data/dmucs-0.6.1/dmucs_msg.cc:88: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 machname[64]; data/dmucs-0.6.1/dmucs_msg.cc:89: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 state[10]; data/dmucs-0.6.1/dmucs_pkt.cc:37: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 dpropstr[DPROP_MAX_STRLEN + 1]; data/dmucs-0.6.1/dmucs_pkt.cc:60: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 machname[64]; data/dmucs-0.6.1/dmucs_pkt.cc:82: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 machname[64]; data/dmucs-0.6.1/dmucs_pkt.cc:83: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 state[10]; data/dmucs-0.6.1/dmucs_resolve.cc:43:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[128]; data/dmucs-0.6.1/gethost.cc:110: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). serverPortNum = atoi(argv[nextarg]); data/dmucs-0.6.1/gethost.cc:136: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 remCompHostName[256]; data/dmucs-0.6.1/gethost.cc:140:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(remCompHostName,"0.0.0.0"); data/dmucs-0.6.1/gethost.cc:143: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 hostname[256]; data/dmucs-0.6.1/loadavg.cc:89: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). serverPortNum = atoi(argv[i]); data/dmucs-0.6.1/loadavg.cc:107:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostname[256]; data/dmucs-0.6.1/loadavg.cc: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 buf[1024]; data/dmucs-0.6.1/loadavg.cc:142: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 ldStr[32]; data/dmucs-0.6.1/loadavg.cc:144:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(ldStr," 0.0 0.0 0.0"); data/dmucs-0.6.1/loadavg.cc:169:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(ldStr, " %2.2f %2.2f %2.2f", ldAvg1, ldAvg5, ldAvg10); data/dmucs-0.6.1/main.cc:117: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). serverPortNum = atoi(argv[i]); data/dmucs-0.6.1/main.cc:142: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 svrstr[16]; data/dmucs-0.6.1/main.cc:143: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(svrstr, "s%d", serverPortNum); data/dmucs-0.6.1/main.cc:264:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/dmucs-0.6.1/main.cc:283:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[BUFSIZE]; data/dmucs-0.6.1/monitor.cc:49:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char resultStr[RESULT_MAX_SIZE]; data/dmucs-0.6.1/monitor.cc:87: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). serverPortNum = atoi(argv[i]); data/dmucs-0.6.1/monitor.cc:99: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 hostname[256]; data/dmucs-0.6.1/monitor.cc:265: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 ipName[32]; data/dmucs-0.6.1/remhost.cc:82: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). serverPortNum = atoi(argv[nextarg]); data/dmucs-0.6.1/remhost.cc:110: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 hostname[256]; data/dmucs-0.6.1/COSMIC/EXE/Spm.c:599:38: [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). p->sktname= (char *) calloc((size_t) strlen(sktname)+1,sizeof(char)); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:608: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). p->sharehost= (char *) calloc((size_t) strlen(sharehost)+1,sizeof(char)); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:784: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). cw->sktname = calloc(strlen(sktname)+1,sizeof(char)); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1139:1: [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 (command_string," "); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1141:1: [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 (command_string,"("); data/dmucs-0.6.1/COSMIC/EXE/Spm.c:1143:1: [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 (command_string,")"); data/dmucs-0.6.1/COSMIC/EXE/sktdbg.c:708: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). buflen= Swrite(skt,buf,strlen(buf)+1); data/dmucs-0.6.1/COSMIC/Smkskt.c:43: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). skt->hostname= (char *) calloc((size_t) strlen(hostname)+1,sizeof(char)); data/dmucs-0.6.1/COSMIC/Smkskt.c:49: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). skt->sktname= (char *) calloc((size_t) strlen(sktname)+1,sizeof(char)); data/dmucs-0.6.1/COSMIC/Sprintf.c:54:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Swrite(skt,buf,strlen(buf)+1); /* send the null byte, too */ data/dmucs-0.6.1/COSMIC/Sputs.c:35:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Swrite(skt,buf,strlen(buf)+1); data/dmucs-0.6.1/COSMIC/Svprintf.c:57:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Swrite(skt,buf,strlen(buf)+1); /* send the null byte, too */ data/dmucs-0.6.1/COSMIC/fopenv.c:57: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). buf = (void *) calloc((size_t) strlen(env) + strlen(filename) + 2,sizeof(char)); data/dmucs-0.6.1/COSMIC/fopenv.c:57:48: [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 = (void *) calloc((size_t) strlen(env) + strlen(filename) + 2,sizeof(char)); data/dmucs-0.6.1/COSMIC/rdcolor.c:226: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). cmd[strlen(cmd) - 1]= '\0'; /* remove newline character */ data/dmucs-0.6.1/COSMIC/rdcolor.c:273:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *colors[icolor].color= (void *) calloc((size_t) (strlen(newdef)+1),sizeof(char)); data/dmucs-0.6.1/COSMIC/sprt.c:36: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). if(s) for(b= buf; *s && b < bend; ++s, b+= strlen(b)) { data/dmucs-0.6.1/COSMIC/sprt.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). b+= strlen(b); data/dmucs-0.6.1/dmucs.h:30:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define strequ(x, y) (strncmp(x, y, strlen(x)) == 0) data/dmucs-0.6.1/dmucs_resolve.cc:64:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, res->h_name, sizeof(buffer)); data/dmucs-0.6.1/gethost.cc:182: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). if (strncmp(remCompHostName, "0.0.0.0", strlen("0.0.0.0")) == 0) { data/dmucs-0.6.1/main.cc:270: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). buf[strlen(buf) - 1] = '\0'; ANALYSIS SUMMARY: Hits = 191 Lines analyzed = 12006 in approximately 0.37 seconds (32387 lines/second) Physical Source Lines of Code (SLOC) = 7526 Hits@level = [0] 188 [1] 22 [2] 108 [3] 14 [4] 47 [5] 0 Hits@level+ = [0+] 379 [1+] 191 [2+] 169 [3+] 61 [4+] 47 [5+] 0 Hits/KSLOC@level+ = [0+] 50.3588 [1+] 25.3787 [2+] 22.4555 [3+] 8.10524 [4+] 6.24502 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.