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/maim-5.6.3/src/cxxopts.hpp Examining data/maim-5.6.3/src/image.cpp Examining data/maim-5.6.3/src/image.hpp Examining data/maim-5.6.3/src/main.cpp Examining data/maim-5.6.3/src/x.cpp Examining data/maim-5.6.3/src/x.hpp FINAL RESULTS: data/maim-5.6.3/src/image.cpp:278:14: [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. unsigned char pixels[xcursor->width * xcursor->height * 4]; data/maim-5.6.3/src/main.cpp:238:9: [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( cxdisplay, xdisplay.c_str(), xdisplay.length() ); data/maim-5.6.3/src/main.cpp:245:9: [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( cshaders, shaders.c_str(), shaders.length() ); data/maim-5.6.3/src/main.cpp:524:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file->open(maimOptions->savepath.c_str()); ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 2861 in approximately 0.09 seconds (30308 lines/second) Physical Source Lines of Code (SLOC) = 2231 Hits@level = [0] 0 [1] 0 [2] 4 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 4 [1+] 4 [2+] 4 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.79292 [1+] 1.79292 [2+] 1.79292 [3+] 0 [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.