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/cmucl-21d/src/benchmarks/gabriel/puzzle.c Examining data/cmucl-21d/src/benchmarks/richards/cbase.h Examining data/cmucl-21d/src/benchmarks/richards/rbase.h Examining data/cmucl-21d/src/benchmarks/richards/richards.c Examining data/cmucl-21d/src/benchmarks/richards/richards.h Examining data/cmucl-21d/src/benchmarks/richards/tasks.c Examining data/cmucl-21d/src/benchmarks/richards/tasks.h Examining data/cmucl-21d/src/benchmarks/richards/types.c Examining data/cmucl-21d/src/benchmarks/richards/types.h Examining data/cmucl-21d/src/clx/excldep.c Examining data/cmucl-21d/src/clx/socket.c Examining data/cmucl-21d/src/lisp/Darwin-os.c Examining data/cmucl-21d/src/lisp/Darwin-os.h Examining data/cmucl-21d/src/lisp/FreeBSD-os.c Examining data/cmucl-21d/src/lisp/FreeBSD-os.h Examining data/cmucl-21d/src/lisp/Linux-os.c Examining data/cmucl-21d/src/lisp/Linux-os.h Examining data/cmucl-21d/src/lisp/NetBSD-os.c Examining data/cmucl-21d/src/lisp/NetBSD-os.h Examining data/cmucl-21d/src/lisp/OpenBSD-os.c Examining data/cmucl-21d/src/lisp/OpenBSD-os.h Examining data/cmucl-21d/src/lisp/alloc.c Examining data/cmucl-21d/src/lisp/alloc.h Examining data/cmucl-21d/src/lisp/alpha-arch.c Examining data/cmucl-21d/src/lisp/alpha-lispregs.h Examining data/cmucl-21d/src/lisp/alpha-validate.h Examining data/cmucl-21d/src/lisp/amd64-arch.c Examining data/cmucl-21d/src/lisp/amd64-lispregs.h Examining data/cmucl-21d/src/lisp/arch.h Examining data/cmucl-21d/src/lisp/backtrace.c Examining data/cmucl-21d/src/lisp/breakpoint.c Examining data/cmucl-21d/src/lisp/breakpoint.h Examining data/cmucl-21d/src/lisp/cgc.c Examining data/cmucl-21d/src/lisp/cgc.h Examining data/cmucl-21d/src/lisp/core.h Examining data/cmucl-21d/src/lisp/coreparse.c Examining data/cmucl-21d/src/lisp/dynbind.c Examining data/cmucl-21d/src/lisp/dynbind.h Examining data/cmucl-21d/src/lisp/e_acos.c Examining data/cmucl-21d/src/lisp/e_acosh.c Examining data/cmucl-21d/src/lisp/e_asin.c Examining data/cmucl-21d/src/lisp/e_atan2.c Examining data/cmucl-21d/src/lisp/e_atanh.c Examining data/cmucl-21d/src/lisp/e_cosh.c Examining data/cmucl-21d/src/lisp/e_exp.c Examining data/cmucl-21d/src/lisp/e_log.c Examining data/cmucl-21d/src/lisp/e_log10.c Examining data/cmucl-21d/src/lisp/e_pow.c Examining data/cmucl-21d/src/lisp/e_rem_pio2.c Examining data/cmucl-21d/src/lisp/e_sinh.c Examining data/cmucl-21d/src/lisp/elf.c Examining data/cmucl-21d/src/lisp/elf.h Examining data/cmucl-21d/src/lisp/exec-final.c Examining data/cmucl-21d/src/lisp/exec-init.c Examining data/cmucl-21d/src/lisp/fdlibm.h Examining data/cmucl-21d/src/lisp/gc.c Examining data/cmucl-21d/src/lisp/gc.h Examining data/cmucl-21d/src/lisp/gencgc.c Examining data/cmucl-21d/src/lisp/gencgc.h Examining data/cmucl-21d/src/lisp/globals.c Examining data/cmucl-21d/src/lisp/globals.h Examining data/cmucl-21d/src/lisp/hppa-arch.c Examining data/cmucl-21d/src/lisp/hppa-lispregs.h Examining data/cmucl-21d/src/lisp/hppa-validate.h Examining data/cmucl-21d/src/lisp/hpux-os.c Examining data/cmucl-21d/src/lisp/hpux-os.h Examining data/cmucl-21d/src/lisp/interr.c Examining data/cmucl-21d/src/lisp/interr.h Examining data/cmucl-21d/src/lisp/interrupt.c Examining data/cmucl-21d/src/lisp/interrupt.h Examining data/cmucl-21d/src/lisp/irix-asm-munge.c Examining data/cmucl-21d/src/lisp/irix-os.c Examining data/cmucl-21d/src/lisp/irix-os.h Examining data/cmucl-21d/src/lisp/k_cos.c Examining data/cmucl-21d/src/lisp/k_rem_pio2.c Examining data/cmucl-21d/src/lisp/k_sin.c Examining data/cmucl-21d/src/lisp/k_tan.c Examining data/cmucl-21d/src/lisp/lisp.h Examining data/cmucl-21d/src/lisp/lispregs.h Examining data/cmucl-21d/src/lisp/log2.c Examining data/cmucl-21d/src/lisp/mach-o.c Examining data/cmucl-21d/src/lisp/mach-os.c Examining data/cmucl-21d/src/lisp/mach-os.h Examining data/cmucl-21d/src/lisp/mips-arch.c Examining data/cmucl-21d/src/lisp/mips-lispregs.h Examining data/cmucl-21d/src/lisp/mips-validate.h Examining data/cmucl-21d/src/lisp/monitor.c Examining data/cmucl-21d/src/lisp/monitor.h Examining data/cmucl-21d/src/lisp/os-common.c Examining data/cmucl-21d/src/lisp/os.h Examining data/cmucl-21d/src/lisp/osf1-os.c Examining data/cmucl-21d/src/lisp/osf1-os.h Examining data/cmucl-21d/src/lisp/parse.c Examining data/cmucl-21d/src/lisp/parse.h Examining data/cmucl-21d/src/lisp/ppc-arch.c Examining data/cmucl-21d/src/lisp/ppc-arch.h Examining data/cmucl-21d/src/lisp/ppc-lispregs.h Examining data/cmucl-21d/src/lisp/ppc-validate.h Examining data/cmucl-21d/src/lisp/print.c Examining data/cmucl-21d/src/lisp/print.h Examining data/cmucl-21d/src/lisp/purify.c Examining data/cmucl-21d/src/lisp/purify.h Examining data/cmucl-21d/src/lisp/regnames.c Examining data/cmucl-21d/src/lisp/runprog.c Examining data/cmucl-21d/src/lisp/s_asinh.c Examining data/cmucl-21d/src/lisp/s_atan.c Examining data/cmucl-21d/src/lisp/s_cos.c Examining data/cmucl-21d/src/lisp/s_expm1.c Examining data/cmucl-21d/src/lisp/s_log1p.c Examining data/cmucl-21d/src/lisp/s_scalbn.c Examining data/cmucl-21d/src/lisp/s_sin.c Examining data/cmucl-21d/src/lisp/s_tan.c Examining data/cmucl-21d/src/lisp/s_tanh.c Examining data/cmucl-21d/src/lisp/save.c Examining data/cmucl-21d/src/lisp/save.h Examining data/cmucl-21d/src/lisp/search.c Examining data/cmucl-21d/src/lisp/search.h Examining data/cmucl-21d/src/lisp/setexception.c Examining data/cmucl-21d/src/lisp/sincos.c Examining data/cmucl-21d/src/lisp/solaris-os.c Examining data/cmucl-21d/src/lisp/sparc-arch.c Examining data/cmucl-21d/src/lisp/sparc-arch.h Examining data/cmucl-21d/src/lisp/sparc-lispregs.h Examining data/cmucl-21d/src/lisp/sparc-validate.h Examining data/cmucl-21d/src/lisp/sunos-os.c Examining data/cmucl-21d/src/lisp/sunos-os.h Examining data/cmucl-21d/src/lisp/time.c Examining data/cmucl-21d/src/lisp/undefineds.c Examining data/cmucl-21d/src/lisp/undefineds.h Examining data/cmucl-21d/src/lisp/validate.c Examining data/cmucl-21d/src/lisp/validate.h Examining data/cmucl-21d/src/lisp/vars.c Examining data/cmucl-21d/src/lisp/vars.h Examining data/cmucl-21d/src/lisp/version.c Examining data/cmucl-21d/src/lisp/x86-arch.c Examining data/cmucl-21d/src/lisp/x86-arch.h Examining data/cmucl-21d/src/lisp/x86-lispregs.h Examining data/cmucl-21d/src/lisp/x86-validate-darwin.h Examining data/cmucl-21d/src/lisp/x86-validate-freebsd.h Examining data/cmucl-21d/src/lisp/x86-validate-linux.h Examining data/cmucl-21d/src/lisp/x86-validate-netbsd.h Examining data/cmucl-21d/src/lisp/x86-validate-openbsd.h Examining data/cmucl-21d/src/lisp/x86-validate-solaris.h Examining data/cmucl-21d/src/lisp/x86-validate.h Examining data/cmucl-21d/src/lisp/lisp.c Examining data/cmucl-21d/src/motif/server/callbacks.c Examining data/cmucl-21d/src/motif/server/datatrans.c Examining data/cmucl-21d/src/motif/server/datatrans.h Examining data/cmucl-21d/src/motif/server/events.c Examining data/cmucl-21d/src/motif/server/functions.h Examining data/cmucl-21d/src/motif/server/global.h Examining data/cmucl-21d/src/motif/server/list.c Examining data/cmucl-21d/src/motif/server/main.c Examining data/cmucl-21d/src/motif/server/message.c Examining data/cmucl-21d/src/motif/server/message.h Examining data/cmucl-21d/src/motif/server/motif.c Examining data/cmucl-21d/src/motif/server/oid.c Examining data/cmucl-21d/src/motif/server/oid.h Examining data/cmucl-21d/src/motif/server/packet.c Examining data/cmucl-21d/src/motif/server/packet.h Examining data/cmucl-21d/src/motif/server/requests.c Examining data/cmucl-21d/src/motif/server/requests.h Examining data/cmucl-21d/src/motif/server/resources.c Examining data/cmucl-21d/src/motif/server/server.c Examining data/cmucl-21d/src/motif/server/tables.c Examining data/cmucl-21d/src/motif/server/tables.h Examining data/cmucl-21d/src/motif/server/text.c Examining data/cmucl-21d/src/motif/server/timer-support.c Examining data/cmucl-21d/src/motif/server/translations.c Examining data/cmucl-21d/src/motif/server/types.h Examining data/cmucl-21d/src/motif/server/widgets.c Examining data/cmucl-21d/src/motif/server/xmstring.c Examining data/cmucl-21d/src/tools/hpux-startup.c FINAL RESULTS: data/cmucl-21d/src/lisp/Linux-os.c:129:29: [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. int i = readlink("/proc/self/exe", runtime, PATH_MAX); data/cmucl-21d/src/lisp/undefineds.h:26:7: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. F(chmod) data/cmucl-21d/src/lisp/undefineds.h:27:7: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. F(chown) data/cmucl-21d/src/lisp/undefineds.h:95:7: [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. F(readlink) data/cmucl-21d/src/tools/hpux-startup.c:106:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(name, 0700) < 0) { data/cmucl-21d/src/clx/socket.c:68:9: [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). (void) strcpy(unaddr.sun_path, X_UNIX_PATH); data/cmucl-21d/src/clx/socket.c:78:15: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(unaddr.sun_path, "%s%d", OLD_UNIX_PATH, display); data/cmucl-21d/src/lisp/Linux-os.c:503:5: [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(newsym, name); data/cmucl-21d/src/lisp/alloc.c:131:5: [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((char *) vec->data, str); data/cmucl-21d/src/lisp/cgc.c:43:30: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define dprintf(t,exp) if(t){printf exp ; fflush(stdout);} data/cmucl-21d/src/lisp/elf.c:353:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command, "%s/%s", strptr, LINKER_SCRIPT); data/cmucl-21d/src/lisp/elf.c:364:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command_line, "%s %s 0x%lx '%s' 0x%lx 0x%lx 0x%lx", command, data/cmucl-21d/src/lisp/elf.c:371:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command_line, "%s %s 0x%lx 0x%lx %s", command, C_COMPILER, data/cmucl-21d/src/lisp/elf.c:374:12: [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. ret = system(command_line); data/cmucl-21d/src/lisp/gencgc.c:945:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, msg, size); data/cmucl-21d/src/lisp/interr.c:43:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/cmucl-21d/src/lisp/interrupt.c:515:65: [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. #error interrupt_handle_space_overflow not implemented for this system data/cmucl-21d/src/lisp/lisp.c:159: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(cwd, argv0_dir); data/cmucl-21d/src/lisp/lisp.c:174:6: [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(cwd, argv0_dir); data/cmucl-21d/src/lisp/lisp.c:206: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(cwd + (p2 - p1 + 1), ptr); data/cmucl-21d/src/lisp/lisp.c:217:11: [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 (access(cwd, X_OK) == 0) { data/cmucl-21d/src/lisp/lisp.c:273: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(defpath, cwd); data/cmucl-21d/src/lisp/lisp.c:276:6: [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(defpath, *ptr); data/cmucl-21d/src/lisp/lisp.c:325: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(dst, default_core); data/cmucl-21d/src/lisp/lisp.c:332:6: [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 (access(buf, R_OK) == 0) { data/cmucl-21d/src/lisp/lisp.c:372: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(path, cwd); data/cmucl-21d/src/lisp/lisp.c:374:2: [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(path, corefile); data/cmucl-21d/src/lisp/lisp.c:386:5: [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(result, path); data/cmucl-21d/src/lisp/lisp.c:388:5: [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(result, lib); data/cmucl-21d/src/lisp/lisp.c:438: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. if (access(core, R_OK) != 0) { data/cmucl-21d/src/lisp/mach-o.c:327:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command, "%s/%s", strptr, LINKER_SCRIPT); data/cmucl-21d/src/lisp/mach-o.c:337:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(command_line, "%s %s 0x%lx '%s' 0x%lx 0x%lx 0x%lx", command, data/cmucl-21d/src/lisp/mach-o.c:342:12: [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. ret = system(command_line); data/cmucl-21d/src/lisp/os-common.c:166:5: [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(c_string, lisp_string); data/cmucl-21d/src/lisp/os-common.c:533:59: [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. #error os_control_stack_overflow not implemented for this system data/cmucl-21d/src/lisp/os.h:11:31: [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 DPRINTF(t,a) { if (t) fprintf a; } data/cmucl-21d/src/lisp/print.c:786:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "$%s=", var_name(var)); data/cmucl-21d/src/lisp/save.c:113:5: [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(sbuf, filename); data/cmucl-21d/src/lisp/save.c:261:5: [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(sbuf, filename); data/cmucl-21d/src/lisp/solaris-os.c:68:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "os_init: %s", arg); data/cmucl-21d/src/lisp/solaris-os.c:396: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(name, slavename); data/cmucl-21d/src/lisp/sunos-os.c:80:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "os_init: %s", arg); data/cmucl-21d/src/lisp/undefineds.h:12:7: [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. F(access) data/cmucl-21d/src/lisp/vars.c:131:5: [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(var->name, name); data/cmucl-21d/src/motif/server/datatrans.c:144:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf,"Unknown resource: %s",name); data/cmucl-21d/src/motif/server/main.c:117: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(unixAddress.sun_path, path); data/cmucl-21d/src/tools/hpux-startup.c:70:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "open(%s)", name); data/cmucl-21d/src/tools/hpux-startup.c:79:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "write(%s)", name); data/cmucl-21d/src/tools/hpux-startup.c:89:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "read(%s)", source); data/cmucl-21d/src/tools/hpux-startup.c:95:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "close(%s)", source); data/cmucl-21d/src/tools/hpux-startup.c:101:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "close(%s)", name); data/cmucl-21d/src/tools/hpux-startup.c:107:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "chmod(%s)", name); data/cmucl-21d/src/tools/hpux-startup.c:149:9: [4] (shell) execv: 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 (execv(file, argv) < 0) { data/cmucl-21d/src/tools/hpux-startup.c:151:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "execv(%s)", file); data/cmucl-21d/src/clx/socket.c:60: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. extern char *getenv(); data/cmucl-21d/src/lisp/lisp.c:185:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *path = getenv("PATH"); data/cmucl-21d/src/lisp/lisp.c:431: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("CMUCLCORE") == NULL) { data/cmucl-21d/src/lisp/lisp.c:434:20: [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. core = getenv("CMUCLCORE"); data/cmucl-21d/src/lisp/lisp.c:742: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. libvar = getenv("CMUCLLIB"); data/cmucl-21d/src/lisp/lisp.c:762:28: [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. } else if (getenv("CMUCLCORE") != NULL) { data/cmucl-21d/src/lisp/lisp.c:763:28: [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. core = getenv("CMUCLCORE"); data/cmucl-21d/src/lisp/solaris-os.c:154: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. flushit = getenv("CMUCL_NO_SPARC_IFLUSH") == 0; data/cmucl-21d/src/lisp/solaris-os.c:160: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. traceit = getenv("CMUCL_TRACE_SPARC_IFLUSH") != 0; data/cmucl-21d/src/lisp/sunos-os.c:46: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/cmucl-21d/src/lisp/sunos-os.c:92: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. char *empty_file = getenv("CMUCL_EMPTYFILE"); data/cmucl-21d/src/lisp/undefineds.h:28:7: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. F(chroot) data/cmucl-21d/src/lisp/undefineds.h:246:7: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. F(getwd) data/cmucl-21d/src/tools/hpux-startup.c:22: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. char *library = getenv("CMUCLLIB"); data/cmucl-21d/src/benchmarks/richards/types.h:16: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 data[4]; data/cmucl-21d/src/benchmarks/richards/types.h:20:15: [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. void SetData(char d[4]) {for(int i=0; i < 4; i++) data[i] = d[i];} data/cmucl-21d/src/clx/socket.c:41:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. void bcopy(); data/cmucl-21d/src/clx/socket.c:69:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf(&unaddr.sun_path[strlen(unaddr.sun_path)], "%d", display); data/cmucl-21d/src/clx/socket.c:108:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((char *)&inaddr.sin_addr, data/cmucl-21d/src/clx/socket.c:112:11: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) bcopy((char *)host_ptr->h_addr, data/cmucl-21d/src/lisp/Linux-os.c:81:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). major_version = atoi(p); data/cmucl-21d/src/lisp/Linux-os.c:92: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). minor_version = atoi(p + 1); data/cmucl-21d/src/lisp/Linux-os.c:94: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). patch_version = p ? atoi(p + 1) : 0; data/cmucl-21d/src/lisp/Linux-os.c:128:21: [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 runtime[PATH_MAX+1]; data/cmucl-21d/src/lisp/Linux-os.c:499: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 newsym[1024]; data/cmucl-21d/src/lisp/Linux-os.c:502:5: [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(newsym, "PVE_stub_"); data/cmucl-21d/src/lisp/alpha-arch.c:35: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(call_into_lisp_LRA_page, call_into_lisp_LRA, OS_VM_DEFAULT_PAGESIZE); data/cmucl-21d/src/lisp/backtrace.c:216:25: [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 c_string[1000]; data/cmucl-21d/src/lisp/backtrace.c:291: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 c_string[1000]; data/cmucl-21d/src/lisp/backtrace.c:308: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 c_string[1000]; data/cmucl-21d/src/lisp/cgc.c:108:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char region_offset[1]; data/cmucl-21d/src/lisp/cgc.c:1643: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 sbuf[128]; data/cmucl-21d/src/lisp/cgc.c:1653:3: [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(sbuf, "Static %x %d", ss1, ss2 - ss1); data/cmucl-21d/src/lisp/cgc.c:1909:8: [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). log = fopen("LOG.tmp", "w"); data/cmucl-21d/src/lisp/coreparse.c:101:14: [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 fd = open(file, O_RDONLY), count; data/cmucl-21d/src/lisp/elf.c:98: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 outfilename[FILENAME_MAX + 1]; data/cmucl-21d/src/lisp/elf.c:104: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). out = open(outfilename, O_WRONLY | O_CREAT | O_TRUNC, 0666); data/cmucl-21d/src/lisp/elf.c:256: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(buffer + 1, string_table_name, strlen(string_table_name) + 1); data/cmucl-21d/src/lisp/elf.c:257: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(buffer + 1 + strlen(string_table_name) + 1, data/cmucl-21d/src/lisp/elf.c:321: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 command[FILENAME_MAX + 1]; data/cmucl-21d/src/lisp/elf.c:322: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 command_line[FILENAME_MAX + FILENAME_MAX + 10]; data/cmucl-21d/src/lisp/elf.c:428: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 nambuf[10]; data/cmucl-21d/src/lisp/elf.c:438:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(exec_fd = open(exec_name, O_RDONLY))) { data/cmucl-21d/src/lisp/hpux-os.c:367: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/cmucl-21d/src/lisp/interrupt.c:183:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, NSIG / CHAR_BIT); data/cmucl-21d/src/lisp/interrupt.c:408: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 altstack[SIGNAL_STACK_SIZE]; data/cmucl-21d/src/lisp/irix-asm-munge.c:62:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(argv[1], O_RDWR); data/cmucl-21d/src/lisp/irix-os.c:37:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). zero_fd = open("/dev/zero", O_RDONLY); data/cmucl-21d/src/lisp/lisp.c:358: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 cwd[FILENAME_MAX]; data/cmucl-21d/src/lisp/lisp.c:559:36: [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). read_only_space_size = atoi(str) * 1024 * 1024; data/cmucl-21d/src/lisp/lisp.c:575:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). static_space_size = atoi(str) * 1024 * 1024; data/cmucl-21d/src/lisp/lisp.c:591:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). binding_stack_size = atoi(str) * 1024 * 1024; data/cmucl-21d/src/lisp/lisp.c:607:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). control_stack_size = atoi(str) * 1024 * 1024; data/cmucl-21d/src/lisp/lisp.c:625:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dynamic_space_size = atoi(str); data/cmucl-21d/src/lisp/lisp.c:650: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). val = atoi(str); data/cmucl-21d/src/lisp/mach-o.c:105: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 outfilename[FILENAME_MAX + 1]; data/cmucl-21d/src/lisp/mach-o.c:111: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). out = open(outfilename, O_WRONLY | O_CREAT | O_TRUNC, 0666); data/cmucl-21d/src/lisp/mach-o.c:295: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 command[FILENAME_MAX + 1]; data/cmucl-21d/src/lisp/mach-o.c:296: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 command_line[FILENAME_MAX + FILENAME_MAX + 10]; data/cmucl-21d/src/lisp/mach-o.c:397:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(exec_fd = open(exec_name, O_RDONLY))) { data/cmucl-21d/src/lisp/mach-os.c:87: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[256]; data/cmucl-21d/src/lisp/mach-os.c:89: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(buf, "Could not map_fd(%d, %d, 0x%08x, 0x%08x): ", data/cmucl-21d/src/lisp/monitor.c:319: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[10]; data/cmucl-21d/src/lisp/monitor.c:466:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/cmucl-21d/src/lisp/monitor.c:523: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(oldbuf, curbuf, sizeof(jmp_buf)); data/cmucl-21d/src/lisp/monitor.c:533: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(curbuf, oldbuf, sizeof(jmp_buf)); data/cmucl-21d/src/lisp/os-common.c:102: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((char *) new, (char *) addr, old_len); data/cmucl-21d/src/lisp/os-common.c:201: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 c_symbol_name[1000]; data/cmucl-21d/src/lisp/os-common.c:298: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 c_symbol_name[1000]; data/cmucl-21d/src/lisp/os-common.c:333: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 c_symbol_name[1000]; data/cmucl-21d/src/lisp/parse.c:294:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). regnum = atoi(s + 2); data/cmucl-21d/src/lisp/print.c:152: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[256]; data/cmucl-21d/src/lisp/print.c:215:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[10]; data/cmucl-21d/src/lisp/print.c:235:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buffer, "#\\"); data/cmucl-21d/src/lisp/print.c:237:7: [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(buffer, "m-"); data/cmucl-21d/src/lisp/print.c:241:7: [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(buffer, "c-"); data/cmucl-21d/src/lisp/print.c:357: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[32]; data/cmucl-21d/src/lisp/print.c:361: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(buffer, "slot %d: ", i); data/cmucl-21d/src/lisp/print.c:502:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[16]; data/cmucl-21d/src/lisp/print.c:627:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "%d: ", index++); data/cmucl-21d/src/lisp/print.c:637:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "%d: ", index++); data/cmucl-21d/src/lisp/print.c:765: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[256]; data/cmucl-21d/src/lisp/runprog.c:39:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/tty", O_RDWR, 0); data/cmucl-21d/src/lisp/runprog.c:46:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(pty_name, O_RDWR, 0); data/cmucl-21d/src/lisp/save.c:111: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 sbuf[128]; data/cmucl-21d/src/lisp/save.c:132:12: [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(filename, "w"); data/cmucl-21d/src/lisp/save.c:259:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sbuf[128]; data/cmucl-21d/src/lisp/solaris-os.c:66: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[500]; data/cmucl-21d/src/lisp/solaris-os.c:80:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). zero_fd = open(ZEROFILE, O_RDONLY); data/cmucl-21d/src/lisp/solaris-os.c:173: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 msg[1000]; data/cmucl-21d/src/lisp/solaris-os.c:372:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((masterfd = open("/dev/ptmx", O_RDWR)) == -1) data/cmucl-21d/src/lisp/solaris-os.c:386:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((slavefd = open(slavename, O_RDWR | O_NOCTTY)) == -1) { data/cmucl-21d/src/lisp/sunos-os.c:78: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[500]; data/cmucl-21d/src/lisp/sunos-os.c:97:16: [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). empty_fd = open(empty_file, O_RDONLY | O_CREAT); data/cmucl-21d/src/lisp/sunos-os.c:102:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). zero_fd = open(ZEROFILE, O_RDONLY); data/cmucl-21d/src/lisp/undefineds.h:86:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). F(open) data/cmucl-21d/src/lisp/undefineds.h:184:7: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. F(vfork) data/cmucl-21d/src/lisp/vars.c:116: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[256]; data/cmucl-21d/src/lisp/vars.c:127: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(buffer, "%d", tempcntr++); data/cmucl-21d/src/lisp/x86-arch.c:50:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((device = open(devname, O_RDONLY)) == -1) { data/cmucl-21d/src/motif/server/datatrans.c:142: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[128]; data/cmucl-21d/src/motif/server/main.c:58: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 socket_path[30]; data/cmucl-21d/src/motif/server/main.c:225: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(socket_path,"/tmp/.motif_socket"); data/cmucl-21d/src/motif/server/main.c:229: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(socket_path,"/tmp/.motif_socket-u%d",getuid()); data/cmucl-21d/src/motif/server/main.c:233: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(socket_path,"/tmp/.motif_socket-p%d",getpid()); data/cmucl-21d/src/motif/server/packet.c:45: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[2]; data/cmucl-21d/src/motif/server/packet.c:59: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[4]; data/cmucl-21d/src/motif/server/tables.c:217:27: [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. result = binary_search((char *)resources, data/cmucl-21d/src/motif/server/tables.c:222:29: [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. result = binary_search((char *)constraints, data/cmucl-21d/src/motif/server/tables.c:236:31: [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. result = binary_search((char *)constraints, data/cmucl-21d/src/tools/hpux-startup.c:24: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 buffer[1024]; data/cmucl-21d/src/tools/hpux-startup.c:37: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(dst, "/cmucl.orig"); data/cmucl-21d/src/tools/hpux-startup.c:55: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 name[1024]; data/cmucl-21d/src/tools/hpux-startup.c:58: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[8*1024]; data/cmucl-21d/src/tools/hpux-startup.c:61:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infd = open(source, O_RDONLY, 0); data/cmucl-21d/src/tools/hpux-startup.c:67: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(name, "/tmp/lisp.copy.XXXXXX"); data/cmucl-21d/src/tools/hpux-startup.c:68:13: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). outfd = mkstemp(name); data/cmucl-21d/src/tools/hpux-startup.c:150: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[256]; data/cmucl-21d/src/benchmarks/richards/richards.c:155:9: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/cmucl-21d/src/clx/socket.c:69: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). (void) sprintf(&unaddr.sun_path[strlen(unaddr.sun_path)], "%d", display); data/cmucl-21d/src/clx/socket.c:71: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). addrlen = strlen(unaddr.sun_path) + 2; data/cmucl-21d/src/clx/socket.c:79: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). addrlen = strlen(unaddr.sun_path) + 2; data/cmucl-21d/src/lisp/alloc.c:126:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(str); data/cmucl-21d/src/lisp/alloc.c:139:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(str); data/cmucl-21d/src/lisp/coreparse.c:116:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(fd, header, CORE_PAGESIZE); data/cmucl-21d/src/lisp/elf.c:72:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int res = read(d, buf, nbytes); data/cmucl-21d/src/lisp/elf.c:197: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). sh.sh_name = strlen(string_table_name) + 2; data/cmucl-21d/src/lisp/elf.c:207: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(string_table_name) + 1) + (strlen(object_name) + 1); data/cmucl-21d/src/lisp/elf.c:207: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). (strlen(string_table_name) + 1) + (strlen(object_name) + 1); data/cmucl-21d/src/lisp/elf.c:232: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). sh.sh_size = strlen(string_table_name) + strlen(object_name) + 3; data/cmucl-21d/src/lisp/elf.c:232:47: [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). sh.sh_size = strlen(string_table_name) + strlen(object_name) + 3; data/cmucl-21d/src/lisp/elf.c:245:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *buffer = malloc(1 + strlen(string_table_name) + 1 + data/cmucl-21d/src/lisp/elf.c:246: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). strlen(object_name) + 1); data/cmucl-21d/src/lisp/elf.c:256: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). memcpy(buffer + 1, string_table_name, strlen(string_table_name) + 1); data/cmucl-21d/src/lisp/elf.c:257: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). memcpy(buffer + 1 + strlen(string_table_name) + 1, data/cmucl-21d/src/lisp/elf.c:259: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). strlen(object_name) + 1); data/cmucl-21d/src/lisp/elf.c:261: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). 1 + strlen(string_table_name) + 1 + strlen(object_name) + 1, data/cmucl-21d/src/lisp/elf.c:261: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). 1 + strlen(string_table_name) + 1 + strlen(object_name) + 1, data/cmucl-21d/src/lisp/interr.c:249:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ++read; data/cmucl-21d/src/lisp/interr.c:257:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *consumed = read; data/cmucl-21d/src/lisp/lisp.c:158: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). cwd = malloc(strlen(argv0_dir) + 2); data/cmucl-21d/src/lisp/lisp.c:160:2: [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(cwd, "/"); data/cmucl-21d/src/lisp/lisp.c:170: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). cwd = malloc(FILENAME_MAX + strlen(argv0_dir) + 100); data/cmucl-21d/src/lisp/lisp.c:172:2: [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(cwd, "/"); data/cmucl-21d/src/lisp/lisp.c:175:6: [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(cwd, "/"); data/cmucl-21d/src/lisp/lisp.c:193: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). cwd = malloc(FILENAME_MAX + strlen(argv0arg) + 100); data/cmucl-21d/src/lisp/lisp.c:202: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). p2 = p1 + strlen(p1); data/cmucl-21d/src/lisp/lisp.c:203:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cwd, p1, p2 - p1); data/cmucl-21d/src/lisp/lisp.c:255: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). cwd_len = strlen(cwd); data/cmucl-21d/src/lisp/lisp.c:261: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). total_len += strlen(*ptr) + cwd_len + 2; data/cmucl-21d/src/lisp/lisp.c:279: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(defpath, ":"); data/cmucl-21d/src/lisp/lisp.c:285: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(defpath) > total_len) { data/cmucl-21d/src/lisp/lisp.c:313: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). buf = malloc(strlen(lib) + strlen(default_core) + 2); data/cmucl-21d/src/lisp/lisp.c:313:32: [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(lib) + strlen(default_core) + 2); data/cmucl-21d/src/lisp/lisp.c:371:31: [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). path = malloc(FILENAME_MAX + strlen(corefile) + 2); data/cmucl-21d/src/lisp/lisp.c:373:2: [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(path, "/"); data/cmucl-21d/src/lisp/lisp.c:385: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). result = malloc(strlen(path) + strlen(lib) + 2); data/cmucl-21d/src/lisp/lisp.c:385:36: [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). result = malloc(strlen(path) + strlen(lib) + 2); data/cmucl-21d/src/lisp/lisp.c:387:5: [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(result, ":"); data/cmucl-21d/src/lisp/mach-o.c:76:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int res = read(d, buf, nbytes); data/cmucl-21d/src/lisp/mach-o.c:176:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lc.segname, name, sizeof(lc.segname)); data/cmucl-21d/src/lisp/mach-o.c:214:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sc.sectname, object_name, sizeof(sc.sectname)); data/cmucl-21d/src/lisp/mach-o.c:215:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sc.segname, object_name, sizeof(sc.segname)); data/cmucl-21d/src/lisp/mach-os.c:94:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, addr, len); data/cmucl-21d/src/lisp/monitor.c:500:42: [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). } else if (strncmp(token, cmd->cmd, strlen(token)) == 0) { data/cmucl-21d/src/lisp/undefineds.h:94:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). F(read) data/cmucl-21d/src/lisp/undefineds.h:173:7: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). F(umask) data/cmucl-21d/src/lisp/vars.c:130: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). var->name = (char *) malloc(strlen(name) + 1); data/cmucl-21d/src/motif/server/datatrans.c:31:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(packet->fill,string,count); data/cmucl-21d/src/motif/server/datatrans.c:74: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). really_write_string(message,string,strlen(string)+1); data/cmucl-21d/src/motif/server/main.c:119:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(path)+2) < 0 ) { data/cmucl-21d/src/motif/server/packet.c:155:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result = read(socket, packet->fill, HEADER_LENGTH-bytes_read); data/cmucl-21d/src/motif/server/packet.c:177:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result = read(socket, packet->fill, target); data/cmucl-21d/src/motif/server/server.c:111:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result = read(socket,&byte,2); data/cmucl-21d/src/motif/server/server.c:114:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). result = read(socket, ((char *) &byte)+1,1); data/cmucl-21d/src/tools/hpux-startup.c:75:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((incount = read(infd, buffer, sizeof(buffer))) > 0) { ANALYSIS SUMMARY: Hits = 230 Lines analyzed = 44555 in approximately 1.48 seconds (30068 lines/second) Physical Source Lines of Code (SLOC) = 30673 Hits@level = [0] 750 [1] 58 [2] 104 [3] 14 [4] 49 [5] 5 Hits@level+ = [0+] 980 [1+] 230 [2+] 172 [3+] 68 [4+] 54 [5+] 5 Hits/KSLOC@level+ = [0+] 31.9499 [1+] 7.49845 [2+] 5.60754 [3+] 2.21693 [4+] 1.76051 [5+] 0.16301 Symlinks skipped = 1 (--allowlink overrides but see doc for security issue) 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.