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/xcompmgr-1.1.8/xcompmgr.c FINAL RESULTS: data/xcompmgr-1.1.8/xcompmgr.c:2075:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:scnfFCaS")) != -1) data/xcompmgr-1.1.8/xcompmgr.c:790: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 (&pixmap, prop, 4); data/xcompmgr-1.1.8/xcompmgr.c:1301:2: [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 (&i, data, sizeof (unsigned int)); data/xcompmgr-1.1.8/xcompmgr.c:1339:2: [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 (&a, data, sizeof (Atom)); data/xcompmgr-1.1.8/xcompmgr.c:1769: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 buf[128]; data/xcompmgr-1.1.8/xcompmgr.c:1779:5: [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, "Shape %d", kind); data/xcompmgr-1.1.8/xcompmgr.c:1842: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[256]; data/xcompmgr-1.1.8/xcompmgr.c:1909: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 buf[128]; data/xcompmgr-1.1.8/xcompmgr.c:1930: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 (buf, "Event %d", ev->type); data/xcompmgr-1.1.8/xcompmgr.c:2082:19: [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). fade_delta = atoi (optarg); data/xcompmgr-1.1.8/xcompmgr.c:2121: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). shadowRadius = atoi (optarg); data/xcompmgr-1.1.8/xcompmgr.c:2127:22: [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). shadowOffsetX = atoi (optarg); data/xcompmgr-1.1.8/xcompmgr.c:2130:22: [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). shadowOffsetY = atoi (optarg); data/xcompmgr-1.1.8/xcompmgr.c:1882: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). ev->error_code, (strlen (name) > 0) ? name : "unknown", ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 2390 in approximately 0.06 seconds (40173 lines/second) Physical Source Lines of Code (SLOC) = 2059 Hits@level = [0] 22 [1] 1 [2] 12 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 36 [1+] 14 [2+] 13 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 17.4842 [1+] 6.79942 [2+] 6.31374 [3+] 0.485673 [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.