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/picolisp-20.6/src/pico.h Examining data/picolisp-20.6/src/vers.h Examining data/picolisp-20.6/src/apply.c Examining data/picolisp-20.6/src/balance.c Examining data/picolisp-20.6/src/big.c Examining data/picolisp-20.6/src/ext.c Examining data/picolisp-20.6/src/flow.c Examining data/picolisp-20.6/src/gc.c Examining data/picolisp-20.6/src/ht.c Examining data/picolisp-20.6/src/httpGate.c Examining data/picolisp-20.6/src/lat1.c Examining data/picolisp-20.6/src/main.c Examining data/picolisp-20.6/src/net.c Examining data/picolisp-20.6/src/ssl.c Examining data/picolisp-20.6/src/start.c Examining data/picolisp-20.6/src/subr.c Examining data/picolisp-20.6/src/sym.c Examining data/picolisp-20.6/src/tab.c Examining data/picolisp-20.6/src/utf2.c Examining data/picolisp-20.6/src/io.c Examining data/picolisp-20.6/src64/sysdefs.c FINAL RESULTS: data/picolisp-20.6/src/ssl.c:319:25: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((n = readlink(nm, buf, sizeof(buf))) > 0 && stat(nm, &st) >= 0) { data/picolisp-20.6/src/balance.c:68:13: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(av[1]+1, av+1); data/picolisp-20.6/src/ext.c:270:23: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. return mkStr(crypt(key, salt)); data/picolisp-20.6/src/flow.c:1516:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(av[0], av); data/picolisp-20.6/src/flow.c:1538:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(av[0], av); data/picolisp-20.6/src/httpGate.c:89:33: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, "NAME="), strcpy(p+5, np->key); data/picolisp-20.6/src/httpGate.c:91:33: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, "HOME="), strcpy(p+5, pw->pw_dir); data/picolisp-20.6/src/httpGate.c:93:33: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, "PORT="), strcpy(p+5, ps); data/picolisp-20.6/src/httpGate.c:95:33: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, "LANG="), strcpy(p+5, q); data/picolisp-20.6/src/httpGate.c:268:13: [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(log, np->log); data/picolisp-20.6/src/httpGate.c:270:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(log, "%s/%s", np->dir, np->log); data/picolisp-20.6/src/httpGate.c:443:20: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. i = sprintf(buf, Head_302, np->dir); data/picolisp-20.6/src/httpGate.c:481:36: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. wrBytes(SrvSock, buf2, sprintf(buf2, gate, s)); data/picolisp-20.6/src/httpGate.c:483:39: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. wrBytes(SrvSock, buf2, sprintf(buf2, "X-Pil: *Cipher=%s\r\n", SSL_get_cipher(ssl))); data/picolisp-20.6/src/io.c:729:10: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(av[0], av); data/picolisp-20.6/src/io.c:806:10: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(av[0], av); data/picolisp-20.6/src/lat1.c:34:13: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(av[1]+1, av+1); data/picolisp-20.6/src/main.c:382:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(val, "%s=", nm); data/picolisp-20.6/src/main.c:583:4: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(msg, sizeof(msg), fmt, ap); data/picolisp-20.6/src/main.c:836:10: [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, nm); data/picolisp-20.6/src/main.c:840:36: [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 + n, "lib/"), strcpy(buf + n + 4, nm); data/picolisp-20.6/src/ssl.c:177:16: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. getLen = sprintf(get, Get, av[3], av[1], av[2]); data/picolisp-20.6/src/utf2.c:32:13: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(av[1]+1, av+1); data/picolisp-20.6/src/httpGate.c:94:51: [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 = np->ev[3] = malloc(5 + strlen(q = getenv("LANG")) + 1); data/picolisp-20.6/src/main.c:376:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return mkStr(getenv(nm)); data/picolisp-20.6/src/balance.c:76:23: [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). else if (!(fp = fopen(av[1], "r"))) data/picolisp-20.6/src/big.c:477:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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, buf[10]; data/picolisp-20.6/src/big.c:509: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. n += sprintf(b = buf, "%ld", *ta--); data/picolisp-20.6/src/big.c:526:10: [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 = buf, "%09ld", *ta--); data/picolisp-20.6/src/ext.c:262: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 key[bufSize(y)]; data/picolisp-20.6/src/ext.c:267:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char salt[bufSize(y)]; data/picolisp-20.6/src/flow.c:1508:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *av[ac+1]; data/picolisp-20.6/src/flow.c:1527:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *av[ac+1]; data/picolisp-20.6/src/ht.c:16:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *p, nm[bufSize(y)]; data/picolisp-20.6/src/ht.c:99: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 nm[bufSize(x)]; data/picolisp-20.6/src/ht.c:253: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 Chunk[CHUNK]; data/picolisp-20.6/src/ht.c:314:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[BITS/2]; data/picolisp-20.6/src/ht.c:316: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, "%x\r\n", Cnt); data/picolisp-20.6/src/httpGate.c:34:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *dir, *log, *ev[5], *av[1]; data/picolisp-20.6/src/httpGate.c:65:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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, *q, *ps, line[4096]; data/picolisp-20.6/src/httpGate.c:68:15: [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 (!(fp = fopen(Config, "r"))) // Lines ordered by data/picolisp-20.6/src/httpGate.c:78:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((np->port = atoi(ps = strtok(NULL, delim))) == 0) data/picolisp-20.6/src/httpGate.c:89:13: [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(p, "NAME="), strcpy(p+5, np->key); data/picolisp-20.6/src/httpGate.c:91:13: [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(p, "HOME="), strcpy(p+5, pw->pw_dir); data/picolisp-20.6/src/httpGate.c:93:13: [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(p, "PORT="), strcpy(p+5, ps); data/picolisp-20.6/src/httpGate.c:95:13: [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(p, "LANG="), strcpy(p+5, q); data/picolisp-20.6/src/httpGate.c:265:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char log[strlen(np->dir) + 1 + strlen(np->log) + 1]; data/picolisp-20.6/src/httpGate.c:271: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 ((fd = open(log, O_RDWR)) >= 0) { data/picolisp-20.6/src/httpGate.c:342:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[INET6_ADDRSTRLEN]; data/picolisp-20.6/src/httpGate.c:349:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sd = gatePort(atoi(av[1])); // e.g. 80 or 443 data/picolisp-20.6/src/httpGate.c:375:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ports[n] = atoi(av[n+3]); data/picolisp-20.6/src/httpGate.c:396:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[4096], buf2[64]; data/picolisp-20.6/src/httpGate.c:453:26: [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 ((fd = open("void", O_RDONLY)) < 0) data/picolisp-20.6/src/io.c:227:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Child[i].buf + n + sizeof(int), p, cnt); data/picolisp-20.6/src/io.c:592: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 nm[pathSize(x)]; data/picolisp-20.6/src/io.c:687: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 nm[pathSize(x)]; data/picolisp-20.6/src/io.c:692:26: [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). while ((f->fd = open(nm+1, O_APPEND|O_CREAT|O_RDWR, 0666)) < 0) { data/picolisp-20.6/src/io.c:701:26: [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). while ((f->fd = open(nm, O_RDONLY)) < 0) { data/picolisp-20.6/src/io.c:714: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 *av[ac+1]; data/picolisp-20.6/src/io.c:766: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 nm[pathSize(x)]; data/picolisp-20.6/src/io.c:771:26: [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). while ((f->fd = open(nm+1, O_APPEND|O_CREAT|O_WRONLY, 0666)) < 0) { data/picolisp-20.6/src/io.c:779:26: [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). while ((f->fd = open(nm, O_CREAT|O_TRUNC|O_WRONLY, 0666)) < 0) { data/picolisp-20.6/src/io.c:792: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 *av[ac+1]; data/picolisp-20.6/src/io.c:828: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 nm[pathSize(x)]; data/picolisp-20.6/src/io.c:832:23: [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). while ((fd = open(nm+1, O_APPEND|O_CREAT|O_WRONLY, 0666)) < 0) { data/picolisp-20.6/src/io.c:840:23: [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). while ((fd = open(nm, O_CREAT|O_TRUNC|O_WRONLY, 0666)) < 0) { data/picolisp-20.6/src/io.c:863: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 nm[pathSize(x)]; data/picolisp-20.6/src/io.c:867:26: [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). while ((f->fd = open(nm+1, O_CREAT|O_RDWR, 0666)) < 0) { data/picolisp-20.6/src/io.c:876:26: [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). while ((f->fd = open(nm, O_CREAT|O_RDWR, 0666)) < 0) { data/picolisp-20.6/src/io.c:1378: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 nm[bufSize(x)]; data/picolisp-20.6/src/io.c:1574:28: [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(Child[i].buf, Child[i].buf + Child[i].ofs, Child[i].cnt); data/picolisp-20.6/src/io.c:1828:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *av[ac]; data/picolisp-20.6/src/io.c:1878: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 buf[bufSize(x)]; data/picolisp-20.6/src/io.c:1983:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nm[pathSize(y)]; data/picolisp-20.6/src/io.c:1986:19: [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 (fp = fopen(nm, "r")) { data/picolisp-20.6/src/io.c:2295:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 nm[pathSize(x)]; data/picolisp-20.6/src/io.c:2300:17: [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). while ((fd = open(nm, isNil(x)? O_CREAT|O_RDWR : O_RDONLY, 0666)) < 0) { data/picolisp-20.6/src/io.c:2343: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 *av[ac]; data/picolisp-20.6/src/io.c:2475: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 *p, buf[BITS/2]; data/picolisp-20.6/src/io.c:2477:7: [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(p = buf, "%ld", unBox(x)); data/picolisp-20.6/src/io.c:3147:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nm[pathSize(data(c1)) + 8]; data/picolisp-20.6/src/io.c:3151:13: [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(nm + strlen(nm), "%d", F+1); data/picolisp-20.6/src/io.c:3153:28: [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 ((BlkFile[F] = open(nm, O_RDWR)) >= 0) { data/picolisp-20.6/src/io.c:3159:36: [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). (BlkFile[F] = open(nm, O_CREAT|O_EXCL|O_RDWR, 0666)) < 0) { data/picolisp-20.6/src/io.c:3187:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nm[pathSize(data(c3))]; data/picolisp-20.6/src/io.c:3190:22: [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 (!(Jnl = fopen(nm, "a"))) data/picolisp-20.6/src/io.c:3195:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nm[pathSize(data(c4))]; data/picolisp-20.6/src/io.c:3198:22: [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 (!(Log = fopen(nm, "a+"))) data/picolisp-20.6/src/io.c:3222:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nm[pathSize(y)]; data/picolisp-20.6/src/io.c:3225:21: [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 (!(fp = fopen(nm, "r"))) data/picolisp-20.6/src/io.c:3557: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 nm[pathSize(y = cdr(x))]; data/picolisp-20.6/src/io.c:3560: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 ((f.fd = open(nm, O_APPEND|O_CREAT|O_WRONLY, 0666)) < 0) data/picolisp-20.6/src/io.c:3721:10: [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(Block, buf, BLK); // Insert into free list data/picolisp-20.6/src/lat1.c:49:21: [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 (!(fp = fopen(av[1], mode))) { data/picolisp-20.6/src/main.c:372: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 nm[bufSize(y)]; data/picolisp-20.6/src/main.c:386:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char val[bufSize(y)]; data/picolisp-20.6/src/main.c:578:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[240]; data/picolisp-20.6/src/main.c:643: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 msg[bufSize(y)]; data/picolisp-20.6/src/main.c:821:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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, nm[bufSize(x)]; data/picolisp-20.6/src/main.c:830: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 buf[n + strlen(nm) + 4 + 1]; data/picolisp-20.6/src/main.c:832: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 buf[n + strlen(nm) + 4 + 4 + 1]; data/picolisp-20.6/src/main.c:839:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, Home, n); data/picolisp-20.6/src/main.c:840:10: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf + n, "lib/"), strcpy(buf + n + 4, nm); data/picolisp-20.6/src/main.c:842:10: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf + n + 4 + strlen(nm), ".dll"); data/picolisp-20.6/src/main.c:984:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char mon[13] = {31,31,28,31,30,31,30,31,31,30,31,30,31}; data/picolisp-20.6/src/main.c:1110: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 *p, path[pathSize(x)]; data/picolisp-20.6/src/main.c:1131:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tty[bufSize(x)]; data/picolisp-20.6/src/main.c:1155: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 nm[pathSize(y)]; data/picolisp-20.6/src/main.c:1204: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 nm[pathSize(y)]; data/picolisp-20.6/src/main.c:1317: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(Home, av[0], p - av[0] + 1); data/picolisp-20.6/src/net.c:66:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[INET6_ADDRSTRLEN]; data/picolisp-20.6/src/net.c:115: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 host[NI_MAXHOST]; data/picolisp-20.6/src/net.c:116: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 nm[bufSize(x)]; data/picolisp-20.6/src/net.c:135:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 nd[bufSize(node)], sv[bufSize(service)]; data/picolisp-20.6/src/ssl.c:88:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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[BUFSIZ]; data/picolisp-20.6/src/ssl.c:95: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). else if ((fd = open(file, O_RDONLY)) < 0) data/picolisp-20.6/src/ssl.c:123:17: [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 ((fd = open(File, O_RDWR)) < 0) data/picolisp-20.6/src/ssl.c:164:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 get[1024], buf[4096], nm[4096], len[64]; data/picolisp-20.6/src/ssl.c:236:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sec = atoi(av[7]); data/picolisp-20.6/src/ssl.c:241:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((lim = atoi(av[8])) == 0) { data/picolisp-20.6/src/ssl.c:251:26: [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 (*File && (fd = open(File, O_RDWR)) >= 0) { data/picolisp-20.6/src/ssl.c:259:22: [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. lenLen = sprintf(len, "%ld\n", Size); data/picolisp-20.6/src/ssl.c:283:35: [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 ((fd = open(nm, O_CREAT|O_EXCL|O_WRONLY, 0666)) < 0) data/picolisp-20.6/src/ssl.c:320:28: [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. lenLen = sprintf(len, "%ld\n", st.st_size); data/picolisp-20.6/src/sym.c:419:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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, buf[bufSize(y)]; data/picolisp-20.6/src/utf2.c:44:23: [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). else if (!(fp = fopen(av[1], "r"))) { data/picolisp-20.6/src/flow.c:52:46: [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. if (!isNil(val(s)) && s != val(s) && !equal(x,val(s))) data/picolisp-20.6/src/flow.c:225:62: [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. if (!isNil(y = val(data(c1))) && y != data(c1) && !equal(data(c2), y)) data/picolisp-20.6/src/flow.c:234:53: [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. if (!isNil(y = get(data(c1), data(c2))) && !equal(data(c3), y)) data/picolisp-20.6/src/flow.c:278:15: [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. if (!equal(cdr(x), cdar(y))) data/picolisp-20.6/src/flow.c:1023:23: [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. if (z == T || equal(val(At), z)) data/picolisp-20.6/src/flow.c:1027:17: [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. if (equal(val(At), car(z))) data/picolisp-20.6/src/httpGate.c:88: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). p = np->ev[0] = malloc(5 + strlen(np->key) + 1); data/picolisp-20.6/src/httpGate.c:90: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). p = np->ev[1] = malloc(5 + strlen(pw->pw_dir) + 1); data/picolisp-20.6/src/httpGate.c:92: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). p = np->ev[2] = malloc(5 + strlen(ps) + 1); data/picolisp-20.6/src/httpGate.c:94: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). p = np->ev[3] = malloc(5 + strlen(q = getenv("LANG")) + 1); data/picolisp-20.6/src/httpGate.c:171:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = ssl? SSL_read(ssl, p, cnt) : read(fd, p, cnt)) < 0) data/picolisp-20.6/src/httpGate.c:181:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((n = ssl? SSL_read(ssl, p, cnt) : read(fd, p, cnt)) <= 0) { data/picolisp-20.6/src/httpGate.c:265: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). char log[strlen(np->dir) + 1 + strlen(np->log) + 1]; data/picolisp-20.6/src/httpGate.c:265:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char log[strlen(np->dir) + 1 + strlen(np->log) + 1]; data/picolisp-20.6/src/httpGate.c:300:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); // 100 ms data/picolisp-20.6/src/httpGate.c:457: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). sslWrite(ssl, Head_410, strlen(Head_410)); data/picolisp-20.6/src/httpGate.c:459:46: [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). wrBytes(CliSock, Head_410, strlen(Head_410)); data/picolisp-20.6/src/httpGate.c:461:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(fd, buf, sizeof(buf))) > 0) { data/picolisp-20.6/src/httpGate.c:502:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(SrvSock, buf, sizeof(buf))) > 0) { data/picolisp-20.6/src/io.c:122:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(p->fd, p->buf, BUFSIZ); data/picolisp-20.6/src/io.c:146:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, p, cnt); data/picolisp-20.6/src/io.c:154:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(fd, p, cnt)) <= 0) { data/picolisp-20.6/src/io.c:560:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(Home) + numBytes(name(x)); data/picolisp-20.6/src/io.c:3151: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). sprintf(nm + strlen(nm), "%d", F+1); data/picolisp-20.6/src/main.c:421: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. bool equal(any x, any y) { data/picolisp-20.6/src/main.c:444:15: [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. if (!equal(car(x), (any)(num(car(y)) & ~1))) data/picolisp-20.6/src/main.c:447:19: [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. res = equal(cdr(x), cdr(y)); data/picolisp-20.6/src/main.c:828: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). int n = Home? strlen(Home) : 0; data/picolisp-20.6/src/main.c:830:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char buf[n + strlen(nm) + 4 + 1]; data/picolisp-20.6/src/main.c:832:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char buf[n + strlen(nm) + 4 + 4 + 1]; data/picolisp-20.6/src/main.c:842: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). strcpy(buf + n + 4 + strlen(nm), ".dll"); data/picolisp-20.6/src/net.c:82:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); // 100 ms data/picolisp-20.6/src/pico.h:312: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. bool equal(any,any); data/picolisp-20.6/src/pico.h:836:11: [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. if (equal(x, car(y))) data/picolisp-20.6/src/pico.h:841:24: [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. return isNil(y) || !equal(x,y)? NULL : y; data/picolisp-20.6/src/pico.h:861:11: [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. if (equal(x, car(y))) data/picolisp-20.6/src/ssl.c:92: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). return SSL_write(ssl, file+1, strlen(file)-1) >= 0; data/picolisp-20.6/src/ssl.c:97:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(fd, buf, sizeof(buf))) > 0) data/picolisp-20.6/src/ssl.c:131:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, data, st.st_size) != st.st_size) data/picolisp-20.6/src/ssl.c:175:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(Get)+strlen(av[1])+strlen(av[2])+strlen(av[3]) >= sizeof(get)) data/picolisp-20.6/src/ssl.c:175: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(Get)+strlen(av[1])+strlen(av[2])+strlen(av[3]) >= sizeof(get)) data/picolisp-20.6/src/ssl.c:175: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). if (strlen(Get)+strlen(av[1])+strlen(av[2])+strlen(av[3]) >= sizeof(get)) data/picolisp-20.6/src/ssl.c:175:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(Get)+strlen(av[1])+strlen(av[2])+strlen(av[3]) >= sizeof(get)) data/picolisp-20.6/src/ssl.c:217:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read(STDIN_FILENO, buf, sizeof(buf))) > 0) data/picolisp-20.6/src/ssl.c:262:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, Data, Size) != Size) data/picolisp-20.6/src/subr.c:574:12: [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. if (!equal(y, car(x))) data/picolisp-20.6/src/subr.c:585:11: [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. if (equal(y, car(x))) { data/picolisp-20.6/src/subr.c:650:11: [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. if (equal(x, data(c[i]))) { data/picolisp-20.6/src/subr.c:657:14: [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. if (equal(x, data(c[i]))) { data/picolisp-20.6/src/subr.c:756:14: [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. if (equal(car(data(c1)), data(c[i]))) { data/picolisp-20.6/src/subr.c:865:30: [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. for (y = data(c1); equal(car(y), car(x)); x = cdr(x)) data/picolisp-20.6/src/subr.c:900:17: [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. if (equal(x,data(c1))) data/picolisp-20.6/src/subr.c:931:14: [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. if (equal(car(x), data(c[i]))) { data/picolisp-20.6/src/subr.c:991:12: [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. if (!equal(data(c1), EVAL(car(x)))) { data/picolisp-20.6/src/subr.c:1005:12: [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. if (!equal(data(c1), EVAL(car(x)))) { data/picolisp-20.6/src/subr.c:1269:11: [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. if (equal(x,y)) data/picolisp-20.6/src/subr.c:1373:29: [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. if (isCell(car(y)) && equal(x,caar(y))) data/picolisp-20.6/src/subr.c:1386:29: [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. if (isCell(car(y)) && equal(x,cdar(y))) data/picolisp-20.6/src/subr.c:1438:17: [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. return equal(p,d); data/picolisp-20.6/src/subr.c:1442:17: [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. if (equal(d, cdr(p))) { data/picolisp-20.6/src/subr.c:1530:14: [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. if (equal(n1, caaar(x)) && x1 == cdaar(x)) { data/picolisp-20.6/src/subr.c:1538:14: [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. if (equal(n2, caaar(x)) && x2 == cdaar(x)) { data/picolisp-20.6/src/subr.c:1543:8: [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. if (equal(n1, n2) && equal(x1, x2)) data/picolisp-20.6/src/subr.c:1543:27: [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. if (equal(n1, n2) && equal(x1, x2)) data/picolisp-20.6/src/subr.c:1560:14: [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. return equal(x1, x2); data/picolisp-20.6/src/subr.c:1575:14: [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. if (equal(n, caaar(y)) && x == cdaar(y)) { data/picolisp-20.6/src/subr.c:1754:14: [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. if (equal(caar(z), caar(x))) { data/picolisp-20.6/src/sym.c:808:12: [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. if (!equal(data(c1), car(x))) data/picolisp-20.6/src/sym.c:818:11: [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. if (equal(data(c1), car(x))) { ANALYSIS SUMMARY: Hits = 195 Lines analyzed = 16372 in approximately 0.51 seconds (32370 lines/second) Physical Source Lines of Code (SLOC) = 14410 Hits@level = [0] 37 [1] 69 [2] 101 [3] 2 [4] 22 [5] 1 Hits@level+ = [0+] 232 [1+] 195 [2+] 126 [3+] 25 [4+] 23 [5+] 1 Hits/KSLOC@level+ = [0+] 16.0999 [1+] 13.5323 [2+] 8.74393 [3+] 1.73491 [4+] 1.59611 [5+] 0.0693963 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.