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/libxmu-1.1.2/include/X11/Xmu/EditresP.h Examining data/libxmu-1.1.2/include/X11/Xmu/ExtAgent.h Examining data/libxmu-1.1.2/include/X11/Xmu/Xmu.h Examining data/libxmu-1.1.2/include/X11/Xmu/Drawing.h Examining data/libxmu-1.1.2/include/X11/Xmu/Lookup.h Examining data/libxmu-1.1.2/include/X11/Xmu/CharSet.h Examining data/libxmu-1.1.2/include/X11/Xmu/Misc.h Examining data/libxmu-1.1.2/include/X11/Xmu/Editres.h Examining data/libxmu-1.1.2/include/X11/Xmu/WidgetNode.h Examining data/libxmu-1.1.2/include/X11/Xmu/SysUtil.h Examining data/libxmu-1.1.2/include/X11/Xmu/StdSel.h Examining data/libxmu-1.1.2/include/X11/Xmu/WinUtil.h Examining data/libxmu-1.1.2/include/X11/Xmu/Xct.h Examining data/libxmu-1.1.2/include/X11/Xmu/Initer.h Examining data/libxmu-1.1.2/include/X11/Xmu/StdCmap.h Examining data/libxmu-1.1.2/include/X11/Xmu/CurUtil.h Examining data/libxmu-1.1.2/include/X11/Xmu/CloseHook.h Examining data/libxmu-1.1.2/include/X11/Xmu/Converters.h Examining data/libxmu-1.1.2/include/X11/Xmu/CvtCache.h Examining data/libxmu-1.1.2/include/X11/Xmu/Error.h Examining data/libxmu-1.1.2/include/X11/Xmu/Atoms.h Examining data/libxmu-1.1.2/include/X11/Xmu/WhitePoint.h Examining data/libxmu-1.1.2/include/X11/Xmu/DisplayQue.h Examining data/libxmu-1.1.2/src/LookupCmap.c Examining data/libxmu-1.1.2/src/CvtStdSel.c Examining data/libxmu-1.1.2/src/ScrOfWin.c Examining data/libxmu-1.1.2/src/DrawLogo.c Examining data/libxmu-1.1.2/src/StrToGrav.c Examining data/libxmu-1.1.2/src/StrToBmap.c Examining data/libxmu-1.1.2/src/CloseHook.c Examining data/libxmu-1.1.2/src/DrRndRect.c Examining data/libxmu-1.1.2/src/Lower.c Examining data/libxmu-1.1.2/src/StrToBS.c Examining data/libxmu-1.1.2/src/DisplayQue.c Examining data/libxmu-1.1.2/src/LocBitmap.c Examining data/libxmu-1.1.2/src/StrToJust.c Examining data/libxmu-1.1.2/src/VisCmap.c Examining data/libxmu-1.1.2/src/RdBitF.c Examining data/libxmu-1.1.2/src/DefErrMsg.c Examining data/libxmu-1.1.2/src/CmapAlloc.c Examining data/libxmu-1.1.2/src/CvtCache.c Examining data/libxmu-1.1.2/src/Distinct.c Examining data/libxmu-1.1.2/src/GrayPixmap.c Examining data/libxmu-1.1.2/src/Initer.c Examining data/libxmu-1.1.2/src/CursorName.c Examining data/libxmu-1.1.2/src/ExtAgent.c Examining data/libxmu-1.1.2/src/StrToLong.c Examining data/libxmu-1.1.2/src/StrToShap.c Examining data/libxmu-1.1.2/src/Xct.c Examining data/libxmu-1.1.2/src/AllCmap.c Examining data/libxmu-1.1.2/src/UpdMapHint.c Examining data/libxmu-1.1.2/src/ShapeWidg.c Examining data/libxmu-1.1.2/src/Clip.c Examining data/libxmu-1.1.2/src/WidgetNode.c Examining data/libxmu-1.1.2/src/CrPixFBit.c Examining data/libxmu-1.1.2/src/StrToCurs.c Examining data/libxmu-1.1.2/src/sharedlib.c Examining data/libxmu-1.1.2/src/DelCmap.c Examining data/libxmu-1.1.2/src/EditresCom.c Examining data/libxmu-1.1.2/src/ClientWin.c Examining data/libxmu-1.1.2/src/CrCmap.c Examining data/libxmu-1.1.2/src/GetHost.c Examining data/libxmu-1.1.2/src/StrToWidg.c Examining data/libxmu-1.1.2/src/Lookup.c Examining data/libxmu-1.1.2/src/StdCmap.c Examining data/libxmu-1.1.2/src/Atoms.c Examining data/libxmu-1.1.2/src/StrToOrnt.c Examining data/libxmu-1.1.2/src/FToCback.c FINAL RESULTS: data/libxmu-1.1.2/src/CvtStdSel.c:127: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 (os_name, utss.sysname); data/libxmu-1.1.2/src/CvtStdSel.c:130: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 (os_name, utss.release); data/libxmu-1.1.2/src/CvtStdSel.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( (char*)*value, w->core.name ); data/libxmu-1.1.2/src/CvtStdSel.c:269: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( (char*)*value+len+1, class ); data/libxmu-1.1.2/src/DefErrMsg.c:54:12: [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(fp, mesg, event->request_code); data/libxmu-1.1.2/src/DefErrMsg.c:74:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void) fprintf(fp, mesg, event->minor_code); data/libxmu-1.1.2/src/DefErrMsg.c:107: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(fp, mesg, event->resourceid); data/libxmu-1.1.2/src/DefErrMsg.c:134:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void) fprintf(fp, mesg, event->resourceid); data/libxmu-1.1.2/src/DefErrMsg.c:139:12: [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(fp, mesg, event->serial); data/libxmu-1.1.2/src/DefErrMsg.c:143:12: [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(fp, mesg, NextRequest(dpy)-1); data/libxmu-1.1.2/src/LocBitmap.c:233: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 (dst, src); data/libxmu-1.1.2/src/Lower.c:143:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. retval = vsprintf(str, fmt, ap); data/libxmu-1.1.2/src/Lower.c:151:12: [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. retval = vsnprintf(str, size, fmt, ap); data/libxmu-1.1.2/src/RdBitF.c:179:6: [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(line,"#define %s %d",name_and_type,&value) == 2) { data/libxmu-1.1.2/src/RdBitF.c:200:6: [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(line, "static short %s = {", name_and_type) == 1) data/libxmu-1.1.2/src/RdBitF.c:202:11: [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. else if (sscanf(line,"static unsigned char %s = {",name_and_type) == 1) data/libxmu-1.1.2/src/RdBitF.c:204:11: [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. else if (sscanf(line, "static char %s = {", name_and_type) == 1) data/libxmu-1.1.2/src/RdBitF.c:274: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/libxmu-1.1.2/src/RdBitF.c:280: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/libxmu-1.1.2/src/RdBitF.c:311: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/libxmu-1.1.2/src/RdBitF.c:312: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/libxmu-1.1.2/src/RdBitF.c:324: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/libxmu-1.1.2/src/RdBitF.c:325: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/libxmu-1.1.2/src/RdBitF.c:345: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/libxmu-1.1.2/src/StrToBS.c:138: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((char *)toVal->addr, buffer); data/libxmu-1.1.2/src/StrToCurs.c:176:15: [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 the scanf format is influenceable by an attacker, it's exploitable. fields = sscanf(name, strspec, data/libxmu-1.1.2/src/StrToCurs.c:263: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 (maskname + len, i == 0 ? "Mask" : "msk"); data/libxmu-1.1.2/src/StrToGrav.c:141: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((char *)toVal->addr, buffer); data/libxmu-1.1.2/src/StrToJust.c:129: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((char *)toVal->addr, buffer); data/libxmu-1.1.2/src/StrToLong.c:73: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((char *)toVal->addr, buffer); data/libxmu-1.1.2/src/StrToOrnt.c:119: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((char *)toVal->addr, buffer); data/libxmu-1.1.2/src/StrToShap.c:115: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((char *)toVal->addr, buffer); data/libxmu-1.1.2/src/StrToWidg.c:218: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((char *)toVal->addr, buffer); data/libxmu-1.1.2/src/CvtStdSel.c:246: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. char *name = (char*)getenv("USER"); data/libxmu-1.1.2/src/RdBitF.c:305: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/libxmu-1.1.2/src/RdBitF.c:319: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/libxmu-1.1.2/src/CursorName.c:123: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 tmp[40]; data/libxmu-1.1.2/src/CvtStdSel.c:137: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(X_OS_FILE, "r"); data/libxmu-1.1.2/src/CvtStdSel.c:141:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(MOTD_FILE, "r"); data/libxmu-1.1.2/src/CvtStdSel.c:145: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 motd[512]; data/libxmu-1.1.2/src/CvtStdSel.c:214: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 hostname[1024]; data/libxmu-1.1.2/src/CvtStdSel.c:224: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 hostname[1024]; data/libxmu-1.1.2/src/DefErrMsg.c:43: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[BUFSIZ]; data/libxmu-1.1.2/src/DefErrMsg.c:44: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 mesg[BUFSIZ]; data/libxmu-1.1.2/src/DefErrMsg.c:45: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 number[32]; data/libxmu-1.1.2/src/DefErrMsg.c:103: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(buffer, "Value"); data/libxmu-1.1.2/src/EditresCom.c:391: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 buf[BUFSIZ]; data/libxmu-1.1.2/src/EditresCom.c:524: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 buf[BUFSIZ]; data/libxmu-1.1.2/src/EditresCom.c:833: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(&(*children)[num_children], extra_widgets, data/libxmu-1.1.2/src/EditresCom.c:993: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[BUFSIZ]; data/libxmu-1.1.2/src/EditresCom.c:1996: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 ptr[16]; data/libxmu-1.1.2/src/EditresCom.c:2080: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 buffer[32]; data/libxmu-1.1.2/src/LocBitmap.c:108: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 filename[PATH_MAX]; data/libxmu-1.1.2/src/Lookup.c:75:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char _Xconst cyrillic[128] = data/libxmu-1.1.2/src/Lookup.c:94:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static unsigned char _Xconst greek[128] = data/libxmu-1.1.2/src/Lookup.c:159:21: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. (((unsigned char *)buffer)[0] == symbol) && data/libxmu-1.1.2/src/RdBitF.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 line[MAX_SIZE]; /* input line from file */ data/libxmu-1.1.2/src/RdBitF.c:155: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 name_and_type[MAX_SIZE]; /* an input line */ data/libxmu-1.1.2/src/RdBitF.c:297: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/libxmu-1.1.2/src/RdBitF.c:358: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/libxmu-1.1.2/src/RdBitF.c:364:8: [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 (bufp, mode); data/libxmu-1.1.2/src/RdBitF.c:374:20: [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). #define fopen_file fopen data/libxmu-1.1.2/src/StrToBS.c:53:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[11]; data/libxmu-1.1.2/src/StrToBS.c:73: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 name[11]; data/libxmu-1.1.2/src/StrToCurs.c:133: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 maskname[PATH_MAX]; data/libxmu-1.1.2/src/StrToCurs.c:157: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 source_name[PATH_MAX], mask_name[PATH_MAX]; data/libxmu-1.1.2/src/StrToCurs.c:215: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). mask_char = atoi(mask_name); data/libxmu-1.1.2/src/StrToGrav.c:73: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 name[10]; data/libxmu-1.1.2/src/StrToJust.c:69: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 name[7]; data/libxmu-1.1.2/src/StrToLong.c:57:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buffer[32]; data/libxmu-1.1.2/src/StrToOrnt.c:67: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 name[11]; data/libxmu-1.1.2/src/WidgetNode.c:296: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 tmp[1024]; data/libxmu-1.1.2/src/CursorName.c:125:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (name) >= sizeof tmp) return -1; data/libxmu-1.1.2/src/CvtStdSel.c:122: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). int len = strlen(utss.sysname) + 1; data/libxmu-1.1.2/src/CvtStdSel.c:124: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 += 2 + strlen(utss.release); data/libxmu-1.1.2/src/CvtStdSel.c:129:6: [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 (os_name, " "); data/libxmu-1.1.2/src/CvtStdSel.c:151: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). int len = strlen(motd); data/libxmu-1.1.2/src/CvtStdSel.c:250: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). *length = strlen(name); data/libxmu-1.1.2/src/CvtStdSel.c:266: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). *length = (len=strlen(w->core.name)) + strlen(class) + 2; data/libxmu-1.1.2/src/CvtStdSel.c:266: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). *length = (len=strlen(w->core.name)) + strlen(class) + 2; data/libxmu-1.1.2/src/CvtStdSel.c:283: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). *length = strlen(*value); data/libxmu-1.1.2/src/CvtStdSel.c:305: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). *length = strlen(*value); data/libxmu-1.1.2/src/EditresCom.c:1650: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(str); data/libxmu-1.1.2/src/GetHost.c: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). len = strlen (name.nodename); data/libxmu-1.1.2/src/GetHost.c:75:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf, name.nodename, len); data/libxmu-1.1.2/src/GetHost.c:81: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(buf); data/libxmu-1.1.2/src/LocBitmap.c:198:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (srcname, fn, srcnamelen - 1); data/libxmu-1.1.2/src/RdBitF.c:124:7: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(fstream); data/libxmu-1.1.2/src/RdBitF.c:176: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(line) == MAX_SIZE-1) { data/libxmu-1.1.2/src/RdBitF.c:275: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/libxmu-1.1.2/src/RdBitF.c:278: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). *pathret = malloc (strlen (path) + 1); data/libxmu-1.1.2/src/RdBitF.c:308: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/libxmu-1.1.2/src/RdBitF.c:308: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/libxmu-1.1.2/src/RdBitF.c:321: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/libxmu-1.1.2/src/RdBitF.c:321: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/libxmu-1.1.2/src/RdBitF.c:339: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/libxmu-1.1.2/src/StrToBS.c:130: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). size = strlen(buffer) + 1; data/libxmu-1.1.2/src/StrToCurs.c:156: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 (0 == strncmp(FONTSPECIFIER, name, strlen(FONTSPECIFIER))) { data/libxmu-1.1.2/src/StrToCurs.c:170: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). strspeclen = strlen("FONT %s %d %s %d") + 21; data/libxmu-1.1.2/src/StrToCurs.c:187: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). fromString.size = strlen(source_name) + 1; data/libxmu-1.1.2/src/StrToCurs.c:220: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). fromString.size = strlen(mask_name) + 1; data/libxmu-1.1.2/src/StrToCurs.c:261: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 (maskname); data/libxmu-1.1.2/src/StrToGrav.c:133: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). size = strlen(buffer) + 1; data/libxmu-1.1.2/src/StrToJust.c:121: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). size = strlen(buffer) + 1; data/libxmu-1.1.2/src/StrToLong.c:65: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). size = strlen(buffer) + 1; data/libxmu-1.1.2/src/StrToOrnt.c:111: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). size = strlen(buffer) + 1; data/libxmu-1.1.2/src/StrToShap.c:107: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). size = strlen(buffer) + 1; data/libxmu-1.1.2/src/StrToWidg.c:210: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). size = strlen(buffer) + 1; data/libxmu-1.1.2/src/WidgetNode.c:156: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 lablen = strlen (wn->label); data/libxmu-1.1.2/src/WidgetNode.c:157: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). int namelen = strlen (XmuWnClassname(wn)); ANALYSIS SUMMARY: Hits = 110 Lines analyzed = 14550 in approximately 0.38 seconds (38254 lines/second) Physical Source Lines of Code (SLOC) = 8667 Hits@level = [0] 11 [1] 38 [2] 36 [3] 3 [4] 33 [5] 0 Hits@level+ = [0+] 121 [1+] 110 [2+] 72 [3+] 36 [4+] 33 [5+] 0 Hits/KSLOC@level+ = [0+] 13.961 [1+] 12.6918 [2+] 8.30737 [3+] 4.15369 [4+] 3.80755 [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.