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/gvidm-0.8/test/vidmode_parse_test.h Examining data/gvidm-0.8/test/parse_test.h Examining data/gvidm-0.8/vidmode_parse.cc Examining data/gvidm-0.8/vidmode.h Examining data/gvidm-0.8/xrandr.cc Examining data/gvidm-0.8/parse.cc Examining data/gvidm-0.8/_ios.h Examining data/gvidm-0.8/xvidmode.cc Examining data/gvidm-0.8/gvid.h Examining data/gvidm-0.8/_types.h Examining data/gvidm-0.8/vidmode.cc Examining data/gvidm-0.8/_sstream.h Examining data/gvidm-0.8/gvid.cc FINAL RESULTS: data/gvidm-0.8/vidmode.cc:88:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(label_str, "Screen %s%i", i<10?"_":"", i); data/gvidm-0.8/gvid.cc:129:9: [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. #define getopt_long(argc,argv,shopt,lopt,lidx) getopt(argc,argv,shopt) data/gvidm-0.8/gvid.cc:129:48: [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. #define getopt_long(argc,argv,shopt,lopt,lidx) getopt(argc,argv,shopt) data/gvidm-0.8/gvid.cc:148:18: [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. while (-1 != (c=getopt_long(argc, argv, "hlqr", long_options, NULL))) { data/gvidm-0.8/vidmode.cc:33:9: [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). return atoi(oss.str().c_str()); data/gvidm-0.8/vidmode.cc:62:2: [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 label_str[80]; ANALYSIS SUMMARY: Hits = 6 Lines analyzed = 1376 in approximately 0.11 seconds (13097 lines/second) Physical Source Lines of Code (SLOC) = 1049 Hits@level = [0] 14 [1] 0 [2] 2 [3] 3 [4] 1 [5] 0 Hits@level+ = [0+] 20 [1+] 6 [2+] 6 [3+] 4 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 19.0658 [1+] 5.71973 [2+] 5.71973 [3+] 3.81316 [4+] 0.953289 [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.