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/scheme9-2018.12.05/s9.c Examining data/scheme9-2018.12.05/ext/curses/curses.c Examining data/scheme9-2018.12.05/ext/sys-unix/unix.c Examining data/scheme9-2018.12.05/ext/csv/csv.c Examining data/scheme9-2018.12.05/util/rpp.c Examining data/scheme9-2018.12.05/s9core.c Examining data/scheme9-2018.12.05/s9import.h Examining data/scheme9-2018.12.05/s9ext.h Examining data/scheme9-2018.12.05/attic/sys-plan9/plan9.c Examining data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.h Examining data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c Examining data/scheme9-2018.12.05/s9core.h FINAL RESULTS: data/scheme9-2018.12.05/ext/sys-unix/unix.c:163:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. r = chmod(string(parg(1)), integer_value("sys:chmod", parg(2))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:171:6: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. r = chown(string(parg(1)), data/scheme9-2018.12.05/ext/sys-unix/unix.c:601:6: [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. k = readlink(string(parg(1)), buf, MAXPATHLEN); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:556: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(buf, who); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:560: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(buf+k+2, Last_errstr); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:725: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(buf, buf1); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:784: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(string(buf2), string(buf)); data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c:41:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: expected positive value, got", src); data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c:49:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: integer too big", src); data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c:76:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: uint32 too big", src); data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c:89:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: int32 too big", src); data/scheme9-2018.12.05/ext/sys-unix/unix.c:114: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(buf, who); data/scheme9-2018.12.05/ext/sys-unix/unix.c:138: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. return access(string(parg(1)), data/scheme9-2018.12.05/ext/sys-unix/unix.c:238:2: [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. execv(string(parg(1)), argv); data/scheme9-2018.12.05/ext/sys-unix/unix.c:439:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "%s.lock", s); data/scheme9-2018.12.05/ext/sys-unix/unix.c:560: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(string(buf2), string(buf)); data/scheme9-2018.12.05/ext/sys-unix/unix.c:834:6: [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. r = system(string(parg(1))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:875:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "%s.lock", s); data/scheme9-2018.12.05/s9.c:348:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b, "%s: expected %s, got", who, what); data/scheme9-2018.12.05/s9.c:553: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(b, p); data/scheme9-2018.12.05/s9.c:925:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b, "%s:%s", s, s); data/scheme9-2018.12.05/s9.c:954:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(S9magic, "S9:%s:%c", RELEASE_DATE, PATCHLEVEL+'0'); data/scheme9-2018.12.05/s9.c:1211:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pbuf, "%s/%s", imgdir, image); data/scheme9-2018.12.05/s9.c:1343:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "unknown character: #\\%s", buf); data/scheme9-2018.12.05/s9.c:1404:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s, code", msg); data/scheme9-2018.12.05/s9.c:1546:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "invalid digit in %s number", pre); data/scheme9-2018.12.05/s9.c:1559:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "digits expected after %s", pre); data/scheme9-2018.12.05/s9.c:1901:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "#<%s-port %d>", data/scheme9-2018.12.05/s9.c:1999:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s: wrong number of arguments", who); data/scheme9-2018.12.05/s9.c:3530:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: expected integer, got", who); data/scheme9-2018.12.05/s9.c:3535:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: integer argument too big", who); data/scheme9-2018.12.05/s9.c:3549:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: expected integer, got", who); data/scheme9-2018.12.05/s9.c:3589:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "c%sr: unsuitable type for operation", data/scheme9-2018.12.05/s9.c:3646:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s: improper list", who); data/scheme9-2018.12.05/s9.c:3650:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s: bad element in alist", who); data/scheme9-2018.12.05/s9.c:3667:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s: improper list", who); data/scheme9-2018.12.05/s9.c:3687:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s: improper list", who); data/scheme9-2018.12.05/s9.c:3698:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s: index out of range", who); data/scheme9-2018.12.05/s9.c:4275: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(Srcfile, string(unsave(1))); data/scheme9-2018.12.05/s9.c:4287: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, string(x)); data/scheme9-2018.12.05/s9.c:4906:22: [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. Acc = make_integer(system(string(Acc)) >> 8); data/scheme9-2018.12.05/s9core.c:852: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(symbol_name(n), s); data/scheme9-2018.12.05/s9core.c:1115: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(b, p); data/scheme9-2018.12.05/s9core.c:1140: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. int system(char *cmd) { data/scheme9-2018.12.05/s9core.c:2723:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, "%s: expected %s in argument #%d", p->name, what, n); data/scheme9-2018.12.05/s9core.c:2730:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s: too %s arguments", name, what); data/scheme9-2018.12.05/s9core.h:455: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. int system(char *s); data/scheme9-2018.12.05/util/rpp.c:33: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, a1, a2); data/scheme9-2018.12.05/util/rpp.c:47:14: [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). case BOLD: strcat(s, eBold); break; data/scheme9-2018.12.05/util/rpp.c:48:16: [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). case ITALIC: strcat(s, eItalics); break; data/scheme9-2018.12.05/util/rpp.c:53:14: [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). case BOLD: strcat(s, sBold); break; data/scheme9-2018.12.05/util/rpp.c:54:16: [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). case ITALIC: strcat(s, sItalics); break; data/scheme9-2018.12.05/util/rpp.c:160: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(new, s); data/scheme9-2018.12.05/util/rpp.c:248:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%s", TMAC, o_prof); data/scheme9-2018.12.05/util/rpp.c:250:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%s", PREFIX, o_prof); data/scheme9-2018.12.05/ext/sys-unix/unix.c:289: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. s = getenv(string(parg(1))); data/scheme9-2018.12.05/s9.c:870: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. s = getenv("S9FES_LIBRARY_PATH"); data/scheme9-2018.12.05/s9.c:1203: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. imgdir = getenv("S9FES_IMAGE_DIR"); data/scheme9-2018.12.05/s9.c:4313: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. p = getenv(s); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:80: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 Last_errstr[ERRMAX]; data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:176:7: [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 b[30]; data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:226:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[300]; // XXX arbitrary? data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:548: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[ERRMAX+20]; data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:557: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(&buf[k], ": "); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:576: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[ERRMAX+40]; data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:633: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(string(n), (char *) buf, len); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:723: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[ERRMAX]; data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:835: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(string(car(x)), integer_value("sys:open", cadr(x))); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:881:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(string(buf2), string(buf), r); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:916:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(string(buf2), string(buf), r); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:971: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(string(r), edir, len); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:981: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[ERRMAX+40]; data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:990: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). n = cons(make_long_integer(atoi(fld[3])), n); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:991: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). n = cons(make_long_integer(atoi(fld[2])), n); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:992: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). n = cons(make_long_integer(atoi(fld[1])), n); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:993: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). n = cons(make_long_integer(atoi(fld[0])), n); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:999: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[ERRMAX+40]; data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:1006: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). return make_long_integer(atoi(fld[0])); data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c:37:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[128]; data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[128]; data/scheme9-2018.12.05/attic/sys-plan9/s9-ffi.c:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[128]; data/scheme9-2018.12.05/ext/csv/csv.c:20:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(string(m), string(car(n)), k); data/scheme9-2018.12.05/ext/csv/csv.c:59: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(string(m), string(car(n)), i+1); data/scheme9-2018.12.05/ext/csv/csv.c:91:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(string(m), string(car(n)), i+1); data/scheme9-2018.12.05/ext/csv/csv.c:99:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, b[3]; data/scheme9-2018.12.05/ext/sys-unix/unix.c:105: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/scheme9-2018.12.05/ext/sys-unix/unix.c:115: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(&buf[k], ": "); data/scheme9-2018.12.05/ext/sys-unix/unix.c:121:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, ", arguments"); data/scheme9-2018.12.05/ext/sys-unix/unix.c:187: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(string(parg(1)), O_CREAT|O_TRUNC|O_WRONLY, data/scheme9-2018.12.05/ext/sys-unix/unix.c:434: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 p[256], *s; data/scheme9-2018.12.05/ext/sys-unix/unix.c:529: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(string(parg(1)), integer_value("sys:open", parg(2))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:598: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[MAXPATHLEN+1]; data/scheme9-2018.12.05/ext/sys-unix/unix.c:870: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 p[256], *s; data/scheme9-2018.12.05/ext/sys-unix/unix.c:967: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 ip[128]; data/scheme9-2018.12.05/s9.c:114: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 Srcfile[TOKEN_LENGTH+1] = { 0 }; data/scheme9-2018.12.05/s9.c:122: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 S9magic[17]; data/scheme9-2018.12.05/s9.c:304: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[100]; data/scheme9-2018.12.05/s9.c:346: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 b[100]; data/scheme9-2018.12.05/s9.c:525: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[40]; data/scheme9-2018.12.05/s9.c:716: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). f = fopen(s, "r"); data/scheme9-2018.12.05/s9.c:865: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 path[TOKEN_LENGTH+1], *s; data/scheme9-2018.12.05/s9.c:919: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 b[LEN+2], *s; data/scheme9-2018.12.05/s9.c:956: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(S9magic, "S9:BAD-VERSION"); data/scheme9-2018.12.05/s9.c:1197: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 *path, pbuf[TOKEN_LENGTH+1]; data/scheme9-2018.12.05/s9.c:1253:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[80]; data/scheme9-2018.12.05/s9.c:1272:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "missing ')', started in line %d", data/scheme9-2018.12.05/s9.c:1322: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[10], msg[50]; data/scheme9-2018.12.05/s9.c:1351:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[TOKEN_LENGTH+1]; data/scheme9-2018.12.05/s9.c:1401: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[128]; data/scheme9-2018.12.05/s9.c:1411:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[TOKEN_LENGTH]; data/scheme9-2018.12.05/s9.c:1449:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[128]; data/scheme9-2018.12.05/s9.c:1523: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[100]; data/scheme9-2018.12.05/s9.c:1570: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[50]; data/scheme9-2018.12.05/s9.c:1586: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, "number expected after #%c, got", data/scheme9-2018.12.05/s9.c:1594: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[TOKEN_LENGTH]; data/scheme9-2018.12.05/s9.c:1597: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, "#<"); data/scheme9-2018.12.05/s9.c:1618: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[50]; data/scheme9-2018.12.05/s9.c:1703:12: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. default: sprintf(buf, "unknown # syntax: #%c", c); data/scheme9-2018.12.05/s9.c:1806: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 b[2]; data/scheme9-2018.12.05/s9.c:1827: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 b[2]; data/scheme9-2018.12.05/s9.c:1897: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[100]; data/scheme9-2018.12.05/s9.c:1909: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[100]; data/scheme9-2018.12.05/s9.c:1912: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, "#<fix %d>", (int) fixval(n)); data/scheme9-2018.12.05/s9.c:1918: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[100]; data/scheme9-2018.12.05/s9.c:1920: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, "#<unknown special value %d>", (int) n); data/scheme9-2018.12.05/s9.c:1995: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[100]; data/scheme9-2018.12.05/s9.c:3527:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[100]; data/scheme9-2018.12.05/s9.c:3544:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[100]; data/scheme9-2018.12.05/s9.c:3560: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 b[100]; data/scheme9-2018.12.05/s9.c:3569: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(b, "G%d", id); data/scheme9-2018.12.05/s9.c:3575: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. static char buf[8]; data/scheme9-2018.12.05/s9.c:3585: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[64]; data/scheme9-2018.12.05/s9.c:3642: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[64]; data/scheme9-2018.12.05/s9.c:3663: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[64]; data/scheme9-2018.12.05/s9.c:3680: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[64]; data/scheme9-2018.12.05/s9.c:4066:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&s[k], string(car(p)), m); data/scheme9-2018.12.05/s9.c:4282: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 path[TOKEN_LENGTH+1]; data/scheme9-2018.12.05/s9.c:5510: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 b[100]; data/scheme9-2018.12.05/s9core.c:60: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 Port_flags[S9_MAX_PORTS]; data/scheme9-2018.12.05/s9core.c:71: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 Rejected[2]; data/scheme9-2018.12.05/s9core.c:335:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Str_outport, s, k); data/scheme9-2018.12.05/s9core.c:529: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[100]; data/scheme9-2018.12.05/s9core.c:572: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(buf, "GC: %d nodes reclaimed", k); data/scheme9-2018.12.05/s9core.c:583: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[100]; data/scheme9-2018.12.05/s9core.c:616: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(buf, data/scheme9-2018.12.05/s9core.c:657: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[100]; data/scheme9-2018.12.05/s9core.c:678: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(buf, "GC: gcv: %d cells reclaimed", k); data/scheme9-2018.12.05/s9core.c:690: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[100]; data/scheme9-2018.12.05/s9core.c:715: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(buf, data/scheme9-2018.12.05/s9core.c:974: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(&Primitives[Last_prim], p, sizeof(S9_PRIM)); data/scheme9-2018.12.05/s9core.c:1003: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(symbol_name(n), string(x), k); data/scheme9-2018.12.05/s9core.c:1016: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(string(n), symbol_name(x), k); data/scheme9-2018.12.05/s9core.c:1028: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(string(n), string(x), k); data/scheme9-2018.12.05/s9core.c:1083:9: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atol(s); data/scheme9-2018.12.05/s9core.c:1087: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[40]; data/scheme9-2018.12.05/s9core.c:2406: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[S9_DIGITS_PER_CELL+2]; data/scheme9-2018.12.05/s9core.c:2418: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[S9_DIGITS_PER_CELL+3]; data/scheme9-2018.12.05/s9core.c:2467: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[S9_DIGITS_PER_CELL+2]; data/scheme9-2018.12.05/s9core.c:2468: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 es[2]; data/scheme9-2018.12.05/s9core.c:2580: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[Z]; data/scheme9-2018.12.05/s9core.c:2642:13: [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). Ports[i] = fopen(path, "r"); data/scheme9-2018.12.05/s9core.c:2653:13: [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). Ports[i] = fopen(path, append? "a": "w"); data/scheme9-2018.12.05/s9core.c:2719: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. static char msg[100]; data/scheme9-2018.12.05/s9core.c:2728: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. static char buf[100]; data/scheme9-2018.12.05/s9core.c:2821: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 id[16]; /* "magic#" */ data/scheme9-2018.12.05/s9core.c:2822: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 version[8]; /* "yyyymmdd" */ data/scheme9-2018.12.05/s9core.c:2823: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 cell_size[1]; /* size + '0' */ data/scheme9-2018.12.05/s9core.c:2824: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 mantissa_size[1]; /* size + '0' */ data/scheme9-2018.12.05/s9core.c:2825: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 byte_order[8]; /* e.g. "4321" */ data/scheme9-2018.12.05/s9core.c:2826: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 prim_slots[8]; /* see code */ data/scheme9-2018.12.05/s9core.c:2827: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 pad[6]; data/scheme9-2018.12.05/s9core.c:2844: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). f = fopen(path, "wb"); data/scheme9-2018.12.05/s9core.c:2858: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(m.byte_order, &n, sizeof(n)>8? 8: sizeof(n)); data/scheme9-2018.12.05/s9core.c:2860: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(m.prim_slots, &n, sizeof(n)>8? 8: sizeof(n)); data/scheme9-2018.12.05/s9core.c:2922: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). f = fopen(path, "rb"); data/scheme9-2018.12.05/s9core.c:2943: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(&n, m.byte_order, sizeof(cell)); data/scheme9-2018.12.05/s9core.c:2952: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(&n, m.prim_slots, sizeof(cell)); data/scheme9-2018.12.05/s9core.c:3429: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 b[100]; data/scheme9-2018.12.05/s9core.c:3451: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 b[100]; data/scheme9-2018.12.05/util/rpp.c:68:14: [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. case '&': strcpy(&buf[i], "&"); return i+5; data/scheme9-2018.12.05/util/rpp.c:69:14: [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. case '<': strcpy(&buf[i], "<"); return i+4; data/scheme9-2018.12.05/util/rpp.c:70:14: [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. case '>': strcpy(&buf[i], ">"); return i+4; data/scheme9-2018.12.05/util/rpp.c:80: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. static char obuf[MAXLINE]; data/scheme9-2018.12.05/util/rpp.c:127: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. static char buf[MAXLINE]; data/scheme9-2018.12.05/util/rpp.c:131:13: [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). if ((in = fopen(file, "r")) == NULL) { data/scheme9-2018.12.05/util/rpp.c:182: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. static char buf[MAXLINE]; data/scheme9-2018.12.05/util/rpp.c:186: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(buf, "%d", lno); data/scheme9-2018.12.05/util/rpp.c:240: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[MAXLINE]; data/scheme9-2018.12.05/util/rpp.c:249: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). if ((pf = fopen(buf, "r")) == NULL) { data/scheme9-2018.12.05/util/rpp.c:251:13: [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). if ((pf = fopen(buf, "r")) == NULL) { data/scheme9-2018.12.05/util/rpp.c:281:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", lno); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:162:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return make_string(str, strlen(str)); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:190:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, string(val), len); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:448:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(f->version, string(v[i]), flen); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:555:7: [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). k = strlen(who); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:687:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = read(fd, buf, DIRMAX); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:780:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(string(buf)); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:905:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(integer_value(name, car(x)), string(buf), k); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:928: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). return make_string(r, strlen(r)); data/scheme9-2018.12.05/attic/sys-plan9/plan9.c:988: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). n = cons(make_string(fld[4], strlen(fld[4])), NIL); data/scheme9-2018.12.05/ext/curses/curses.c:422: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). return make_string(s, strlen(s)); data/scheme9-2018.12.05/ext/sys-unix/unix.c:113:7: [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). k = strlen(who); data/scheme9-2018.12.05/ext/sys-unix/unix.c:281: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). n = make_string(s, strlen(s)); data/scheme9-2018.12.05/ext/sys-unix/unix.c:291: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). return make_string(s, strlen(s)); data/scheme9-2018.12.05/ext/sys-unix/unix.c:304:43: [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). assign(cdar(n), make_string(gr->gr_name, strlen(gr->gr_name))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:354:43: [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). assign(car(a), make_string(pw->pw_name, strlen(pw->pw_name))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:372:43: [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). assign(cdar(n), make_string(pw->pw_name, strlen(pw->pw_name))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:384: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). assign(cdar(a), make_string(pw->pw_gecos, strlen(pw->pw_gecos))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:388: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). assign(cdar(a), make_string(pw->pw_dir, strlen(pw->pw_dir))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:392: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). assign(cdar(a), make_string(pw->pw_shell, strlen(pw->pw_shell))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:437: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(s) > 248) data/scheme9-2018.12.05/ext/sys-unix/unix.c:553:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(integer_value(name, parg(1)), string(buf), k); data/scheme9-2018.12.05/ext/sys-unix/unix.c:586: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). assign(car(a), make_string(dp->d_name, strlen(dp->d_name))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:822: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). return make_string(s, strlen(s)); data/scheme9-2018.12.05/ext/sys-unix/unix.c:857:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(r = umask(0)); data/scheme9-2018.12.05/ext/sys-unix/unix.c:857:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(r = umask(0)); data/scheme9-2018.12.05/ext/sys-unix/unix.c:859:7: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). r = umask(integer_value("sys:umask", parg(1))); data/scheme9-2018.12.05/ext/sys-unix/unix.c:873: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(s) > 248) data/scheme9-2018.12.05/ext/sys-unix/unix.c:882:6: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. int usleep(useconds_t microseconds); data/scheme9-2018.12.05/ext/sys-unix/unix.c:884:6: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (usleep(integer_value("sys:usleep", parg(1)))) data/scheme9-2018.12.05/ext/sys-unix/unix.c:987: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). m = make_string(ip, strlen(ip)); data/scheme9-2018.12.05/s9.c:953: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(RELEASE_DATE) == 10) data/scheme9-2018.12.05/s9.c:1180: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(RELEASE_DATE))); data/scheme9-2018.12.05/s9.c:1209:7: [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(image) + strlen(imgdir) > TOKEN_LENGTH) data/scheme9-2018.12.05/s9.c:1209:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(image) + strlen(imgdir) > TOKEN_LENGTH) data/scheme9-2018.12.05/s9.c:1220: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). error(s, make_string(path, strlen(path))); data/scheme9-2018.12.05/s9.c:1224: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). make_string(path, strlen(path))); data/scheme9-2018.12.05/s9.c:1229: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). error(s, make_string(path, strlen(path))); data/scheme9-2018.12.05/s9.c:1233:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). make_string(IMAGE_FILE, strlen(IMAGE_FILE))); data/scheme9-2018.12.05/s9.c:1237: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). make_string(path, strlen(path))); data/scheme9-2018.12.05/s9.c:1463: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). n = make_string(s, strlen(s)); data/scheme9-2018.12.05/s9.c:3574:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i, k = strlen(s); data/scheme9-2018.12.05/s9.c:3839:6: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. void equal(cell x, cell y) { data/scheme9-2018.12.05/s9.c:4256: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). make_string(s, strlen(s))); data/scheme9-2018.12.05/s9.c:4263:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). save(make_string(Srcfile, strlen(Srcfile))); data/scheme9-2018.12.05/s9.c:4264:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(Srcfile, s, TOKEN_LENGTH); data/scheme9-2018.12.05/s9.c:4315: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). return make_string(p, strlen(p)); data/scheme9-2018.12.05/s9.c:5087:3: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal(Acc, arg(0)); data/scheme9-2018.12.05/s9.c:5563:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c = s[strlen(s)-1]; data/scheme9-2018.12.05/s9.c:5610:7: [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). k = strlen(argv[i]); data/scheme9-2018.12.05/s9.c:5621: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). j = strlen(argv[i]); data/scheme9-2018.12.05/s9.c:5630: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). make_string(s, strlen(s))); data/scheme9-2018.12.05/s9.c:5633: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). j = strlen(argv[i]); data/scheme9-2018.12.05/s9.c:5642: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). j = strlen(argv[i]); data/scheme9-2018.12.05/s9.c:5647: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). libs = cons(make_string(s, strlen(s)), libs); data/scheme9-2018.12.05/s9.c:5649: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). j = strlen(argv[i]); data/scheme9-2018.12.05/s9.c:5655: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). j = strlen(argv[i]); data/scheme9-2018.12.05/s9core.c:280:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return getc(Ports[Input_port]); data/scheme9-2018.12.05/s9core.c:367: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). s9_blockwrite(s, strlen(s)); data/scheme9-2018.12.05/s9core.c:872:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). new = s9_make_symbol(s, strlen(s)); data/scheme9-2018.12.05/s9core.c:881:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(string(n), s, k+1); data/scheme9-2018.12.05/s9core.c:1127: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). n = s9_make_string(argv[i], strlen(argv[i])); data/scheme9-2018.12.05/s9core.c:2320:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str = s9_make_string(s, strlen(s)); data/scheme9-2018.12.05/s9core.c:2323: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). k = (int) strlen(s); data/scheme9-2018.12.05/s9core.c:2443:7: [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). k = strlen(buf); data/scheme9-2018.12.05/s9core.c:2604:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return s9_make_string(buf, strlen(buf)); data/scheme9-2018.12.05/s9core.c:2849:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(m.id, magic, sizeof(m.id)); data/scheme9-2018.12.05/s9core.c:2850:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(m.version, S9_VERSION, sizeof(m.version)); data/scheme9-2018.12.05/s9core.c:3002:4: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fgetc(f) != EOF) data/scheme9-2018.12.05/util/rpp.c:59: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). return(strlen(s)); data/scheme9-2018.12.05/util/rpp.c:154:29: [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 ((new = (char *) malloc(strlen(s)+1)) == NULL) { data/scheme9-2018.12.05/util/rpp.c:192:4: [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[strlen(p)-1] = 0; data/scheme9-2018.12.05/util/rpp.c:321:10: [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). i = strlen(argv[p])-1; ANALYSIS SUMMARY: Hits = 263 Lines analyzed = 13609 in approximately 0.37 seconds (36720 lines/second) Physical Source Lines of Code (SLOC) = 11787 Hits@level = [0] 12 [1] 72 [2] 132 [3] 4 [4] 52 [5] 3 Hits@level+ = [0+] 275 [1+] 263 [2+] 191 [3+] 59 [4+] 55 [5+] 3 Hits/KSLOC@level+ = [0+] 23.3308 [1+] 22.3127 [2+] 16.2043 [3+] 5.00551 [4+] 4.66616 [5+] 0.254518 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.