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/chezscheme-9.5.4+dfsg/boot/a6le/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/a6le/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/a6nt/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/a6nt/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/a6osx/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/a6osx/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/i3le/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/i3le/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/i3nt/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/i3nt/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/i3osx/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/i3osx/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/ta6le/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/ta6le/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/ta6nt/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/ta6nt/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/ta6osx/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/ta6osx/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/ti3le/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/ti3le/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/ti3nt/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/ti3nt/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/ti3osx/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/ti3osx/scheme.h Examining data/chezscheme-9.5.4+dfsg/boot/arm32le/equates.h Examining data/chezscheme-9.5.4+dfsg/boot/arm32le/scheme.h Examining data/chezscheme-9.5.4+dfsg/c/alloc.c Examining data/chezscheme-9.5.4+dfsg/c/arm32le.c Examining data/chezscheme-9.5.4+dfsg/c/compress-io.c Examining data/chezscheme-9.5.4+dfsg/c/compress-io.h Examining data/chezscheme-9.5.4+dfsg/c/expeditor.c Examining data/chezscheme-9.5.4+dfsg/c/externs.h Examining data/chezscheme-9.5.4+dfsg/c/fasl.c Examining data/chezscheme-9.5.4+dfsg/c/flushcache.c Examining data/chezscheme-9.5.4+dfsg/c/foreign.c Examining data/chezscheme-9.5.4+dfsg/c/gc-011.c Examining data/chezscheme-9.5.4+dfsg/c/gc-ocd.c Examining data/chezscheme-9.5.4+dfsg/c/gc-oce.c Examining data/chezscheme-9.5.4+dfsg/c/gc.c Examining data/chezscheme-9.5.4+dfsg/c/gcwrapper.c Examining data/chezscheme-9.5.4+dfsg/c/globals.h Examining data/chezscheme-9.5.4+dfsg/c/i3le.c Examining data/chezscheme-9.5.4+dfsg/c/intern.c Examining data/chezscheme-9.5.4+dfsg/c/io.c Examining data/chezscheme-9.5.4+dfsg/c/itest.c Examining data/chezscheme-9.5.4+dfsg/c/main.c Examining data/chezscheme-9.5.4+dfsg/c/new-io.c Examining data/chezscheme-9.5.4+dfsg/c/nocurses.h Examining data/chezscheme-9.5.4+dfsg/c/number.c Examining data/chezscheme-9.5.4+dfsg/c/ppc32.c Examining data/chezscheme-9.5.4+dfsg/c/ppc32le.c Examining data/chezscheme-9.5.4+dfsg/c/prim.c Examining data/chezscheme-9.5.4+dfsg/c/prim5.c Examining data/chezscheme-9.5.4+dfsg/c/print.c Examining data/chezscheme-9.5.4+dfsg/c/scheme.c Examining data/chezscheme-9.5.4+dfsg/c/schlib.c Examining data/chezscheme-9.5.4+dfsg/c/schsig.c Examining data/chezscheme-9.5.4+dfsg/c/segment.c Examining data/chezscheme-9.5.4+dfsg/c/segment.h Examining data/chezscheme-9.5.4+dfsg/c/sort.h Examining data/chezscheme-9.5.4+dfsg/c/statics.c Examining data/chezscheme-9.5.4+dfsg/c/stats.c Examining data/chezscheme-9.5.4+dfsg/c/symbol.c Examining data/chezscheme-9.5.4+dfsg/c/system.h Examining data/chezscheme-9.5.4+dfsg/c/thread.c Examining data/chezscheme-9.5.4+dfsg/c/thread.h Examining data/chezscheme-9.5.4+dfsg/c/types.h Examining data/chezscheme-9.5.4+dfsg/c/version.h Examining data/chezscheme-9.5.4+dfsg/c/windows.c Examining data/chezscheme-9.5.4+dfsg/examples/crepl.c Examining data/chezscheme-9.5.4+dfsg/examples/csocket.c Examining data/chezscheme-9.5.4+dfsg/mats/cat_flush.c Examining data/chezscheme-9.5.4+dfsg/mats/foreign1.c Examining data/chezscheme-9.5.4+dfsg/mats/foreign2.c Examining data/chezscheme-9.5.4+dfsg/mats/foreign3.c Examining data/chezscheme-9.5.4+dfsg/mats/foreign4.c Examining data/chezscheme-9.5.4+dfsg/mats/ftype.h FINAL RESULTS: data/chezscheme-9.5.4+dfsg/c/version.h:398:16: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. # define CHMOD chmod data/chezscheme-9.5.4+dfsg/c/expeditor.c:735:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system("exec /usr/X11/bin/resize >& /dev/null"); data/chezscheme-9.5.4+dfsg/c/expeditor.c:1020:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *f = popen("/usr/bin/pbpaste", "r"); data/chezscheme-9.5.4+dfsg/c/gcwrapper.c:39:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(checkheap_noisy ? "NB: check_heap is enabled and noisy\n" : "NB: check_heap_is_enabled\n"); data/chezscheme-9.5.4+dfsg/c/prim5.c:266:3: [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(out, fmtbuf, "level", addrtitle, "bytes"); data/chezscheme-9.5.4+dfsg/c/prim5.c:271:7: [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(out, fmtbuf, 2, t2t, sizeof(t2table)); data/chezscheme-9.5.4+dfsg/c/prim5.c:275:11: [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(out, fmtbuf, 1, (ptrdiff_t)t1t, (ptrdiff_t)sizeof(t1table)); data/chezscheme-9.5.4+dfsg/c/prim5.c:290:3: [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(out, fmtbuf, "level", addrtitle, "bytes"); data/chezscheme-9.5.4+dfsg/c/prim5.c:295:7: [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(out, fmtbuf, 1, (ptrdiff_t)t1t, (ptrdiff_t)sizeof(t1table)); data/chezscheme-9.5.4+dfsg/c/prim5.c:329:3: [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(out, fmtbuf, addrtitle, bytestitle, headertitle, "segments used"); data/chezscheme-9.5.4+dfsg/c/prim5.c:334:5: [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(out, fmtbuf, (ptrdiff_t)chunk->addr, (ptrdiff_t)chunk->bytes, data/chezscheme-9.5.4+dfsg/c/prim5.c:425:9: [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(out, fmtbuf, "total"); data/chezscheme-9.5.4+dfsg/c/prim5.c:429:9: [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(out, fmtbuf, "static"); data/chezscheme-9.5.4+dfsg/c/prim5.c:433:9: [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(out, fmtbuf, g); data/chezscheme-9.5.4+dfsg/c/prim5.c:446:13: [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(out, fmtbuf, (ptrdiff_t)(count[g][s])); data/chezscheme-9.5.4+dfsg/c/prim5.c:456:15: [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(out, fmtbuf, data/chezscheme-9.5.4+dfsg/c/prim5.c:462:15: [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(out, fmtbuf, ""); data/chezscheme-9.5.4+dfsg/c/prim5.c:504:5: [4] (format) snprintf: 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. snprintf(genline, 100, fmtbuf, ""); data/chezscheme-9.5.4+dfsg/c/prim5.c:540:11: [4] (format) snprintf: 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. snprintf(spaceline, 100, fmtbuf, (ptrdiff_t)(chunk->base + i)); data/chezscheme-9.5.4+dfsg/c/prim5.c:774:9: [4] (shell) execl: 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. execl("/bin/sh", "/bin/sh", "-c", s, NULL); data/chezscheme-9.5.4+dfsg/c/scheme.c:797: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(bd[boot_count].path, path); data/chezscheme-9.5.4+dfsg/c/scheme.c:1079:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf, name); data/chezscheme-9.5.4+dfsg/c/version.h:446:17: [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. # define SYSTEM system data/chezscheme-9.5.4+dfsg/c/windows.c:299:23: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (flags & O_RDWR) access |= GENERIC_READ|GENERIC_WRITE; data/chezscheme-9.5.4+dfsg/c/windows.c:300:25: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (flags & O_RDONLY) access |= GENERIC_READ; data/chezscheme-9.5.4+dfsg/c/windows.c:301:25: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (flags & O_WRONLY) access |= GENERIC_WRITE; data/chezscheme-9.5.4+dfsg/c/windows.c:306:28: [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. hfile = CreateFile(path, access, 0, (SECURITY_ATTRIBUTES *)0, data/chezscheme-9.5.4+dfsg/c/windows.c:418:12: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return system(command); data/chezscheme-9.5.4+dfsg/examples/csocket.c:71:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(sun.sun_path, name); data/chezscheme-9.5.4+dfsg/examples/csocket.c:93:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(sun.sun_path, name); data/chezscheme-9.5.4+dfsg/mats/foreign1.c:58: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). return strcpy(dst, src); data/chezscheme-9.5.4+dfsg/c/expeditor.c:744:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((s = getenv("LINES")) != NULL) { data/chezscheme-9.5.4+dfsg/c/expeditor.c:753:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((s = getenv("COLUMNS")) != NULL) { data/chezscheme-9.5.4+dfsg/c/expeditor.c:937:30: [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. status = (display_name = getenv("DISPLAY")) data/chezscheme-9.5.4+dfsg/c/io.c:69:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((dir = getenv("HOME")) == NULL) data/chezscheme-9.5.4+dfsg/c/main.c:77:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. #define GETENV getenv data/chezscheme-9.5.4+dfsg/c/prim5.c:1348:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *s = getenv(name); data/chezscheme-9.5.4+dfsg/c/scheme.c:981:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. Sschemeheapdirs = getenv("SCHEMEHEAPDIRS"); data/chezscheme-9.5.4+dfsg/c/thread.h:43:36: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define s_thread_mutex_init(mutex) InitializeCriticalSection(mutex) data/chezscheme-9.5.4+dfsg/c/thread.h:44:37: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define s_thread_mutex_lock(mutex) (EnterCriticalSection(mutex), 0) data/chezscheme-9.5.4+dfsg/c/compress-io.c:65:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char in_buffer[LZ4_OUTPUT_PORT_IN_BUFFER_SIZE]; data/chezscheme-9.5.4+dfsg/c/compress-io.c:76:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char in_buffer[LZ4_INPUT_PORT_IN_BUFFER_SIZE]; data/chezscheme-9.5.4+dfsg/c/compress-io.c:77:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char out_buffer[LZ4_INPUT_PORT_OUT_BUFFER_SIZE]; data/chezscheme-9.5.4+dfsg/c/compress-io.c:82:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[0]; data/chezscheme-9.5.4+dfsg/c/compress-io.c:252:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[4]; data/chezscheme-9.5.4+dfsg/c/compress-io.c:290:18: [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 = WIN32_IZE(open)(path, O_RDONLY | GLZ_O_BINARY); data/chezscheme-9.5.4+dfsg/c/compress-io.c:445: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(buffer, lz4->out_buffer + lz4->out_pos, amt); data/chezscheme-9.5.4+dfsg/c/compress-io.c:515: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(lz4->in_buffer + lz4->in_pos, buffer, amt); data/chezscheme-9.5.4+dfsg/c/compress-io.c:564:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[1024]; data/chezscheme-9.5.4+dfsg/c/compress-io.c:597:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buffer[1]; data/chezscheme-9.5.4+dfsg/c/expeditor.c:80:10: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 wchar_t buf[10]; data/chezscheme-9.5.4+dfsg/c/expeditor.c:661:38: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ptr msg; int fd = STDIN_FD; int n; char buf[1]; wchar_t wch; size_t sz; data/chezscheme-9.5.4+dfsg/c/expeditor.c:1019:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PBPASTEBUFSIZE]; data/chezscheme-9.5.4+dfsg/c/expeditor.c:1044:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. locale_t old; char buf[MB_LEN_MAX]; size_t n; data/chezscheme-9.5.4+dfsg/c/fasl.c:401:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[16]; INT len; data/chezscheme-9.5.4+dfsg/c/fasl.c:543: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(s, f->next, avail); data/chezscheme-9.5.4+dfsg/c/fasl.c:552: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(s, f->next, n); data/chezscheme-9.5.4+dfsg/c/foreign.c:83: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(&BVIT(x, 0), s, n); data/chezscheme-9.5.4+dfsg/c/gcwrapper.c:409:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *spacename[max_space+1] = { alloc_space_names }; data/chezscheme-9.5.4+dfsg/c/io.c:58:9: [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(outpath, home, n1); data/chezscheme-9.5.4+dfsg/c/io.c:59:9: [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(outpath + n1, ip, n2); data/chezscheme-9.5.4+dfsg/c/io.c:76: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(userbuf, user_start, ip - user_start); data/chezscheme-9.5.4+dfsg/c/io.c:85: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(outpath, dir, n1); data/chezscheme-9.5.4+dfsg/c/io.c:86: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(outpath + n1, ip, n2); data/chezscheme-9.5.4+dfsg/c/io.c:96: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(outpath, inpath, n); data/chezscheme-9.5.4+dfsg/c/io.c:226:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&BVIT(bv,0), s, n); data/chezscheme-9.5.4+dfsg/c/io.c:256: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(&BVIT(bv,0), s, n); data/chezscheme-9.5.4+dfsg/c/new-io.c:418:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char u8buf[1024]; data/chezscheme-9.5.4+dfsg/c/new-io.c:426:7: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wbuf[256]; data/chezscheme-9.5.4+dfsg/c/prim5.c:245:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fmtbuf[FMTBUFSIZE]; data/chezscheme-9.5.4+dfsg/c/prim5.c:303:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fmtbuf[FMTBUFSIZE]; data/chezscheme-9.5.4+dfsg/c/prim5.c:349:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fmtbuf[FMTBUFSIZE]; data/chezscheme-9.5.4+dfsg/c/prim5.c:350:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *spacename[space_total+1] = { alloc_space_names, "bogus", "total" }; data/chezscheme-9.5.4+dfsg/c/prim5.c:351:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char spacechar[space_total+1] = { alloc_space_chars, '?', 't' }; data/chezscheme-9.5.4+dfsg/c/prim5.c:365:11: [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). out = fopen(outfn, "w"); data/chezscheme-9.5.4+dfsg/c/prim5.c:490:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char spaceline[100], genline[100]; data/chezscheme-9.5.4+dfsg/c/prim5.c:1734:6: [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(dstaddr, srcaddr, cnt); data/chezscheme-9.5.4+dfsg/c/prim5.c:1744:6: [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(dstaddr, srcaddr, cnt); data/chezscheme-9.5.4+dfsg/c/prim5.c:1919:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t dllw[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/prim5.c:2057:19: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if ((outwords = MultiByteToWideChar(cp, 0, &BVIT(inbv,0), (int)inbytes, NULL, 0)) == 0) data/chezscheme-9.5.4+dfsg/c/prim5.c:2062:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(cp, 0, &BVIT(inbv,0), (int)inbytes, (wchar_t *)&BVIT(outbv, 0), outwords) == 0) data/chezscheme-9.5.4+dfsg/c/print.c:249:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256], *s; data/chezscheme-9.5.4+dfsg/c/scheme.c:449:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/scheme.c:493:15: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t exepath[PATH_MAX]; DWORD n; data/chezscheme-9.5.4+dfsg/c/scheme.c:566:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/scheme.c:581:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathbuf[PATH_MAX], buf[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/scheme.c:757:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 *sep; char *wastebuf[8]; data/chezscheme-9.5.4+dfsg/c/scheme.c:804:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1]; data/chezscheme-9.5.4+dfsg/c/scheme.c:1074:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/stats.c:96:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bin[16]; data/chezscheme-9.5.4+dfsg/c/stats.c:377:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[26]; data/chezscheme-9.5.4+dfsg/c/thread.c:67: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((void *)tc, (void *)p_tc, size_tc); data/chezscheme-9.5.4+dfsg/c/version.h:428:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). # define OPEN open data/chezscheme-9.5.4+dfsg/c/windows.c:257: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[(sizeof(dwMessageId) * 2) + 3]; data/chezscheme-9.5.4+dfsg/c/windows.c:349:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:350:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,pathname,-1,wpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:357:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:358:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,pathname,-1,wpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:365:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:366:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,pathname,-1,wpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:373:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:374:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,pathname,-1,wpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:381:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t woldpathname[PATH_MAX], wnewpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:382:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,oldpathname,-1,woldpathname,PATH_MAX) == 0 || data/chezscheme-9.5.4+dfsg/c/windows.c:383:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8,0,newpathname,-1,wnewpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:390:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:391:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,pathname,-1,wpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:408:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:409:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,pathname,-1,wpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:416:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wcommand[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:417:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,command,-1,wcommand,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:424:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wpathname[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:425:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_UTF8,0,pathname,-1,wpathname,PATH_MAX) == 0) data/chezscheme-9.5.4+dfsg/c/windows.c:442:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wbuffer[PATH_MAX]; data/chezscheme-9.5.4+dfsg/c/windows.c:470:13: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int len = MultiByteToWideChar(CP_UTF8, 0, arg, -1, NULL, 0); data/chezscheme-9.5.4+dfsg/c/windows.c:473:12: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (0 == MultiByteToWideChar(CP_UTF8, 0, arg, -1, argw, len)) { data/chezscheme-9.5.4+dfsg/c/windows.c:483:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buffer[256]; data/chezscheme-9.5.4+dfsg/mats/foreign2.c:450:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8] = { 1, 2, 3, 4, 0, 0, 0, 0 }; data/chezscheme-9.5.4+dfsg/mats/foreign3.c:34:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char c[10]="ABCDEFGH"; data/chezscheme-9.5.4+dfsg/mats/foreign3.c:229:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/chezscheme-9.5.4+dfsg/c/alloc.c:668:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (n < 0) n = strlen(s); data/chezscheme-9.5.4+dfsg/c/alloc.c:706:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (n < 0) n = strlen(s); data/chezscheme-9.5.4+dfsg/c/compress-io.c:260:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = WIN32_IZE(read)(fd, (char*)buffer + pos, 4 - pos); data/chezscheme-9.5.4+dfsg/c/compress-io.c:369:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in_avail = WIN32_IZE(read)(lz4->fd, lz4->in_buffer, LZ4_INPUT_PORT_IN_BUFFER_SIZE); data/chezscheme-9.5.4+dfsg/c/foreign.c:81:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). iptr n = strlen(s) + 1; data/chezscheme-9.5.4+dfsg/c/foreign.c:91: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). h = n = strlen(s); data/chezscheme-9.5.4+dfsg/c/gc.c:803:73: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void)printf("max_cg = %x; go? ", max_cg); (void)fflush(stdout); (void)getc(stdin); data/chezscheme-9.5.4+dfsg/c/intern.c:233: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). iptr n = strlen((const char *)s); data/chezscheme-9.5.4+dfsg/c/io.c:52: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). n1 = strlen(home); data/chezscheme-9.5.4+dfsg/c/io.c:53: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). n2 = strlen(ip) + 1; data/chezscheme-9.5.4+dfsg/c/io.c:82: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). n1 = strlen(dir); data/chezscheme-9.5.4+dfsg/c/io.c:83: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). n2 = strlen(ip) + 1; data/chezscheme-9.5.4+dfsg/c/io.c:94:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen(inpath) + 1; data/chezscheme-9.5.4+dfsg/c/io.c:223:12: [1] (buffer) wcslen: 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 ((n = wcslen(s)) == 0) return S_G.null_bytevector; data/chezscheme-9.5.4+dfsg/c/io.c:254: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). if ((n = strlen(s)) == 0) return S_G.null_bytevector; data/chezscheme-9.5.4+dfsg/c/itest.c:47:31: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((i = digit_value((c = getchar()), r)) == -1) { data/chezscheme-9.5.4+dfsg/c/itest.c:58:13: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ICHAR c = getchar(); data/chezscheme-9.5.4+dfsg/c/itest.c:65:17: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch (getchar()) { data/chezscheme-9.5.4+dfsg/c/itest.c:77:17: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ICHAR c = getchar(); data/chezscheme-9.5.4+dfsg/c/itest.c:89:15: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/chezscheme-9.5.4+dfsg/c/itest.c:91:17: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/chezscheme-9.5.4+dfsg/c/itest.c:94:17: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/chezscheme-9.5.4+dfsg/c/itest.c:108:34: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((i = digit_value((c2 = getchar()), 10)) == -1) { data/chezscheme-9.5.4+dfsg/c/prim5.c:263: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). if (addrwidth < (INT)strlen(addrtitle)) addrwidth = (INT)strlen(addrtitle); data/chezscheme-9.5.4+dfsg/c/prim5.c:263:60: [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 (addrwidth < (INT)strlen(addrtitle)) addrwidth = (INT)strlen(addrtitle); data/chezscheme-9.5.4+dfsg/c/prim5.c:288: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). if (addrwidth < (INT)strlen(addrtitle) + 1) addrwidth = (INT)strlen(addrtitle) + 1; data/chezscheme-9.5.4+dfsg/c/prim5.c:288:64: [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 (addrwidth < (INT)strlen(addrtitle) + 1) addrwidth = (INT)strlen(addrtitle) + 1; data/chezscheme-9.5.4+dfsg/c/prim5.c:320: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). if (addrwidth < (INT)strlen(addrtitle)) addrwidth = (INT)strlen(addrtitle); data/chezscheme-9.5.4+dfsg/c/prim5.c:320:60: [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 (addrwidth < (INT)strlen(addrtitle)) addrwidth = (INT)strlen(addrtitle); data/chezscheme-9.5.4+dfsg/c/prim5.c:322:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (byteswidth < (INT)strlen(bytestitle)) byteswidth = (INT)strlen(bytestitle); data/chezscheme-9.5.4+dfsg/c/prim5.c:322:63: [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 (byteswidth < (INT)strlen(bytestitle)) byteswidth = (INT)strlen(bytestitle); data/chezscheme-9.5.4+dfsg/c/prim5.c:710: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). size_t n = strlen(comspec) + strlen(s) + 7; data/chezscheme-9.5.4+dfsg/c/prim5.c:710:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen(comspec) + strlen(s) + 7; data/chezscheme-9.5.4+dfsg/c/prim5.c:1388:73: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define display(s) { const char *S = (s); if (WRITE(1, S, (unsigned int)strlen(S))) {} } data/chezscheme-9.5.4+dfsg/c/prim5.c:1929: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). n = strlen(what) + strlen(dll) + 17; data/chezscheme-9.5.4+dfsg/c/prim5.c:1929: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). n = strlen(what) + strlen(dll) + 17; data/chezscheme-9.5.4+dfsg/c/scheme.c:280: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(VERSION)+1 > HEAP_VERSION_LENGTH) { data/chezscheme-9.5.4+dfsg/c/scheme.c:284: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(MACHINE_TYPE)+1 > HEAP_MACHID_LENGTH) { data/chezscheme-9.5.4+dfsg/c/scheme.c:588:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) >= PATH_MAX) { data/chezscheme-9.5.4+dfsg/c/scheme.c:986:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (*Sschemeheapdirs != 0 && Sschemeheapdirs[strlen(Sschemeheapdirs)-1] == SEARCHPATHSEP) { data/chezscheme-9.5.4+dfsg/c/scheme.c:1067:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) >= PATH_MAX) { data/chezscheme-9.5.4+dfsg/c/scheme.c:1077: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). n = strlen(name) - 4; data/chezscheme-9.5.4+dfsg/c/schsig.c:377:13: [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(who) == 0) data/chezscheme-9.5.4+dfsg/c/schsig.c:387:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Scons((strlen(who) == 0 ? Sfalse : Sstring_utf8(who,-1)), data/chezscheme-9.5.4+dfsg/c/version.h:431:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define READ read data/chezscheme-9.5.4+dfsg/c/windows.c:145:15: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = (wcslen(val) + 1) * sizeof(wchar_t); data/chezscheme-9.5.4+dfsg/examples/csocket.c:42:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(fd, buf, n); data/chezscheme-9.5.4+dfsg/mats/cat_flush.c:32:15: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getchar()) != EOF) { data/chezscheme-9.5.4+dfsg/mats/foreign3.c:233:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, s, 9); ANALYSIS SUMMARY: Hits = 169 Lines analyzed = 38790 in approximately 1.24 seconds (31174 lines/second) Physical Source Lines of Code (SLOC) = 32546 Hits@level = [0] 315 [1] 49 [2] 80 [3] 9 [4] 30 [5] 1 Hits@level+ = [0+] 484 [1+] 169 [2+] 120 [3+] 40 [4+] 31 [5+] 1 Hits/KSLOC@level+ = [0+] 14.8713 [1+] 5.19265 [2+] 3.68709 [3+] 1.22903 [4+] 0.952498 [5+] 0.0307257 Dot directories skipped = 2 (--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.