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/gringotts-1.2.10/src/grg_attachs.c Examining data/gringotts-1.2.10/src/grg_attachs.h Examining data/gringotts-1.2.10/src/grg_defs.h Examining data/gringotts-1.2.10/src/grg_entries.c Examining data/gringotts-1.2.10/src/grg_entries.h Examining data/gringotts-1.2.10/src/grg_entries_vis.c Examining data/gringotts-1.2.10/src/grg_entries_vis.h Examining data/gringotts-1.2.10/src/grg_list.c Examining data/gringotts-1.2.10/src/grg_list.h Examining data/gringotts-1.2.10/src/grg_menus.c Examining data/gringotts-1.2.10/src/grg_menus.h Examining data/gringotts-1.2.10/src/grg_pix.c Examining data/gringotts-1.2.10/src/grg_pix.h Examining data/gringotts-1.2.10/src/grg_popt.c Examining data/gringotts-1.2.10/src/grg_popt.h Examining data/gringotts-1.2.10/src/grg_prefs.c Examining data/gringotts-1.2.10/src/grg_prefs.h Examining data/gringotts-1.2.10/src/grg_prefs_io.c Examining data/gringotts-1.2.10/src/grg_prefs_io.h Examining data/gringotts-1.2.10/src/grg_pwd.c Examining data/gringotts-1.2.10/src/grg_pwd.h Examining data/gringotts-1.2.10/src/grg_recent_dox.c Examining data/gringotts-1.2.10/src/grg_recent_dox.h Examining data/gringotts-1.2.10/src/grg_safe.c Examining data/gringotts-1.2.10/src/grg_safe.h Examining data/gringotts-1.2.10/src/grg_xpm.c Examining data/gringotts-1.2.10/src/gringotts.c Examining data/gringotts-1.2.10/src/gringotts.h Examining data/gringotts-1.2.10/src/grg_widgets.c Examining data/gringotts-1.2.10/src/grg_widgets.h FINAL RESULTS: data/gringotts-1.2.10/src/grg_widgets.c:402:10: [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. resp = system (command); data/gringotts-1.2.10/src/grg_entries_vis.c:117: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. char* htab_env = getenv("HTAB"); data/gringotts-1.2.10/src/grg_prefs_io.c:58:27: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. path = g_build_filename (g_get_home_dir (), ".gringotts.conf", NULL); data/gringotts-1.2.10/src/grg_prefs_io.c:410:27: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. path = g_build_filename (g_get_home_dir (), ".gringotts.conf", NULL); data/gringotts-1.2.10/src/grg_recent_dox.c:62:27: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. path = g_build_filename (g_get_home_dir (), ".gringotts.recent", data/gringotts-1.2.10/src/grg_recent_dox.c:113:27: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. path = g_build_filename (g_get_home_dir (), ".gringotts.recent", data/gringotts-1.2.10/src/grg_safe.c:261:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lang = getenv("LANG"); data/gringotts-1.2.10/src/grg_safe.c:262:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. htab = getenv("HTAB"); data/gringotts-1.2.10/src/grg_safe.c:274: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. xauth = getenv("XAUTHORITY"); data/gringotts-1.2.10/src/grg_safe.c:280:15: [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. display = getenv("DISPLAY"); data/gringotts-1.2.10/src/grg_safe.c:321:33: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. putenv(g_strconcat("HOME=", g_get_home_dir(), NULL)); data/gringotts-1.2.10/src/gringotts.c:647:3: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. realpath (input_filename, abs_filename); data/gringotts-1.2.10/src/grg_attachs.c:278:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (path, O_WRONLY | O_CREAT | O_EXCL, data/gringotts-1.2.10/src/grg_entries.c:568:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pos_to_restore = atoi (text); data/gringotts-1.2.10/src/grg_entries.c:574:14: [2] (integer) atol: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). pwdbirth = atol (text); data/gringotts-1.2.10/src/grg_pix.c:22:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *red_xpm[58] = { data/gringotts-1.2.10/src/grg_pix.c:59: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. const char *yellow_xpm[58] = { data/gringotts-1.2.10/src/grg_pix.c:96: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. const char *green_xpm[58] = { data/gringotts-1.2.10/src/grg_pix.c:134: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. const char *optimal_xpm[94] = { data/gringotts-1.2.10/src/grg_pix.c:180: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. const char *splash_xpm[180] = { data/gringotts-1.2.10/src/grg_pix.c:340: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. const char * wait_xpm[82] = { data/gringotts-1.2.10/src/grg_pix.c:400: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. const char * clip_xpm[17] = { data/gringotts-1.2.10/src/grg_pix.h:25: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. const char *red_xpm[58]; data/gringotts-1.2.10/src/grg_pix.h:26: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. const char *yellow_xpm[58]; data/gringotts-1.2.10/src/grg_pix.h:27: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. const char *green_xpm[58]; data/gringotts-1.2.10/src/grg_pix.h:28: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. const char *optimal_xpm[94]; data/gringotts-1.2.10/src/grg_pix.h:30: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. const char *splash_xpm[180]; data/gringotts-1.2.10/src/grg_pix.h:32: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. const char *wait_xpm[82]; data/gringotts-1.2.10/src/grg_pix.h:33: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. const char *clip_xpm[17]; data/gringotts-1.2.10/src/grg_popt.c:259:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). canary = open ("/dev/null", O_RDONLY); data/gringotts-1.2.10/src/grg_popt.c:347:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open ("/dev/tty", O_RDWR); data/gringotts-1.2.10/src/grg_prefs_io.c:59:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (path, O_WRONLY | O_CREAT | O_TRUNC, data/gringotts-1.2.10/src/grg_prefs_io.c:298:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). gint fdt = open (utf, O_RDONLY); data/gringotts-1.2.10/src/grg_prefs_io.c:345:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). grg_prefs_xpire = atoi (text + i); data/gringotts-1.2.10/src/grg_prefs_io.c:355:27: [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). grg_prefs_wipe_passes = atoi (text + i); data/gringotts-1.2.10/src/grg_prefs_io.c:384:29: [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). grg_prefs_mainwin_width = atoi (text + i); data/gringotts-1.2.10/src/grg_prefs_io.c:393:30: [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). grg_prefs_mainwin_height = atoi (text + i); data/gringotts-1.2.10/src/grg_prefs_io.c:411:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (path, O_RDONLY); data/gringotts-1.2.10/src/grg_pwd.c:162:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (BLOCK_DEV, O_RDONLY); data/gringotts-1.2.10/src/grg_recent_dox.c:64:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (path, O_RDONLY); data/gringotts-1.2.10/src/grg_recent_dox.c:115:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open (path, O_WRONLY | O_CREAT | O_TRUNC, data/gringotts-1.2.10/src/grg_safe.c:79:9: [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). X = atoi(s1); data/gringotts-1.2.10/src/grg_safe.c:80:9: [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). Y = atoi(s2); data/gringotts-1.2.10/src/grg_safe.c:81:9: [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). Z = atoi(s3); data/gringotts-1.2.10/src/grg_safe.c:198: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. char errbuf[1024]; data/gringotts-1.2.10/src/grg_safe.c:247:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). canary = open("/dev/null", O_RDONLY); data/gringotts-1.2.10/src/grg_safe.c:518:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_RDONLY); data/gringotts-1.2.10/src/gringotts.c:1010:9: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). gchar *tmpfile; data/gringotts-1.2.10/src/gringotts.c:1022:30: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). gchar *tmp = g_strconcat (tmpfile, SUFFIX, NULL); data/gringotts-1.2.10/src/gringotts.c:1023:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1028:23: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fd = grg_safe_open (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1037:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1050:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1058:43: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (grg_prefs_bak_files && !backup_file (tmpfile)) data/gringotts-1.2.10/src/gringotts.c:1064:26: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). err = grg_entries_save (tmpfile, key, win1); data/gringotts-1.2.10/src/gringotts.c:1074:24: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). grgfile = g_strdup (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1082:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1094:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1102:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1110:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1119:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1127:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.c:1140:10: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). g_free (tmpfile); data/gringotts-1.2.10/src/gringotts.h:108: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. extern const char *gringotts_xpm[115]; data/gringotts-1.2.10/src/grg_attachs.c:379: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 (fname) > 10) data/gringotts-1.2.10/src/grg_entries.c:432: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). dim = strlen (entry->entryBody); data/gringotts-1.2.10/src/grg_entries.c:435: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). dim = strlen (entry->entryID); data/gringotts-1.2.10/src/grg_entries.c:507: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 (serialized)); data/gringotts-1.2.10/src/grg_entries.c:617: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). end = strlen (str); data/gringotts-1.2.10/src/grg_entries.c:728: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). occur = g_strstr_len (start, strlen (start), needle); data/gringotts-1.2.10/src/grg_entries.c:743:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (tok1); data/gringotts-1.2.10/src/grg_popt.c:297:7: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar (); data/gringotts-1.2.10/src/grg_prefs_io.c:82: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:96: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:107: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:117: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:127: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:137: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:147: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:157: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:171: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:182: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:190: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_prefs_io.c:204: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). write (fd, row, strlen (row)); data/gringotts-1.2.10/src/grg_pwd.c:431: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). gint pwd_len = strlen (ret1); data/gringotts-1.2.10/src/grg_pwd.c:682:6: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar (); data/gringotts-1.2.10/src/grg_pwd.c:693:7: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar (); data/gringotts-1.2.10/src/grg_recent_dox.c:135: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). write (fd, urow, strlen (urow)); data/gringotts-1.2.10/src/gringotts.c:1019: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). (fpath + strlen (fpath) - SUFFIX_LEN, SUFFIX, ANALYSIS SUMMARY: Hits = 89 Lines analyzed = 9272 in approximately 0.30 seconds (31161 lines/second) Physical Source Lines of Code (SLOC) = 6599 Hits@level = [0] 15 [1] 25 [2] 52 [3] 11 [4] 1 [5] 0 Hits@level+ = [0+] 104 [1+] 89 [2+] 64 [3+] 12 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 15.76 [1+] 13.4869 [2+] 9.69844 [3+] 1.81846 [4+] 0.151538 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.