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/vtwm-5.4.7/gc.h Examining data/vtwm-5.4.7/resize.c Examining data/vtwm-5.4.7/add_window.c Examining data/vtwm-5.4.7/iconmgr.h Examining data/vtwm-5.4.7/resize.h Examining data/vtwm-5.4.7/regions.c Examining data/vtwm-5.4.7/applets.c Examining data/vtwm-5.4.7/regions.h Examining data/vtwm-5.4.7/icons.c Examining data/vtwm-5.4.7/twm.h Examining data/vtwm-5.4.7/util.h Examining data/vtwm-5.4.7/doors.h Examining data/vtwm-5.4.7/add_window.h Examining data/vtwm-5.4.7/screen.h Examining data/vtwm-5.4.7/sound.c Examining data/vtwm-5.4.7/sound.h Examining data/vtwm-5.4.7/contrib/nexpm/nexpm.c Examining data/vtwm-5.4.7/contrib/nexpm/patchlevel.h Examining data/vtwm-5.4.7/parse.c Examining data/vtwm-5.4.7/cursor.c Examining data/vtwm-5.4.7/desktop.h Examining data/vtwm-5.4.7/parse.h Examining data/vtwm-5.4.7/version.c Examining data/vtwm-5.4.7/list.h Examining data/vtwm-5.4.7/version.h Examining data/vtwm-5.4.7/gc.c Examining data/vtwm-5.4.7/menus.h Examining data/vtwm-5.4.7/desktop.c Examining data/vtwm-5.4.7/doors.c Examining data/vtwm-5.4.7/events.c Examining data/vtwm-5.4.7/events.h Examining data/vtwm-5.4.7/iconmgr.c Examining data/vtwm-5.4.7/list.c Examining data/vtwm-5.4.7/menus.c Examining data/vtwm-5.4.7/twm.c Examining data/vtwm-5.4.7/util.c FINAL RESULTS: data/vtwm-5.4.7/doors.c:422:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(d->name, "%*s", count, ptr); data/vtwm-5.4.7/iconmgr.c:200:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, "%s Icon Manager", p->name); data/vtwm-5.4.7/iconmgr.c:201:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str1, "%s Icons", p->name); data/vtwm-5.4.7/menus.c:2352:4: [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(*my_argv, my_argv); data/vtwm-5.4.7/menus.c:3893:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp, action); data/vtwm-5.4.7/menus.c:3901:10: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf (ptr, "%s", tmp) == 1) { data/vtwm-5.4.7/menus.c:4807:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(es,s); data/vtwm-5.4.7/menus.c:4825:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(es,append_this); /* don't block the window manager */ data/vtwm-5.4.7/menus.c:4833: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 (oldDisplay, doisplay); data/vtwm-5.4.7/menus.c:4844:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (buf, ds); data/vtwm-5.4.7/menus.c:4853: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. (void) system (es); /* DSE */ data/vtwm-5.4.7/menus.c:4857:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (buf, "DISPLAY=%s", oldDisplay); data/vtwm-5.4.7/menus.c:5210:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(Info[n++], "%s", Version); data/vtwm-5.4.7/menus.c:5228:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(Info[n++], "Name: \"%s\"", t->full_name); data/vtwm-5.4.7/menus.c:5229:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(Info[n++], "Class.res_name: \"%s\"", t->class.res_name); data/vtwm-5.4.7/menus.c:5230:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(Info[n++], "Class.res_class: \"%s\"", t->class.res_class); data/vtwm-5.4.7/menus.c:5249:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(Info[n++], "X Server: %s Version %d.%d Release %d", data/vtwm-5.4.7/menus.c:5260:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(Info[n++], "%s", lastmake[i++]); data/vtwm-5.4.7/menus.c:6400:2: [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(*Argv, Argv); data/vtwm-5.4.7/parse.c:182:15: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (tmpfilename, "%s/.vtwmrc.%d", data/vtwm-5.4.7/parse.c:201:15: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (tmpfilename, "%s/.twmrc.%d", data/vtwm-5.4.7/parse.c:220: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. if (m4_preprocess && (access(cp, R_OK) == 0) ) { data/vtwm-5.4.7/parse.c:222:16: [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. twmrc = popen(m4_cmdline, "r"); data/vtwm-5.4.7/parse.c:2288:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(m4_cmdline, m4_lines[0], Home, Scr->MyDisplayWidth, data/vtwm-5.4.7/parse.c:2291:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(m4_cmdline + cmd_len, m4_lines[1], Scr->d_depth, data/vtwm-5.4.7/parse.c:2294:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(m4_cmdline + cmd_len, m4_lines[2], is_i18n, is_color, data/vtwm-5.4.7/parse.c:2298:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(m4_cmdline + cmd_len, m4_lines[3], is_regex, env_username, data/vtwm-5.4.7/parse.c:2301:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(m4_cmdline + cmd_len, m4_lines[4], hostname, ProtocolVersion(dpy)); data/vtwm-5.4.7/parse.c:2303:3: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(m4_cmdline + cmd_len, m4_lines[5], ProtocolRevision(dpy), data/vtwm-5.4.7/parse.c:2313:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(m4_cmdline + cmd_len, " < %s", cp); data/vtwm-5.4.7/twm.c:234:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, data/vtwm-5.4.7/twm.c:928:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s/%s", Home, PidName); data/vtwm-5.4.7/twm.c:1447:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fn, "%s/%s", Home, PidName); data/vtwm-5.4.7/util.c:568:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (newname, "%s/%s", Home, &name[1]); data/vtwm-5.4.7/util.c:652:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (bigname, "%s/%s", Scr->IconDirectory, name); data/vtwm-5.4.7/util.c:753:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void)sprintf(bigname, "%s/%s", path, name); data/vtwm-5.4.7/util.c:817:14: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (bigname, "%s/%s", Scr->IconDirectory, name); data/vtwm-5.4.7/util.c:1211:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(basename2, "%s,*", font->name); data/vtwm-5.4.7/util.c:1223:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(basename3, "%s,*", Scr->DefaultFont.name); data/vtwm-5.4.7/util.c:2734:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.%dx%d.%Xx%X", name, data/vtwm-5.4.7/util.c:2776:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.%Xx%X.%d", data/vtwm-5.4.7/menus.c:4831: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. doisplay=getenv("DISPLAY"); data/vtwm-5.4.7/parse.c:2261:22: [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((env_username = getenv("LOGNAME")) == NULL){ data/vtwm-5.4.7/twm.c:287:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. Home = getenv("HOME"); data/vtwm-5.4.7/twm.h:489:48: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. extern char *malloc(), *calloc(), *realloc(), *getenv(); data/vtwm-5.4.7/contrib/nexpm/nexpm.c:204:33: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). symbols[numsymbols++].pixel = atol(argv[++n]); data/vtwm-5.4.7/doors.c:379:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/vtwm-5.4.7/doors.c:381:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "+%d+%d", Scr->VirtualDesktopX, Scr->VirtualDesktopY); data/vtwm-5.4.7/events.c:1591: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(a, twin->icon_name, slen); data/vtwm-5.4.7/events.c:1592:4: [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(a + slen, "..."); data/vtwm-5.4.7/gc.c:67: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 dashlist [2] = {1, 1}; data/vtwm-5.4.7/iconmgr.c:137: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 str[100]; data/vtwm-5.4.7/iconmgr.c:138: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 str1[100]; data/vtwm-5.4.7/list.c:78: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 buffer[256]; data/vtwm-5.4.7/menus.c:1564:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char colname [32]; data/vtwm-5.4.7/menus.c:1569:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (colname, "#%04x%04x%04x", data/vtwm-5.4.7/menus.c:1581:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char colname [32]; data/vtwm-5.4.7/menus.c:1585:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (colname, "#%04x%04x%04x", data/vtwm-5.4.7/menus.c:1853:43: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. AddToMenu(menu, WindowNames[i]->name, (char *)WindowNames[i], data/vtwm-5.4.7/menus.c:2155:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[200]; data/vtwm-5.4.7/menus.c:2157:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[MAX_FILE_SIZE]; data/vtwm-5.4.7/menus.c:3905:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (ptr, 0); data/vtwm-5.4.7/menus.c:3934:17: [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). WarpToScreen (atoi (action), 0); data/vtwm-5.4.7/menus.c:4182:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(action, 0); data/vtwm-5.4.7/menus.c:4259:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). PanRealScreen(0, (atoi(action) * Scr->MyDisplayHeight) / 100 data/vtwm-5.4.7/menus.c:4263:20: [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). PanRealScreen(-((atoi(action) * Scr->MyDisplayWidth) / 100), 0 data/vtwm-5.4.7/menus.c:4267: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). PanRealScreen((atoi(action) * Scr->MyDisplayWidth) / 100, 0 data/vtwm-5.4.7/menus.c:4271:23: [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). PanRealScreen(0, -((atoi(action) * Scr->MyDisplayHeight) / 100) data/vtwm-5.4.7/menus.c:4798: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 buf[256]; data/vtwm-5.4.7/menus.c:4801: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 oldDisplay[256]; data/vtwm-5.4.7/menus.c:4843:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy (buf, "DISPLAY="); data/vtwm-5.4.7/menus.c:4848:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf (dot1, ".%d", Scr->screen); data/vtwm-5.4.7/menus.c:5232:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf(Info[n++], "Geometry/root: %dx%d+%d+%d", wwidth, wheight, x, y); data/vtwm-5.4.7/menus.c:5233:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf(Info[n++], "Border width: %d", bw); data/vtwm-5.4.7/menus.c:5234:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf(Info[n++], "Depth: %d", depth); data/vtwm-5.4.7/menus.c:5291: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. (void) sprintf(Info[n++], data/vtwm-5.4.7/menus.c:5299:12: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf(Info[n++], "Click to dismiss..."); data/vtwm-5.4.7/menus.c:6459: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 str [100]; data/vtwm-5.4.7/menus.c:6482:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (str, "%+6d %-+6d", x, y); data/vtwm-5.4.7/parse.c:68: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 buff[BUF_LEN+1]; data/vtwm-5.4.7/parse.c:69: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 overflowbuff[20]; /* really only need one */ data/vtwm-5.4.7/parse.c:153: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 tmpfilename[257]; data/vtwm-5.4.7/parse.c:227:16: [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). twmrc = fopen (cp, "r"); data/vtwm-5.4.7/parse.c:231: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). twmrc = fopen (cp, "r"); data/vtwm-5.4.7/parse.c:235:18: [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 (cp) twmrc = fopen (cp, "r"); data/vtwm-5.4.7/parse.c:2143: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 *m4_lines[6] = { data/vtwm-5.4.7/parse.c:2310:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(m4_cmdline + cmd_len, " %*.*s", opt_len, opt_len, m4_option); data/vtwm-5.4.7/resize.c:794: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 str[100]; data/vtwm-5.4.7/resize.c:845:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (str, "%5d x %-5d", dwidth, dheight); data/vtwm-5.4.7/sound.c:93: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 sound_host[MAXHOSTNAMELEN + 1] = ""; data/vtwm-5.4.7/twm.c:89:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char Info[INFO_LINES][INFO_SIZE]; /* info strings to print */ data/vtwm-5.4.7/twm.c:925:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10], *fn = malloc(HomeLen + strlen(PidName) + 2); data/vtwm-5.4.7/twm.c:929:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(fn, data/vtwm-5.4.7/twm.c:932:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d\n", getpid()); data/vtwm-5.4.7/util.c:1148: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 clearcol [32], darkcol [32]; data/vtwm-5.4.7/util.c:1155:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (clearcol, "#%04x%04x%04x", data/vtwm-5.4.7/util.c:1159:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (darkcol, "#%04x%04x%04x", data/vtwm-5.4.7/util.c:2725: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 fullname [256]; data/vtwm-5.4.7/util.c:3265: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(a, tmp_win->name, slen); data/vtwm-5.4.7/util.c:3266:4: [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(a + slen, "..."); data/vtwm-5.4.7/add_window.c:270:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). namelen = strlen (tmp_win->name); data/vtwm-5.4.7/doors.c:182: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). strlen(tmp_door->name)) data/vtwm-5.4.7/events.c:472:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(sigselfpipe[0], &signum, 1); data/vtwm-5.4.7/events.c:871: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). len = strlen(key->win_name); data/vtwm-5.4.7/events.c:1076:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (Tmp_win->name)); data/vtwm-5.4.7/events.c:1343: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). Tmp_win->icon_name, strlen(Tmp_win->icon_name)); data/vtwm-5.4.7/events.c:1437:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). door->name, strlen(door->name)); data/vtwm-5.4.7/events.c:1476: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). door->name, strlen(door->name)); data/vtwm-5.4.7/events.c:1492: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). door->name, strlen(door->name)); data/vtwm-5.4.7/events.c:1523: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). int i, j, slen = strlen(twin->icon_name); data/vtwm-5.4.7/events.c:1733: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). j = strlen(Info[i]); data/vtwm-5.4.7/events.c:1931:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name, strlen(name)); data/vtwm-5.4.7/icons.c:362: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). tmp_win->icon_name, strlen(tmp_win->icon_name)); data/vtwm-5.4.7/icons.c:818:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp_win->icon_name, strlen(tmp_win->icon_name)); data/vtwm-5.4.7/menus.c:587:72: [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). Scr->NormalGC, mi->x + Scr->MenuBevelWidth, text_y, mi->item, mi->strlen); data/vtwm-5.4.7/menus.c:627:61: [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). gc, mi->x + Scr->MenuBevelWidth, text_y, mi->item, mi->strlen); data/vtwm-5.4.7/menus.c:733:49: [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). Scr->NormalGC, mi->x, text_y, mi->item, mi->strlen); data/vtwm-5.4.7/menus.c:779:27: [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). text_y, mi->item, mi->strlen); data/vtwm-5.4.7/menus.c:808:39: [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). gc, mi->x, text_y, mi->item, mi->strlen); data/vtwm-5.4.7/menus.c:902:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Scr->NormalGC, mi->x, text_y, mi->item, mi->strlen); data/vtwm-5.4.7/menus.c:1335: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). tmp->strlen = strlen(item); data/vtwm-5.4.7/menus.c:1357:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). item, tmp->strlen); data/vtwm-5.4.7/menus.c:1476: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). cur->item, cur->strlen); data/vtwm-5.4.7/menus.c:3894:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(tmp, "\n"); data/vtwm-5.4.7/menus.c:3895: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). XStoreBytes(dpy, tmp, strlen(tmp)); data/vtwm-5.4.7/menus.c:3907:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read (fd, buff, MAX_FILE_SIZE - 1); data/vtwm-5.4.7/menus.c:4054: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). len = strlen(action); data/vtwm-5.4.7/menus.c:4185:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(fd, buff, MAX_FILE_SIZE - 1); data/vtwm-5.4.7/menus.c:4806:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *es = (char *)malloc(strlen(s)+strlen(append_this)+1); data/vtwm-5.4.7/menus.c:4806: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 *es = (char *)malloc(strlen(s)+strlen(append_this)+1); data/vtwm-5.4.7/menus.c:4813:27: [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). while ( isspace ( es[strlen(es)-1] ) ) data/vtwm-5.4.7/menus.c:4815:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). es[strlen(es)-1] = '\0'; data/vtwm-5.4.7/menus.c:4817:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). switch ( es[strlen(es)-1] ) /* last character */ data/vtwm-5.4.7/menus.c:4820:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). es[strlen(es)-1] = '\0'; /* remove the semicolon */ data/vtwm-5.4.7/menus.c:4847:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!dot1) dot1 = colon + strlen (colon); /* if not there, append */ data/vtwm-5.4.7/menus.c:5319:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). Info[i], strlen(Info[i])); data/vtwm-5.4.7/menus.c:5787:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(class); data/vtwm-5.4.7/menus.c:5831: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(class)) data/vtwm-5.4.7/menus.c:5838: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). if (i && !strncmp(class, ch.res_class, strlen(class))) data/vtwm-5.4.7/menus.c:5848: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(class) || !strncmp(class, "VTWM", 4)) data/vtwm-5.4.7/menus.c:6210:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(class); data/vtwm-5.4.7/menus.c:6228: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). int i, len = strlen(class); data/vtwm-5.4.7/menus.c:6483: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). i = strlen (str); data/vtwm-5.4.7/menus.h:73: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). short strlen; /* strlen(item) */ data/vtwm-5.4.7/parse.c:313:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buff); data/vtwm-5.4.7/parse.c:2160:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). opt_len = strlen(m4_option); data/vtwm-5.4.7/parse.c:2272: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). for (i = 0; i < 6; i++) cmd_len += strlen(m4_lines[i]); data/vtwm-5.4.7/parse.c:2273: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). cmd_len += M4_MAXDIGITS * 9 + HomeLen + strlen(vc) + strlen(is_xpm) + data/vtwm-5.4.7/parse.c:2273:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmd_len += M4_MAXDIGITS * 9 + HomeLen + strlen(vc) + strlen(is_xpm) + data/vtwm-5.4.7/parse.c:2274: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). strlen(is_color) + strlen(env_username) + strlen(server) + data/vtwm-5.4.7/parse.c:2274: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). strlen(is_color) + strlen(env_username) + strlen(server) + data/vtwm-5.4.7/parse.c:2274:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(is_color) + strlen(env_username) + strlen(server) + data/vtwm-5.4.7/parse.c:2275: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). strlen(client) + strlen(hostname) + strlen(ServerVendor(dpy)) + data/vtwm-5.4.7/parse.c:2275: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). strlen(client) + strlen(hostname) + strlen(ServerVendor(dpy)) + data/vtwm-5.4.7/parse.c:2275: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). strlen(client) + strlen(hostname) + strlen(ServerVendor(dpy)) + data/vtwm-5.4.7/parse.c:2276: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). strlen(is_sound) + strlen(is_regex) + strlen(is_i18n) + strlen(cp) + 16; data/vtwm-5.4.7/parse.c:2276: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). strlen(is_sound) + strlen(is_regex) + strlen(is_i18n) + strlen(cp) + 16; data/vtwm-5.4.7/parse.c:2276:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(is_sound) + strlen(is_regex) + strlen(is_i18n) + strlen(cp) + 16; data/vtwm-5.4.7/parse.c:2276: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). strlen(is_sound) + strlen(is_regex) + strlen(is_i18n) + strlen(cp) + 16; data/vtwm-5.4.7/parse.c:2290: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). cmd_len = strlen(m4_cmdline); data/vtwm-5.4.7/parse.c:2293: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). cmd_len = strlen(m4_cmdline); data/vtwm-5.4.7/parse.c:2297: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). cmd_len = strlen(m4_cmdline); data/vtwm-5.4.7/parse.c:2300: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). cmd_len = strlen(m4_cmdline); data/vtwm-5.4.7/parse.c:2302: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). cmd_len = strlen(m4_cmdline); data/vtwm-5.4.7/parse.c:2307: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). cmd_len = strlen(m4_cmdline); data/vtwm-5.4.7/parse.c:2311:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmd_len = strlen(m4_cmdline); data/vtwm-5.4.7/resize.c:846: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). i = strlen (str); data/vtwm-5.4.7/sound.c:128:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sound_host, rplay_default_host(), MAXHOSTNAMELEN); data/vtwm-5.4.7/sound.c:310:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sound_host, host, MAXHOSTNAMELEN); data/vtwm-5.4.7/twm.c:291:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). HomeLen = strlen(Home); data/vtwm-5.4.7/twm.c:925:39: [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[10], *fn = malloc(HomeLen + strlen(PidName) + 2); data/vtwm-5.4.7/twm.c:933:27: [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). err = write(fd, buf, strlen(buf)); data/vtwm-5.4.7/twm.c:1446: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). fn = malloc(HomeLen + strlen(PidName) + 2); data/vtwm-5.4.7/util.c:562:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newname = (char *) malloc (HomeLen + strlen(name) + 2); data/vtwm-5.4.7/util.c:566:27: [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). ProgramName, HomeLen + strlen(name) + 2, Home, &name[1]); data/vtwm-5.4.7/util.c:644:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bigname = (char *) malloc (strlen(name) + strlen(Scr->IconDirectory) + data/vtwm-5.4.7/util.c:644:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bigname = (char *) malloc (strlen(name) + strlen(Scr->IconDirectory) + data/vtwm-5.4.7/util.c:748:35: [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 (!(bigname = (char *)malloc(strlen(name) + strlen(path) + 2))) data/vtwm-5.4.7/util.c:748:50: [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 (!(bigname = (char *)malloc(strlen(name) + strlen(path) + 2))) data/vtwm-5.4.7/util.c:810:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). bigname = (char *) malloc (strlen(name) + strlen(Scr->IconDirectory) + 2); data/vtwm-5.4.7/util.c:810:49: [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). bigname = (char *) malloc (strlen(name) + strlen(Scr->IconDirectory) + 2); data/vtwm-5.4.7/util.c:1210:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((basename2 = (char *)malloc(strlen(font->name) + 3))) data/vtwm-5.4.7/util.c:1222:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(Scr->DefaultFont.name) + 3))) data/vtwm-5.4.7/util.c:3176: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). tmp_win->icon_name, strlen(tmp_win->icon_name)); data/vtwm-5.4.7/util.c:3195: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). int i, j, slen = strlen(tmp_win->name); ANALYSIS SUMMARY: Hits = 185 Lines analyzed = 31938 in approximately 0.74 seconds (43347 lines/second) Physical Source Lines of Code (SLOC) = 20510 Hits@level = [0] 143 [1] 85 [2] 55 [3] 4 [4] 41 [5] 0 Hits@level+ = [0+] 328 [1+] 185 [2+] 100 [3+] 45 [4+] 41 [5+] 0 Hits/KSLOC@level+ = [0+] 15.9922 [1+] 9.01999 [2+] 4.87567 [3+] 2.19405 [4+] 1.99902 [5+] 0 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.