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-wavelan-plugin-0.6.1/panel-plugin/wavelan.c Examining data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi.h Examining data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c Examining data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_common.c Examining data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c FINAL RESULTS: data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi.h:34: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 ws_netname[WI_MAXSTRLEN]; /* current SSID */ data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi.h:36: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 ws_qunit[4]; /* % or dBm ? */ data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi.h:38: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 ws_vendor[WI_MAXSTRLEN]; /* device vendor name */ data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:96: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 interface[WI_MAXSTRLEN]; data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:244:3: [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(bssid.i_bssid, &nr.nr_macaddr, sizeof(nr.nr_macaddr)); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:281:3: [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(bssid.i_bssid, &nr.nr_macaddr, sizeof(nr.nr_macaddr)); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:302:4: [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 mib[WI_MAXSTRLEN]; data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:303:4: [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[WI_MAXSTRLEN]; data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:342:4: [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[24 * 1024]; data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:359:4: [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(scan, buffer, sizeof(struct ieee80211req_scan_result)); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c:56: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 interface[WI_MAXSTRLEN]; data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c:102: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 range_buf[sizeof(struct iw_range) * 2]; // wireless tools says it is data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c:132: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 buffer[1024]; data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c:143: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 essid[IW_ESSID_MAX_SIZE + 1]; data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c:195: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). if ((fp = fopen("/proc/net/wireless", "r")) == NULL) { data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wavelan.c:152:64: [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 (wavelan->css_provider, css, strlen(css), NULL); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wavelan.c:207: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). if (strlen(stats.ws_netname) > 0) data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:223:50: [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). strlcpy(buffer, (char *) nwid.i_nwid, MIN(len, strlen(nwid.i_nwid) + 1)); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:310:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dev_name, device->interface, WI_MAXSTRLEN); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_bsd.c:391:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ireq.i_name, device->interface, sizeof(ireq.i_name)); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c:107:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wreq.ifr_name, device->interface, IFNAMSIZ); data/xfce4-wavelan-plugin-0.6.1/panel-plugin/wi_linux.c:153:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wreq.ifr_name, device->interface, IFNAMSIZ); ANALYSIS SUMMARY: Hits = 22 Lines analyzed = 1536 in approximately 0.05 seconds (28174 lines/second) Physical Source Lines of Code (SLOC) = 1057 Hits@level = [0] 3 [1] 7 [2] 15 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 25 [1+] 22 [2+] 15 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 23.6518 [1+] 20.8136 [2+] 14.1911 [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.