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/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c Examining data/xfce4-diskperf-plugin-2.6.2/panel-plugin/config_gui.c Examining data/xfce4-diskperf-plugin-2.6.2/panel-plugin/config_gui.h Examining data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c Examining data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.h FINAL RESULTS: data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:74: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 acStats[128]; data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:77:10: [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). pF = fopen (STATISTICS_FILE_1, "r"); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:133:10: [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). pF = fopen (STATISTICS_FILE_2, "r"); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:165: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 acLine[256]; data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:170:10: [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). pF = fopen (m_pcStatFile, "r"); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:178:10: [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). pF = fopen (m_pcStatFile, "r"); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:278: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 dev_name[MAXNAMELEN]; data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:83: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 acDevice[128]; data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:88: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 acTitle[16]; data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:177: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 acToolTips[256]; data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:828:51: [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). poConf->iMaxXferMBperSec = 5 * round((double) atoi(pcXferRate) / 5); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:973: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 acBuffer[16]; data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:87:18: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc (pF)) && (c != '\n')); /* Goto next line */ data/xfce4-diskperf-plugin-2.6.2/panel-plugin/devperf.c:138:17: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc (pF)) && (c != '\n')); /* Skip the header line */ data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:336:95: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gtk_css_provider_load_from_data (g_object_get_data(G_OBJECT(*pwBar),"css_provider"), css, strlen(css), NULL); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:484:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acDevice, "wd0", 128); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:485:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acTitle, "wd0", 16); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:487:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acDevice, "ada0", 128); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:488:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acTitle, "ada0", 16); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:490:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acDevice, "sd0", 128); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:491:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acTitle, "sd0", 16); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:493:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acDevice, "/dev/sda", 128); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:496:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (poConf->acTitle, "sda", 16); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:578:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (poConf->acDevice, value, sizeof (poConf->acDevice) - 1); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:601:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (poConf->acTitle, value, sizeof (poConf->acTitle) - 1); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:703:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (poConf->acDevice, pcDevice, sizeof (poConf->acDevice) - 1); data/xfce4-diskperf-plugin-2.6.2/panel-plugin/main.c:741:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (poConf->acTitle, acTitle, sizeof (poConf->acTitle) - 1); ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 2190 in approximately 0.10 seconds (21874 lines/second) Physical Source Lines of Code (SLOC) = 1596 Hits@level = [0] 14 [1] 15 [2] 12 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 41 [1+] 27 [2+] 12 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 25.6892 [1+] 16.9173 [2+] 7.5188 [3+] 0 [4+] 0 [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.