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/aewm++-1.1.2/basemenu.cc Examining data/aewm++-1.1.2/genericmenu.cc Examining data/aewm++-1.1.2/windowmenu.cc Examining data/aewm++-1.1.2/iconmenu.cc Examining data/aewm++-1.1.2/client.cc Examining data/aewm++-1.1.2/main.cc Examining data/aewm++-1.1.2/windowmanager.cc FINAL RESULTS: data/aewm++-1.1.2/basemenu.cc:351:16: [4] (shell) execlp: 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. execlp("/bin/sh", "sh", "-c", s.c_str(), NULL); data/aewm++-1.1.2/main.cc:20:13: [4] (shell) execlp: 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. execlp("/bin/sh", "sh", "-c", cmd, NULL); data/aewm++-1.1.2/windowmanager.cc:1043:2: [4] (shell) execl: 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. execl("/bin/sh", "sh", "-c", command_line.c_str(), 0); data/aewm++-1.1.2/basemenu.cc:279:27: [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. std::string exec_temp = getenv("HOME"); data/aewm++-1.1.2/basemenu.cc:305:27: [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. std::string exec_temp = getenv("HOME"); data/aewm++-1.1.2/windowmanager.cc:299:24: [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. opt_display = getenv("DISPLAY"); data/aewm++-1.1.2/windowmanager.cc:78: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). variable = atoi(argv[++i]); \ data/aewm++-1.1.2/windowmenu.cc:19: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(temp, "%d", i); data/aewm++-1.1.2/windowmenu.cc:44:17: [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). desktop = atoi(curr->name.c_str()); data/aewm++-1.1.2/client.cc:105: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). XTextExtents(wm->getFont(), name , strlen(name), data/aewm++-1.1.2/client.cc:297: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). name, strlen(name)); data/aewm++-1.1.2/main.cc:14: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(cmd)>0)) return; ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 3374 in approximately 0.07 seconds (51297 lines/second) Physical Source Lines of Code (SLOC) = 2521 Hits@level = [0] 0 [1] 3 [2] 3 [3] 3 [4] 3 [5] 0 Hits@level+ = [0+] 12 [1+] 12 [2+] 9 [3+] 6 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 4.76002 [1+] 4.76002 [2+] 3.57001 [3+] 2.38001 [4+] 1.19 [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.