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/xfaces-3.3/regmagic.h Examining data/xfaces-3.3/Tiled.h Examining data/xfaces-3.3/TiledP.h Examining data/xfaces-3.3/regexp.h Examining data/xfaces-3.3/face_command.h Examining data/xfaces-3.3/face_image.h Examining data/xfaces-3.3/face_search.h Examining data/xfaces-3.3/face_sound.h Examining data/xfaces-3.3/patchlevel.h Examining data/xfaces-3.3/cmd_check.c Examining data/xfaces-3.3/Tiled.c Examining data/xfaces-3.3/face_actions.c Examining data/xfaces-3.3/face_annotate.c Examining data/xfaces-3.3/face_binding.c Examining data/xfaces-3.3/face_command.c Examining data/xfaces-3.3/face_display.c Examining data/xfaces-3.3/face_image_xbm.c Examining data/xfaces-3.3/face_search.c Examining data/xfaces-3.3/face_search_resource.c Examining data/xfaces-3.3/face_search_binding.c Examining data/xfaces-3.3/face_search_uh.c Examining data/xfaces-3.3/mail_body.c Examining data/xfaces-3.3/mail_check.c Examining data/xfaces-3.3/mail_file.c Examining data/xfaces-3.3/mail_header.c Examining data/xfaces-3.3/mail_parse.c Examining data/xfaces-3.3/path.c Examining data/xfaces-3.3/regexp.c Examining data/xfaces-3.3/regsub.c Examining data/xfaces-3.3/string.c Examining data/xfaces-3.3/face_sound.c Examining data/xfaces-3.3/face_shape.c Examining data/xfaces-3.3/face_search_xface.c Examining data/xfaces-3.3/face_image_xface.c Examining data/xfaces-3.3/face_image.c Examining data/xfaces-3.3/face_image_xpm.c Examining data/xfaces-3.3/face_search_facedb.c Examining data/xfaces-3.3/faces.h Examining data/xfaces-3.3/mail_box.c Examining data/xfaces-3.3/mail_items.c Examining data/xfaces-3.3/main.c Examining data/xfaces-3.3/pop_check.c FINAL RESULTS: data/xfaces-3.3/cmd_check.c:98:11: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. cmd = popen(TheFacesResources.list_command, "r"); data/xfaces-3.3/face_command.c:205:5: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. system(fc->command); data/xfaces-3.3/face_image.c:219:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(my_label, "%s@%s", info->item->user, info->item->host); data/xfaces-3.3/face_image.c:272:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s%s", file, info->type->extension); data/xfaces-3.3/face_image.c:514:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(label, "%s@%s", item->user, item->host); data/xfaces-3.3/face_image.c:560:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(s, "%s%s", s1, s2); data/xfaces-3.3/face_image_xface.c:199: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(buffer, str); data/xfaces-3.3/face_image_xpm.c:310:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(command, filter, file); data/xfaces-3.3/face_image_xpm.c:312:10: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fp = popen(command, "r"); data/xfaces-3.3/face_search_facedb.c:137:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s", name, TheFacesResources.machine); data/xfaces-3.3/face_search_facedb.c:221:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s/%s", name, TheFacesResources.people); data/xfaces-3.3/face_search_facedb.c:583:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer1, "%sMISC/%s", file, username); data/xfaces-3.3/face_search_facedb.c:596:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer1, "%sMISC/%s/face", file, username); data/xfaces-3.3/face_search_facedb.c:678:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer1, "%sMISC/unknown", file); data/xfaces-3.3/face_search_facedb.c:695:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer1, "%sMISC/unknown/face", file); data/xfaces-3.3/face_search_resource.c:134:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.%s.%s@%s", data/xfaces-3.3/face_search_resource.c:136:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullclass, "%s.%s.User@Host", data/xfaces-3.3/face_search_resource.c:157:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.%s.%s@%s", data/xfaces-3.3/face_search_resource.c:176:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.%s.%s", appname, typename, item->user); data/xfaces-3.3/face_search_resource.c:177:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullclass, "%s.%s.User", XFACES_CLASS, typeclass); data/xfaces-3.3/face_search_resource.c:190:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.%s.%s", appname, typename, item->host); data/xfaces-3.3/face_search_resource.c:191:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullclass, "%s.%s.Host", XFACES_CLASS, typeclass); data/xfaces-3.3/face_search_resource.c:206:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.%s.%s", appname, typename, item->realhost); data/xfaces-3.3/face_search_uh.c:73:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s@%s", item->user, item->host); data/xfaces-3.3/face_search_uh.c:91:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name, "%s@%s", item->user, item->realhost); data/xfaces-3.3/face_sound.c:297:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(filename, "%s%s", file, *p); data/xfaces-3.3/faces.h:341:14: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. extern char *getlogin(); data/xfaces-3.3/mail_body.c:102: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(str, buffer); data/xfaces-3.3/mail_body.c:222: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(str, buffer); data/xfaces-3.3/mail_header.c:155: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(str, buffer); data/xfaces-3.3/mail_header.c:235: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(header->value, p); data/xfaces-3.3/mail_items.c:187:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(item->annotations[i], "%s@%s", item->user, item->host); data/xfaces-3.3/mail_items.c:382:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(item->label, "%s@%s", item->user, item->host); data/xfaces-3.3/mail_items.c:719:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.mail.annotation%d", appname, i+1); data/xfaces-3.3/mail_items.c:720:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullclass, "%s.Mail.Annotation", XFACES_CLASS); data/xfaces-3.3/mail_items.c:808:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullname, "%s.mail.unknownAnnotation%d", appname, i+1); data/xfaces-3.3/mail_items.c:809:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullclass, "%s.Mail.Annotation", XFACES_CLASS); data/xfaces-3.3/main.c:530:14: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. if ((name = getlogin()) == NULL) data/xfaces-3.3/main.c:545:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(fr->spool_file, "%s/%s", fr->spool_dir, name); data/xfaces-3.3/main.c:557:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fr->pop_auth_file, "%s/.popauth", home); data/xfaces-3.3/path.c:113:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s/%s", *paths, file); data/xfaces-3.3/pop_check.c:383: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(&msg[got], buffer); data/xfaces-3.3/regexp.c:1178:10: [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(buf, p); data/xfaces-3.3/main.c:550:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. home = getenv("HOME"); data/xfaces-3.3/cmd_check.c:129:13: [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). cols = atoi(fields[1]); data/xfaces-3.3/cmd_check.c:130:13: [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). rows = atoi(fields[3]); data/xfaces-3.3/face_annotate.c:560: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[30]; data/xfaces-3.3/face_annotate.c:567:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "annotation%d", i+1); data/xfaces-3.3/face_annotate.c:581:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "unknownAnnotation%d", i+1); data/xfaces-3.3/face_binding.c:141:14: [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). anno = atoi(annop); data/xfaces-3.3/face_image.c:208: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 my_label[512]; data/xfaces-3.3/face_image_xface.c:55: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 bits[512]; data/xfaces-3.3/face_image_xpm.c:507: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[50]; data/xfaces-3.3/face_image_xpm.c:538:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(name, "xpmFilter%d", i+1); data/xfaces-3.3/face_search_facedb.c:139:12: [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). file = fopen(filename, "r"); data/xfaces-3.3/face_search_facedb.c:223:12: [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). file = fopen(filename, "r"); data/xfaces-3.3/face_search_facedb.c:564: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(tail, "/face"); data/xfaces-3.3/face_search_facedb.c:650: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(tail, "/face"); data/xfaces-3.3/faces.h:91:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #ifndef bcopy data/xfaces-3.3/faces.h:92:9: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(a, b, c) memcpy(b, a, c) data/xfaces-3.3/faces.h:92:25: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define bcopy(a, b, c) memcpy(b, a, c) data/xfaces-3.3/mail_body.c:62: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 sepbuf[MAX_MAILSEP_SIZE+1]; data/xfaces-3.3/mail_body.c:239: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 sepbuf[MAX_MAILSEP_SIZE]; data/xfaces-3.3/mail_box.c:57: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 sepbuf[MAX_MAILSEP_SIZE+1]; data/xfaces-3.3/mail_box.c:134:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). content_length = atoi(header->value); data/xfaces-3.3/mail_check.c:115:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((char *) &cur_stat, (char *) &LastStat, sizeof(struct stat)); data/xfaces-3.3/mail_file.c:55:12: [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). file = fopen(name, "r"); data/xfaces-3.3/mail_items.c:115: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[30]; data/xfaces-3.3/mail_items.c:172:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "%d", item->face->count); data/xfaces-3.3/pop_check.c:164:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(hp->h_addr, (char *) &sa.sin_addr, hp->h_length); data/xfaces-3.3/pop_check.c:404:12: [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). auth = fopen(TheFacesResources.pop_auth_file, "r"); data/xfaces-3.3/regexp.c:1108:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[50]; data/xfaces-3.3/regexp.c:1152: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(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); data/xfaces-3.3/regexp.c:1164: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(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); data/xfaces-3.3/regexp.h:9: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 *startp[NSUBEXP]; data/xfaces-3.3/regexp.h:10: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 *endp[NSUBEXP]; data/xfaces-3.3/regexp.h:15: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 program[1]; /* Unwarranted chumminess with compiler. */ data/xfaces-3.3/cmd_check.c:65:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = fgetc(cmd)) != EOF && c != '\n') data/xfaces-3.3/face_annotate.c:163: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). for(length = strlen(astr); length > 0; --length) data/xfaces-3.3/face_binding.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). if (strlen(pair) == 0) data/xfaces-3.3/face_image.c:244:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_data = info->type->read(file, info->type->data); data/xfaces-3.3/face_image.c:258: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). length = strlen(file) + strlen(info->type->extension) + 1; data/xfaces-3.3/face_image.c:258: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). length = strlen(file) + strlen(info->type->extension) + 1; data/xfaces-3.3/face_image.c:284:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). image_data = info->type->read(filename, info->type->data); data/xfaces-3.3/face_image.c:513: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). label = XtMalloc(strlen(item->user) + strlen(item->host) + 2); data/xfaces-3.3/face_image.c:513: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). label = XtMalloc(strlen(item->user) + strlen(item->host) + 2); data/xfaces-3.3/face_image.c:559: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). s = XtMalloc(strlen(s1) + strlen(s2) + 1); data/xfaces-3.3/face_image.c:559: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). s = XtMalloc(strlen(s1) + strlen(s2) + 1); data/xfaces-3.3/face_image.h:55:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void* (*read) P_((char* file, void* type_data)); data/xfaces-3.3/face_image_xface.c:178: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(str); data/xfaces-3.3/face_image_xpm.c:301: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(filter) + strlen(file) + 20; data/xfaces-3.3/face_image_xpm.c:301: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(filter) + strlen(file) + 20; data/xfaces-3.3/face_image_xpm.c:321:23: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for(len = 0; (c = fgetc(fp)) != EOF; ++len) data/xfaces-3.3/face_search_facedb.c:98:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = fgetc(file)) != EOF && c != '\n') data/xfaces-3.3/face_search_facedb.c:136: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). filename = XtMalloc(strlen(name) + strlen(TheFacesResources.machine) + 2); data/xfaces-3.3/face_search_facedb.c:136: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). filename = XtMalloc(strlen(name) + strlen(TheFacesResources.machine) + 2); data/xfaces-3.3/face_search_facedb.c:220: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). filename = XtMalloc(strlen(name) + strlen(TheFacesResources.people) + 2); data/xfaces-3.3/face_search_facedb.c:220: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). filename = XtMalloc(strlen(name) + strlen(TheFacesResources.people) + 2); data/xfaces-3.3/face_search_facedb.c:527: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(file) + strlen(hostname) + strlen(username) + 50; data/xfaces-3.3/face_search_facedb.c:527: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). len = strlen(file) + strlen(hostname) + strlen(username) + 50; data/xfaces-3.3/face_search_facedb.c:527:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(file) + strlen(hostname) + strlen(username) + 50; data/xfaces-3.3/face_search_resource.c:121: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). reallen = strlen(item->realhost); data/xfaces-3.3/face_search_resource.c:124: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). fullname = XtMalloc(strlen(appname) + strlen(typename) + data/xfaces-3.3/face_search_resource.c:124:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fullname = XtMalloc(strlen(appname) + strlen(typename) + data/xfaces-3.3/face_search_resource.c:125:5: [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(item->user) + strlen(item->host) + data/xfaces-3.3/face_search_resource.c:125: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). strlen(item->user) + strlen(item->host) + data/xfaces-3.3/face_search_resource.c:127: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). fullclass = XtMalloc(strlen(XFACES_CLASS) + strlen(typeclass) + data/xfaces-3.3/face_search_resource.c:127: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). fullclass = XtMalloc(strlen(XFACES_CLASS) + strlen(typeclass) + data/xfaces-3.3/face_search_resource.c:128:5: [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("User@Host") + 9); data/xfaces-3.3/face_search_uh.c:60: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). reallen = strlen(item->realhost); data/xfaces-3.3/face_search_uh.c:67:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = XtMalloc(strlen(item->user) + strlen(item->host) + reallen + 9); data/xfaces-3.3/face_search_uh.c:67:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = XtMalloc(strlen(item->user) + strlen(item->host) + reallen + 9); data/xfaces-3.3/face_sound.c:281: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). length = strlen(file) + 20; data/xfaces-3.3/faces.h:107: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). #define StringEqVal(s1, val) (strncmp((s1), (val), strlen(val)) == 0) data/xfaces-3.3/mail_box.c:83: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(sepbuf, MAIL_SEP1, strlen(MAIL_SEP1)) == 0) data/xfaces-3.3/mail_box.c:86: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). MailSeperatorLength = strlen(MAIL_SEP1); data/xfaces-3.3/mail_box.c:90:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strncmp(sepbuf, MAIL_SEP2, strlen(MAIL_SEP2)) == 0) data/xfaces-3.3/mail_box.c:93: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). MailSeperatorLength = strlen(MAIL_SEP2); data/xfaces-3.3/mail_box.c:104: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). MailSeperatorLength = strlen(MAIL_SEP1); data/xfaces-3.3/mail_file.c:85:7: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = fgetc(file); data/xfaces-3.3/mail_file.c:161: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). for (len = strlen(str); len > 0; --len) data/xfaces-3.3/mail_header.c:231:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(header->name, line, len); data/xfaces-3.3/mail_header.c:234: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). header->value = XtMalloc(strlen(p)+1); data/xfaces-3.3/mail_items.c:185: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). item->annotations[i] = XtMalloc(strlen(item->user) + data/xfaces-3.3/mail_items.c:186:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(item->host) + 2); data/xfaces-3.3/mail_items.c:381: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). item->label = XtMalloc(strlen(item->user) + strlen(item->host) + 2); data/xfaces-3.3/mail_items.c:381:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). item->label = XtMalloc(strlen(item->user) + strlen(item->host) + 2); data/xfaces-3.3/mail_items.c:706: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). fullname = XtMalloc(strlen(appname) + 50); data/xfaces-3.3/mail_items.c:707: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). fullclass = XtMalloc(strlen(XFACES_CLASS) + 50); data/xfaces-3.3/main.c:544: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). fr->spool_file = XtMalloc(strlen(fr->spool_dir)+ strlen(name) + 2); data/xfaces-3.3/main.c:544:51: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fr->spool_file = XtMalloc(strlen(fr->spool_dir)+ strlen(name) + 2); data/xfaces-3.3/main.c:556: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). fr->pop_auth_file = XtMalloc(strlen(home) + 30); data/xfaces-3.3/path.c:84: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). file_len = strlen(file); data/xfaces-3.3/path.c:99: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). path_len = strlen(*paths); data/xfaces-3.3/pop_check.c:68:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = fgetc(input)) != EOF) data/xfaces-3.3/pop_check.c:457: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). bzero(user, strlen(user)); data/xfaces-3.3/pop_check.c:458: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). bzero(pass, strlen(pass)); data/xfaces-3.3/pop_check.c:466: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). bzero(user, strlen(user)); data/xfaces-3.3/pop_check.c:467: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). bzero(pass, strlen(pass)); data/xfaces-3.3/pop_check.c:476: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). bzero(user, strlen(user)); data/xfaces-3.3/pop_check.c:477: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). bzero(pass, strlen(pass)); data/xfaces-3.3/pop_check.c:484: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). bzero(user, strlen(user)); data/xfaces-3.3/pop_check.c:485: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). bzero(pass, strlen(pass)); data/xfaces-3.3/regexp.c:255: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 (OP(scan) == EXACTLY && strlen(OPERAND(scan)) >= len) { data/xfaces-3.3/regexp.c:257:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(OPERAND(scan)); data/xfaces-3.3/regexp.c:841: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(opnd); data/xfaces-3.3/regexp.c:999: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). count = strlen(scan); data/xfaces-3.3/regexp.c:1110:9: [1] (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 character. (void) strcpy(buf, ":"); data/xfaces-3.3/regexp.c:1152: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). sprintf(buf+strlen(buf), "OPEN%d", OP(op)-OPEN); data/xfaces-3.3/regexp.c:1164: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). sprintf(buf+strlen(buf), "CLOSE%d", OP(op)-CLOSE); data/xfaces-3.3/regsub.c:45:15: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). extern char *strncpy(); data/xfaces-3.3/regsub.c:70:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(dst, prog->startp[no], len); ANALYSIS SUMMARY: Hits = 152 Lines analyzed = 13106 in approximately 0.28 seconds (46345 lines/second) Physical Source Lines of Code (SLOC) = 7487 Hits@level = [0] 100 [1] 75 [2] 33 [3] 1 [4] 43 [5] 0 Hits@level+ = [0+] 252 [1+] 152 [2+] 77 [3+] 44 [4+] 43 [5+] 0 Hits/KSLOC@level+ = [0+] 33.6583 [1+] 20.3019 [2+] 10.2845 [3+] 5.87685 [4+] 5.74329 [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.