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/libxt-1.2.0/util/makestrs.c Examining data/libxt-1.2.0/include/X11/CompositeP.h Examining data/libxt-1.2.0/include/X11/VendorP.h Examining data/libxt-1.2.0/include/X11/PassivGraI.h Examining data/libxt-1.2.0/include/X11/Intrinsic.h Examining data/libxt-1.2.0/include/X11/IntrinsicI.h Examining data/libxt-1.2.0/include/X11/RectObjP.h Examining data/libxt-1.2.0/include/X11/CreateI.h Examining data/libxt-1.2.0/include/X11/TranslateI.h Examining data/libxt-1.2.0/include/X11/CoreP.h Examining data/libxt-1.2.0/include/X11/HookObjI.h Examining data/libxt-1.2.0/include/X11/InitialI.h Examining data/libxt-1.2.0/include/X11/ConstrainP.h Examining data/libxt-1.2.0/include/X11/ObjectP.h Examining data/libxt-1.2.0/include/X11/Vendor.h Examining data/libxt-1.2.0/include/X11/SelectionI.h Examining data/libxt-1.2.0/include/X11/Object.h Examining data/libxt-1.2.0/include/X11/IntrinsicP.h Examining data/libxt-1.2.0/include/X11/EventI.h Examining data/libxt-1.2.0/include/X11/ConvertI.h Examining data/libxt-1.2.0/include/X11/ThreadsI.h Examining data/libxt-1.2.0/include/X11/VarargsI.h Examining data/libxt-1.2.0/include/X11/Composite.h Examining data/libxt-1.2.0/include/X11/RectObj.h Examining data/libxt-1.2.0/include/X11/ShellP.h Examining data/libxt-1.2.0/include/X11/Constraint.h Examining data/libxt-1.2.0/include/X11/ResConfigP.h Examining data/libxt-1.2.0/include/X11/ShellI.h Examining data/libxt-1.2.0/include/X11/CallbackI.h Examining data/libxt-1.2.0/include/X11/Core.h Examining data/libxt-1.2.0/include/X11/Xtos.h Examining data/libxt-1.2.0/include/X11/ResourceI.h Examining data/libxt-1.2.0/test/Event.c Examining data/libxt-1.2.0/test/Converters.c Examining data/libxt-1.2.0/test/Alloc.c Examining data/libxt-1.2.0/src/VarGet.c Examining data/libxt-1.2.0/src/Functions.c Examining data/libxt-1.2.0/src/NextEvent.c Examining data/libxt-1.2.0/src/Constraint.c Examining data/libxt-1.2.0/src/EventUtil.c Examining data/libxt-1.2.0/src/RectObj.c Examining data/libxt-1.2.0/src/Threads.c Examining data/libxt-1.2.0/src/TMaction.c Examining data/libxt-1.2.0/src/Event.c Examining data/libxt-1.2.0/src/TMstate.c Examining data/libxt-1.2.0/src/GetActKey.c Examining data/libxt-1.2.0/src/GetValues.c Examining data/libxt-1.2.0/src/sharedlib.c Examining data/libxt-1.2.0/src/Composite.c Examining data/libxt-1.2.0/src/TMparse.c Examining data/libxt-1.2.0/src/Hooks.c Examining data/libxt-1.2.0/src/Destroy.c Examining data/libxt-1.2.0/src/Initialize.c Examining data/libxt-1.2.0/src/HookObj.c Examining data/libxt-1.2.0/src/Error.c Examining data/libxt-1.2.0/src/ClickTime.c Examining data/libxt-1.2.0/src/SetWMCW.c Examining data/libxt-1.2.0/src/Vendor.c Examining data/libxt-1.2.0/src/Pointer.c Examining data/libxt-1.2.0/src/Geometry.c Examining data/libxt-1.2.0/src/PassivGrab.c Examining data/libxt-1.2.0/src/Converters.c Examining data/libxt-1.2.0/src/Varargs.c Examining data/libxt-1.2.0/src/Object.c Examining data/libxt-1.2.0/src/SetSens.c Examining data/libxt-1.2.0/src/TMgrab.c Examining data/libxt-1.2.0/src/Create.c Examining data/libxt-1.2.0/src/ArgList.c Examining data/libxt-1.2.0/src/Intrinsic.c Examining data/libxt-1.2.0/src/Keyboard.c Examining data/libxt-1.2.0/src/Display.c Examining data/libxt-1.2.0/src/Shell.c Examining data/libxt-1.2.0/src/Manage.c Examining data/libxt-1.2.0/src/PopupCB.c Examining data/libxt-1.2.0/src/Resources.c Examining data/libxt-1.2.0/src/GetResList.c Examining data/libxt-1.2.0/src/Popup.c Examining data/libxt-1.2.0/src/TMkey.c Examining data/libxt-1.2.0/src/ResConfig.c Examining data/libxt-1.2.0/src/Selection.c Examining data/libxt-1.2.0/src/SetValues.c Examining data/libxt-1.2.0/src/Callback.c Examining data/libxt-1.2.0/src/Core.c Examining data/libxt-1.2.0/src/GCManager.c Examining data/libxt-1.2.0/src/ActionHook.c Examining data/libxt-1.2.0/src/VarCreate.c Examining data/libxt-1.2.0/src/TMprint.c Examining data/libxt-1.2.0/src/Convert.c Examining data/libxt-1.2.0/src/Alloc.c FINAL RESULTS: data/libxt-1.2.0/include/X11/Intrinsic.h:1910:23: [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). ((str) != NULL ? (strcpy(XtMalloc((unsigned)strlen(str) + 1), str)) : NULL) data/libxt-1.2.0/src/Alloc.c:140:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(buf, sizeof(buf), format, ap); data/libxt-1.2.0/src/Alloc.c:155:6: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. if (vsnprintf(*new_string, (size_t) (len + 1), format, ap) < 0) data/libxt-1.2.0/src/Error.c:177:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(str_name, "%s.%s", name, type); data/libxt-1.2.0/src/Error.c:184:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(temp, "%s.%s", class, class); data/libxt-1.2.0/src/Error.c:258: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. (void) fprintf (stderr, buffer, data/libxt-1.2.0/src/Error.c:300:13: [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. (void) snprintf (message, BIGBUF, buffer, data/libxt-1.2.0/src/Initialize.c:356:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (dest, "%s%s", ptr1, (ptr2) ? ptr2 : ""); data/libxt-1.2.0/src/Initialize.c:441:9: [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). (void) strcat(filename, slashDotXdefaults); data/libxt-1.2.0/src/Initialize.c:578:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). (void) strcat(filename, slashDotXdefaultsDash); data/libxt-1.2.0/src/Intrinsic.c:339:6: [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(s, widget->core.name); data/libxt-1.2.0/src/Intrinsic.c:340: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(s + len_nm + 1, class_name); data/libxt-1.2.0/src/Intrinsic.c:859:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (path, F_OK) == 0) { data/libxt-1.2.0/src/Intrinsic.c:865:6: [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 (*pathret, path); data/libxt-1.2.0/src/Intrinsic.c:899:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (bufp, drive); data/libxt-1.2.0/src/Intrinsic.c:900: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 (bufp, path); data/libxt-1.2.0/src/Intrinsic.c:911: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 (bufp, drive); data/libxt-1.2.0/src/Intrinsic.c:912: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 (bufp, path); data/libxt-1.2.0/src/Intrinsic.c:931:6: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (bufp, path); data/libxt-1.2.0/src/Intrinsic.c:959:12: [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. ret = (access(path, R_OK) == 0 && /* exists and is readable */ data/libxt-1.2.0/src/Intrinsic.c:1311:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(p3, ch+1); data/libxt-1.2.0/src/Intrinsic.c:1312:19: [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). } else (void) strcpy(*rest, string); data/libxt-1.2.0/src/Intrinsic.c:1435:6: [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(ch, impl_default); data/libxt-1.2.0/src/Intrinsic.c:1586:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void) vprintf(fmt, args); data/libxt-1.2.0/src/Shell.c:2502:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(*new, *str); data/libxt-1.2.0/src/Shell.c:2868:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(*new, *str); data/libxt-1.2.0/src/TMaction.c:208:14: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). (void) strcat(message, s); data/libxt-1.2.0/src/TMprint.c:130: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(sb->current, modstring); \ data/libxt-1.2.0/src/TMprint.c:161:52: [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). #define PRINTEVENT(event, name) case event: (void) strcpy(sb->current, name); break; data/libxt-1.2.0/src/TMprint.c:212:14: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. else (void) sprintf(sb->current, /*"0x%lx"*/ "%u", (unsigned)code); data/libxt-1.2.0/src/TMprint.c:231:7: [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(sb->current, keysymName); data/libxt-1.2.0/src/TMprint.c:251:7: [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(sb->current, atomName); data/libxt-1.2.0/src/TMprint.c:268: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(sb->current, XKeysymToString(lateModifiers->keysym)); data/libxt-1.2.0/src/TMprint.c:321: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(sb->current, params[i]); data/libxt-1.2.0/src/TMprint.c:350: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(sb->current, proc); data/libxt-1.2.0/src/TMprint.c:446:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sb->current, "(%d%s)", clickCount+1, cycle ? "+" : ""); data/libxt-1.2.0/util/makestrs.c:296:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (fileprotstr, "_%s_", phile->name); data/libxt-1.2.0/util/makestrs.c:305:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf (fileprotstr, "_%s%s_", prefixstr, phile->name); data/libxt-1.2.0/util/makestrs.c:341:13: [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. (void) printf (const_string, externdefstr, data/libxt-1.2.0/util/makestrs.c:359:9: [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. (void) printf (const_string, externdefstr, data/libxt-1.2.0/util/makestrs.c:370:13: [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. (void) printf (const_string, externdefstr, data/libxt-1.2.0/util/makestrs.c:438:9: [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. (void) printf (const_string, externdefstr, conststr ? conststr : "", data/libxt-1.2.0/util/makestrs.c:633:6: [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(tableent->left, buf); data/libxt-1.2.0/util/makestrs.c:636: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(tableent->right, right); data/libxt-1.2.0/src/Converters.c:1553:6: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. if (getwd(directory)) data/libxt-1.2.0/src/Display.c:269:33: [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 (! applName && !(applName = getenv("RESOURCE_NAME"))) { data/libxt-1.2.0/src/Initialize.c:296:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if(getenv("XTAPPPEEKEVENT_SKIPTIMER")) data/libxt-1.2.0/src/Initialize.c:310: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. if ((ptr = getenv("USERNAME"))) { data/libxt-1.2.0/src/Initialize.c:322: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. if ((ptr = getenv("USER"))) { data/libxt-1.2.0/src/Initialize.c:346: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. if (ptr1 = getenv("HOME")) { /* old, deprecated */ data/libxt-1.2.0/src/Initialize.c:348:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. } else if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) { data/libxt-1.2.0/src/Initialize.c:348:56: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. } else if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) { data/libxt-1.2.0/src/Initialize.c:351:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. } else if (ptr2 = getenv("USERNAME")) { data/libxt-1.2.0/src/Initialize.c:368: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. if ((ptr = getenv("HOME"))) { data/libxt-1.2.0/src/Initialize.c:373:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((ptr = getenv("USER"))) data/libxt-1.2.0/src/Initialize.c:395: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 (!(path = getenv("XUSERFILESEARCHPATH"))) { data/libxt-1.2.0/src/Initialize.c:400:19: [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 (!(old_path = getenv("XAPPLRESDIR"))) { data/libxt-1.2.0/src/Initialize.c:568:19: [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 (!(filename = getenv("XENVIRONMENT"))) { data/libxt-1.2.0/src/Initialize.c:838:17: [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. pd->language = getenv("LANG"); data/libxt-1.2.0/src/Intrinsic.c:894: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. drive = getenv ("_XBASEDRIVE"); data/libxt-1.2.0/src/Intrinsic.c:907: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. drive = getenv ("HOMEDRIVE"); data/libxt-1.2.0/src/Intrinsic.c:1374:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. defaultPath = getenv("XFILESEARCHPATH"); data/libxt-1.2.0/src/Shell.c:2798: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. } else if (getenv("SESSION_MANAGER")) { data/libxt-1.2.0/include/X11/InitialI.h:306:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char isModifier[32]; /* key-is-modifier-p bit table */ data/libxt-1.2.0/include/X11/IntrinsicI.h:121: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. (void) memcpy((void *) (dst), (const void *) (src), (size_t) (size)); \ data/libxt-1.2.0/include/X11/TranslateI.h:304:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char modifiers_return[256]; /* constant per KeyCode, key proc */ data/libxt-1.2.0/include/X11/TranslateI.h:306:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char modifiers[TMKEYCACHESIZE]; data/libxt-1.2.0/src/Alloc.c:135:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/libxt-1.2.0/src/Alloc.c:528:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(filename, "w"); data/libxt-1.2.0/src/Converters.c:759:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen((char *)fromVal->addr, "r"); data/libxt-1.2.0/src/Converters.c:1538: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 directory[PATH_MAX+1]; data/libxt-1.2.0/src/Converters.c:1661: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(dst, start, (size_t) len); data/libxt-1.2.0/src/Converters.c:1674: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(dst, start, (size_t) len); data/libxt-1.2.0/src/Converters.c:1753: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 lowerName[40]; data/libxt-1.2.0/src/Error.c:236:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BIGBUF]; data/libxt-1.2.0/src/Initialize.c:398: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 homedir[PATH_MAX]; data/libxt-1.2.0/src/Initialize.c:438: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 filename[PATH_MAX]; data/libxt-1.2.0/src/Initialize.c:565: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 filenamebuf[PATH_MAX]; data/libxt-1.2.0/src/Intrinsic.c:881: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[MAX_PATH]; data/libxt-1.2.0/src/Intrinsic.c:949: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[MAX_PATH]; data/libxt-1.2.0/src/Intrinsic.c:1394: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(massagedPath, "%N%S"); data/libxt-1.2.0/src/Intrinsic.c:1428:6: [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(ch, ":%N%S:"); data/libxt-1.2.0/src/NextEvent.c:692: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 Errno[12]; data/libxt-1.2.0/src/NextEvent.c:696:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf( Errno, "%d", errno); data/libxt-1.2.0/src/ResConfig.c:412:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAX_BUFFER]; data/libxt-1.2.0/src/Selection.c:217: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 propname[80]; data/libxt-1.2.0/src/Shell.c:1741: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 def_geom[64]; data/libxt-1.2.0/src/Shell.c:2799: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 error_msg[XT_MSG_LENGTH]; data/libxt-1.2.0/src/Shell.c:2946: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. XtFree((char *) props[num_props]); data/libxt-1.2.0/src/Shell.c:2990: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 nam_buf[32]; data/libxt-1.2.0/src/Shell.c:2991: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 pid[12]; data/libxt-1.2.0/src/Shell.c:2999: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. if (*(unsigned char *)addr) data/libxt-1.2.0/src/Shell.c:3031: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 *pnames[XT_NUM_SM_PROPS]; data/libxt-1.2.0/src/TMaction.c:166: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 messagebuf[1000]; data/libxt-1.2.0/src/TMaction.c:207:11: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. (void) strcat(message, ", "); data/libxt-1.2.0/src/TMkey.c:99:23: [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 const unsigned char modmix[256] = { data/libxt-1.2.0/src/TMparse.c:665:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char modStrbuf[100]; data/libxt-1.2.0/src/TMparse.c:768: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 eventTypeStrbuf[100]; data/libxt-1.2.0/src/TMparse.c:958: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 keySymNamebuf[100]; data/libxt-1.2.0/src/TMparse.c:1027: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 tableSymName[100]; data/libxt-1.2.0/src/TMparse.c:1080: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 atomName[1000]; data/libxt-1.2.0/src/TMparse.c:1161: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 s[2]; data/libxt-1.2.0/src/TMparse.c:1483: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 repStr[7]; data/libxt-1.2.0/src/TMparse.c:1615: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 procName[200]; data/libxt-1.2.0/src/TMparse.c:1815: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 *eol, *production, productionbuf[500]; data/libxt-1.2.0/src/TMparse.c:1875: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 operation[20]; data/libxt-1.2.0/src/TMprint.c:195:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. (void) strcpy(sb->current,"<EventTimer>"); data/libxt-1.2.0/src/TMprint.c:198:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf(sb->current, "<0x%x>", (int) event); data/libxt-1.2.0/src/TMprint.c:211:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. (void) sprintf(sb->current, "0x%lx:0x%lx", mask, code); data/libxt-1.2.0/src/TMstate.c:1522: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. XtFree((char *)params[0]); data/libxt-1.2.0/src/TMstate.c:1523: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. XtFree((char *)params[1]); data/libxt-1.2.0/src/TMstate.c:1529: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. XtFree((char *)params[0]); data/libxt-1.2.0/src/Varargs.c:248: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((void *)arg_return->value, to_val.addr, to_val.size); data/libxt-1.2.0/test/Alloc.c:70: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 snbuf[1024]; data/libxt-1.2.0/util/makestrs.c:100: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). return fopen(myfile, mode); data/libxt-1.2.0/util/makestrs.c:114: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). ret = fopen(buffer, mode); data/libxt-1.2.0/util/makestrs.c:244: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[1024]; data/libxt-1.2.0/util/makestrs.c:258: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[1024]; data/libxt-1.2.0/util/makestrs.c:276:14: [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 ((f = fopen (phile->name, "w+")) == NULL) exit (1); data/libxt-1.2.0/util/makestrs.c:501: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 lbuf[1024]; data/libxt-1.2.0/util/makestrs.c:562:7: [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(table->name, "XtR6Strings"); data/libxt-1.2.0/util/makestrs.c:564:7: [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(table->name, "XtR6ShellStrings"); data/libxt-1.2.0/util/makestrs.c:718: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[1024]; data/libxt-1.2.0/util/makestrs.c:732: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). f = fopen (argv[i], "r"); data/libxt-1.2.0/include/X11/Intrinsic.h:1910: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). ((str) != NULL ? (strcpy(XtMalloc((unsigned)strlen(str) + 1), str)) : NULL) data/libxt-1.2.0/src/Alloc.c:149:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*new_string, buf, (size_t) len); data/libxt-1.2.0/src/Converters.c:1639: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). dst = dst_str = __XtMalloc((unsigned) strlen(src) + 1); data/libxt-1.2.0/src/Converters.c:1688: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). len = (int) strlen(src); data/libxt-1.2.0/src/Converters.c:1772: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(s) < sizeof lowerName) { data/libxt-1.2.0/src/Create.c:165:9: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch, param, &num_params); data/libxt-1.2.0/src/Create.c:185:5: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch, param, &num_params); data/libxt-1.2.0/src/Display.c:291: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). len = (int) strlen (displayName); data/libxt-1.2.0/src/Display.c:293:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ((char*) app->display_name_tried, displayName, (size_t) (len + 1)); data/libxt-1.2.0/src/Error.c:175:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!(str_name = ALLOCATE_LOCAL(strlen(name) + strlen(type) + 2))) data/libxt-1.2.0/src/Error.c:175:52: [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 (!(str_name = ALLOCATE_LOCAL(strlen(name) + strlen(type) + 2))) data/libxt-1.2.0/src/Error.c:182: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 (!(temp = ALLOCATE_LOCAL(2 * strlen(class) + 2))) data/libxt-1.2.0/src/Error.c:197:16: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (buffer, result.addr, (size_t) nbytes); data/libxt-1.2.0/src/Error.c:200: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 len = (int) strlen(defaultp); data/libxt-1.2.0/src/Initialize.c:174: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). len = strlen (name.nodename); data/libxt-1.2.0/src/Initialize.c:176:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (buf, name.nodename, len-1); data/libxt-1.2.0/src/Initialize.c:311:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (dest, ptr, len-1); data/libxt-1.2.0/src/Initialize.c:323:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (dest, ptr, (size_t) (len-1)); data/libxt-1.2.0/src/Initialize.c:327:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (dest, pw->pw_name, (size_t)(len-1)); data/libxt-1.2.0/src/Initialize.c:347: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). len1 = strlen (ptr1); data/libxt-1.2.0/src/Initialize.c:349: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). len1 = strlen (ptr1); data/libxt-1.2.0/src/Initialize.c:350: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). len2 = strlen (ptr2); data/libxt-1.2.0/src/Initialize.c:352: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). len1 = strlen (ptr1 = "/users/"); data/libxt-1.2.0/src/Initialize.c:353: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). len2 = strlen (ptr2); data/libxt-1.2.0/src/Initialize.c:369:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (dest, ptr, (size_t)(len-1)); data/libxt-1.2.0/src/Initialize.c:378:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (dest, pw->pw_dir, (size_t)(len-1)); data/libxt-1.2.0/src/Initialize.c:440: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). PATH_MAX - (int)strlen (slashDotXdefaults) - 1); data/libxt-1.2.0/src/Initialize.c:577: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). PATH_MAX - (int)strlen (slashDotXdefaultsDash) - 1); data/libxt-1.2.0/src/Initialize.c:579: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). len = (int)strlen(filename); data/libxt-1.2.0/src/Intrinsic.c:334:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len_nm = widget->core.name ? (int) strlen(widget->core.name) : 0; data/libxt-1.2.0/src/Intrinsic.c:335: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). len_cl = (int) strlen(class_name); data/libxt-1.2.0/src/Intrinsic.c:637: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). len = (int) strlen(name); data/libxt-1.2.0/src/Intrinsic.c:860:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (path) < len_pathbuf) data/libxt-1.2.0/src/Intrinsic.c:863: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). *pathret = XtMalloc (strlen (path)); data/libxt-1.2.0/src/Intrinsic.c:897: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). len = strlen (drive) + strlen (path); data/libxt-1.2.0/src/Intrinsic.c:897: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). len = strlen (drive) + strlen (path); data/libxt-1.2.0/src/Intrinsic.c:909: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 (drive) + strlen (path); data/libxt-1.2.0/src/Intrinsic.c:909: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). len = strlen (drive) + strlen (path); data/libxt-1.2.0/src/Intrinsic.c:926: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). len = 2 + strlen (path); data/libxt-1.2.0/src/Intrinsic.c:1221: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). start += strlen(STARTSTR); data/libxt-1.2.0/src/Intrinsic.c:1229:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, start, (size_t) len); data/libxt-1.2.0/src/Intrinsic.c:1283: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). len = (int) strlen(string) + 1; data/libxt-1.2.0/src/Intrinsic.c:1298:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(p1, string, (size_t) len); data/libxt-1.2.0/src/Intrinsic.c:1309:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*rest, string, (size_t) len); data/libxt-1.2.0/src/Intrinsic.c:1358: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). int idef_len = (int) strlen(impl_default); data/libxt-1.2.0/src/Intrinsic.c:1410:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( new, massagedPath, (size_t) bytesUsed ); data/libxt-1.2.0/src/ResConfig.c:271:3: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (resource_value) + 1, data/libxt-1.2.0/src/ResConfig.c:711:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). loose_len = (loose) ? (int) strlen (loose) : 0; data/libxt-1.2.0/src/ResConfig.c:712:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tight_len = (tight) ? (int) strlen (tight) : 0; data/libxt-1.2.0/src/Resources.c:809: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). value.size = (unsigned) strlen((char *)value.addr) + 1; data/libxt-1.2.0/src/Shell.c:1025: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(tls->topLevel.icon_name) != 0) { data/libxt-1.2.0/src/Shell.c:1430: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). window_name.nitems = strlen((char *)window_name.value); data/libxt-1.2.0/src/Shell.c:1445: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). icon_name.nitems = strlen((char *)icon_name.value); data/libxt-1.2.0/src/Shell.c:1505:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (unsigned char *)locale, (int) strlen(locale)); data/libxt-1.2.0/src/Shell.c:1528: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) strlen(sm_client_id)); data/libxt-1.2.0/src/Shell.c:1540:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int) strlen(wmshell->wm.window_role)); data/libxt-1.2.0/src/Shell.c:2327: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). title.nitems = strlen(nwmshell->wm.title); data/libxt-1.2.0/src/Shell.c:2381: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). (int) strlen(nwmshell->wm.window_role)); data/libxt-1.2.0/src/Shell.c:2465: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). icon_name.nitems = strlen((char *)icon_name.value); data/libxt-1.2.0/src/Shell.c:2493: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). nbytes = (nbytes + (Cardinal) strlen(*str)); data/libxt-1.2.0/src/Shell.c:2666: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). (int) strlen(nw->session.session_id)); data/libxt-1.2.0/src/Shell.c:2859:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nbytes = nbytes + (Cardinal)strlen(*str); data/libxt-1.2.0/src/Shell.c:2912: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). p->vals->length = (int) strlen(prop) + 1; data/libxt-1.2.0/src/Shell.c:2935: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). vals->length = (int) strlen(*ptr) + 1; data/libxt-1.2.0/src/TMaction.c:183: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). num_chars += (Cardinal)strlen(s); data/libxt-1.2.0/src/TMparse.c:1819: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). else len = strlen (currentProduction); data/libxt-1.2.0/src/TMprint.c:104: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). size_t l = strlen(more); \ data/libxt-1.2.0/src/TMprint.c:131: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). sb->current += strlen(sb->current); \ data/libxt-1.2.0/src/TMprint.c:201: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). sb->current += strlen(sb->current); data/libxt-1.2.0/src/TMprint.c:213: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). sb->current += strlen(sb->current); data/libxt-1.2.0/src/TMprint.c:232: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). sb->current += strlen(sb->current); data/libxt-1.2.0/src/TMprint.c:252: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). sb->current += strlen(sb->current); data/libxt-1.2.0/src/TMprint.c:269: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). sb->current += strlen(sb->current); data/libxt-1.2.0/src/TMprint.c:322: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). sb->current += strlen(sb->current); data/libxt-1.2.0/src/TMprint.c:342: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). int nameLen = (int) strlen(name); data/libxt-1.2.0/src/TMprint.c:351: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). sb->current += strlen(proc); data/libxt-1.2.0/src/TMprint.c:448:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. (void) strncpy(sb->current, "(+)", 4); data/libxt-1.2.0/src/TMprint.c:449: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). sb->current += strlen(sb->current); data/libxt-1.2.0/util/makestrs.c:106: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). len = strlen(myfile) + strlen(includedir) + 1; data/libxt-1.2.0/util/makestrs.c:106: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). len = strlen(myfile) + strlen(includedir) + 1; data/libxt-1.2.0/util/makestrs.c:246: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). size_t magic_string_len = strlen (magic_string); data/libxt-1.2.0/util/makestrs.c:294:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((fileprotstr = malloc (strlen (phile->name) + 3)) == NULL) data/libxt-1.2.0/util/makestrs.c:303:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((fileprotstr = malloc (strlen (phile->name) + strlen (prefixstr) + 3)) == NULL) data/libxt-1.2.0/util/makestrs.c:303:52: [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 ((fileprotstr = malloc (strlen (phile->name) + strlen (prefixstr) + 3)) == NULL) data/libxt-1.2.0/util/makestrs.c:512:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp (buf, file_str, strlen (file_str)) == 0) data/libxt-1.2.0/util/makestrs.c:514: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). else if (strncmp (buf, table_str, strlen (table_str)) == 0) data/libxt-1.2.0/util/makestrs.c:516:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strncmp (buf, prefix_str, strlen (prefix_str)) == 0) data/libxt-1.2.0/util/makestrs.c:518: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). else if (strncmp (buf, feature_str, strlen (feature_str)) == 0) data/libxt-1.2.0/util/makestrs.c:520: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). else if (strncmp (buf, externref_str, strlen (externref_str)) == 0) data/libxt-1.2.0/util/makestrs.c:522: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). else if (strncmp (buf, externdef_str, strlen (externdef_str)) == 0) data/libxt-1.2.0/util/makestrs.c:524: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). else if (strncmp (buf, ctmpl_str, strlen (ctmpl_str)) == 0) data/libxt-1.2.0/util/makestrs.c:526: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). else if (strncmp (buf, htmpl_str, strlen (htmpl_str)) == 0) data/libxt-1.2.0/util/makestrs.c:528: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). else if (strncmp (buf, const_str, strlen (const_str)) == 0) data/libxt-1.2.0/util/makestrs.c:540: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). if ((phile->name = strdup (buf + strlen (file_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:558: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). if ((table->name = strdup (buf + strlen (table_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:579:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((prefixstr = strdup (buf + strlen (prefix_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:583: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 ((featurestr = strdup (buf + strlen (feature_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:587:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((externrefstr = strdup (buf + strlen (externref_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:591:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((externdefstr = strdup (buf + strlen (externdef_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:595: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). if ((ctmplstr = strdup (buf + strlen (ctmpl_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:599: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). if ((filecurrent->tmpl = ifopen (buf + strlen (htmpl_str) + 1, "r")) == NULL) { data/libxt-1.2.0/util/makestrs.c:606: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). if ((conststr = strdup (buf + strlen (const_str) + 1)) == NULL) data/libxt-1.2.0/util/makestrs.c:626: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). llen = len = strlen(buf) + 1; data/libxt-1.2.0/util/makestrs.c:627: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). rlen = strlen(right) + 1; data/libxt-1.2.0/util/makestrs.c:658: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). t->offset += strlen (te->right); data/libxt-1.2.0/util/makestrs.c:673: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). offset += strlen (te->right); data/libxt-1.2.0/util/makestrs.c:707:12: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (ret, tag + 1, len - 1); data/libxt-1.2.0/util/makestrs.c:772: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). if (buf[(len = strlen (buf) - 1)] == '\n') buf[len] = '\0'; ANALYSIS SUMMARY: Hits = 232 Lines analyzed = 46132 in approximately 1.15 seconds (39985 lines/second) Physical Source Lines of Code (SLOC) = 33596 Hits@level = [0] 87 [1] 108 [2] 61 [3] 19 [4] 44 [5] 0 Hits@level+ = [0+] 319 [1+] 232 [2+] 124 [3+] 63 [4+] 44 [5+] 0 Hits/KSLOC@level+ = [0+] 9.49518 [1+] 6.90558 [2+] 3.69092 [3+] 1.87522 [4+] 1.30968 [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.