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/forensics-colorize-1.1/src/bmp.h Examining data/forensics-colorize-1.1/src/filecompare.c Examining data/forensics-colorize-1.1/src/helpers.c Examining data/forensics-colorize-1.1/src/main.h Examining data/forensics-colorize-1.1/src/test.c Examining data/forensics-colorize-1.1/src/ui.c Examining data/forensics-colorize-1.1/src/colorize.c FINAL RESULTS: data/forensics-colorize-1.1/src/ui.c:10:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (vfprintf(HANDLE,MSG,ap) < 0) \ data/forensics-colorize-1.1/src/colorize.c:347:15: [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. while ((i = getopt(argc,argv,"w:ovhdV")) != -1) { data/forensics-colorize-1.1/src/filecompare.c:92:13: [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. while ((i=getopt(argc,argv,"tb:hV")) != -1) { data/forensics-colorize-1.1/src/colorize.c:294:23: [2] (misc) fopen: 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). if ((s->in_handle = fopen(input,"rb")) == NULL) data/forensics-colorize-1.1/src/colorize.c:303:24: [2] (misc) fopen: 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). if ((s->out_handle = fopen(output,"wb")) == NULL) data/forensics-colorize-1.1/src/filecompare.c:188:13: [2] (misc) fopen: 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). if ((h1 = fopen(fn1,"rb")) == NULL) data/forensics-colorize-1.1/src/filecompare.c:194:13: [2] (misc) fopen: 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). if ((h2 = fopen(fn2,"rb")) == NULL) data/forensics-colorize-1.1/src/colorize.c:219:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(s->in_handle); data/forensics-colorize-1.1/src/colorize.c:229:8: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(s->in_handle); data/forensics-colorize-1.1/src/colorize.c:261:6: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = fgetc(s->in_handle); data/forensics-colorize-1.1/src/filecompare.c:45:25: [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 (isalpha(input_str[strlen(input_str) - 1])) data/forensics-colorize-1.1/src/filecompare.c:47:29: [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). c = tolower(input_str[strlen(input_str) - 1]); data/forensics-colorize-1.1/src/filecompare.c:67:17: [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). input_str[strlen(input_str) - 1] = 0; ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 956 in approximately 0.68 seconds (1396 lines/second) Physical Source Lines of Code (SLOC) = 669 Hits@level = [0] 11 [1] 6 [2] 4 [3] 2 [4] 1 [5] 0 Hits@level+ = [0+] 24 [1+] 13 [2+] 7 [3+] 3 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 35.8744 [1+] 19.432 [2+] 10.4634 [3+] 4.4843 [4+] 1.49477 [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.