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/xrestop-0.4+git20130926/xrestop.c FINAL RESULTS: data/xrestop-0.4+git20130926/xrestop.c:57:28: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DBG(txt, args... ) fprintf(stderr, txt , ##args ) data/xrestop-0.4+git20130926/xrestop.c:505: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 pretty_pixmap_bytes[16] = { 0 }; data/xrestop-0.4+git20130926/xrestop.c:506: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 pretty_other_bytes[16] = { 0 }; data/xrestop-0.4+git20130926/xrestop.c:507: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 pretty_total_bytes[16] = { 0 }; data/xrestop-0.4+git20130926/xrestop.c:508: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 pretty_pid[16] = { 0 }; data/xrestop-0.4+git20130926/xrestop.c:678: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). app->delay = atoi(argv[i]); data/xrestop-0.4+git20130926/xrestop.c:686:23: [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). app->max_samples = atoi(argv[i]); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 773 in approximately 0.03 seconds (30696 lines/second) Physical Source Lines of Code (SLOC) = 559 Hits@level = [0] 8 [1] 0 [2] 6 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 15 [1+] 7 [2+] 7 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 26.8336 [1+] 12.5224 [2+] 12.5224 [3+] 1.78891 [4+] 1.78891 [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.