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/ibam-0.5.2/ibam-krell.cpp Examining data/ibam-0.5.2/ibam-krell1.cpp Examining data/ibam-0.5.2/ibam.cpp Examining data/ibam-0.5.2/ibam.hpp FINAL RESULTS: data/ibam-0.5.2/ibam-krell.cpp:83:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer,"%s %2d:%02d",l,minutes/60,minutes%60); data/ibam-0.5.2/ibam-krell1.cpp:79:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer,"%s %2d:%02d",l,minutes/60,minutes%60); data/ibam-0.5.2/ibam.cpp:168:16: [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. system(command.c_str()); data/ibam-0.5.2/ibam.cpp:216:16: [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. system(command.c_str()); data/ibam-0.5.2/ibam.cpp:74:18: [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. string home(getenv("HOME")); data/ibam-0.5.2/ibam.cpp:112:13: [3] (buffer) getopt_long: 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. int c=getopt_long(argc,argv,"avbhcsr",long_options,&option_index); data/ibam-0.5.2/ibam-krell.cpp:44:13: [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[80]; data/ibam-0.5.2/ibam-krell1.cpp:40:13: [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[80]; data/ibam-0.5.2/ibam.cpp:139:25: [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). int n=atoi(optarg); data/ibam-0.5.2/ibam.cpp:189:25: [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). int n=atoi(optarg); data/ibam-0.5.2/ibam.cpp:279: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). int n=atoi(optarg); data/ibam-0.5.2/ibam.cpp:287: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). int n=atoi(optarg); ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 1067 in approximately 0.05 seconds (22301 lines/second) Physical Source Lines of Code (SLOC) = 759 Hits@level = [0] 0 [1] 0 [2] 6 [3] 2 [4] 4 [5] 0 Hits@level+ = [0+] 12 [1+] 12 [2+] 12 [3+] 6 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 15.8103 [1+] 15.8103 [2+] 15.8103 [3+] 7.90514 [4+] 5.27009 [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.