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/bliss-0.73/bliss_C.h Examining data/bliss-0.73/bliss_C.cc Examining data/bliss-0.73/graph.cc Examining data/bliss-0.73/orbit.cc Examining data/bliss-0.73/uintseqhash.cc Examining data/bliss-0.73/partition.cc Examining data/bliss-0.73/utils.cc Examining data/bliss-0.73/heap.cc Examining data/bliss-0.73/timer.cc Examining data/bliss-0.73/defs.cc Examining data/bliss-0.73/bliss.cc FINAL RESULTS: data/bliss-0.73/bliss.cc:194:3: [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. vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); data/bliss-0.73/defs.cc:32:3: [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. vfprintf(stderr, fmt, ap); data/bliss-0.73/bliss.cc:251:16: [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). infile = fopen(infilename, "r"); data/bliss-0.73/bliss.cc:311:21: [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). FILE* const fp = fopen(opt_output_can_file, "w"); data/bliss-0.73/graph.cc:2086:20: [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). FILE* const fp = fopen(filename, "w"); data/bliss-0.73/graph.cc:4376:14: [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). FILE *fp = fopen(filename, "w"); data/bliss-0.73/bliss.cc:118:57: [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). else if((strncmp(argv[i], "-ocan=", 6) == 0) and (strlen(argv[i]) > 6)) data/bliss-0.73/bliss.cc:135:55: [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). else if((strncmp(argv[i], "-sh=", 4) == 0) and (strlen(argv[i]) > 4)) data/bliss-0.73/graph.cc:2202:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc(fp); data/bliss-0.73/graph.cc:2206:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = getc(fp)) != '\n') data/bliss-0.73/graph.cc:2261:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc(fp); data/bliss-0.73/graph.cc:3489:7: [1] (buffer) is_permutation: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if(!is_permutation(get_nof_vertices(), perm)) data/bliss-0.73/graph.cc:3532:46: [1] (buffer) is_permutation: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if(!(perm.size() == get_nof_vertices() and is_permutation(perm))) data/bliss-0.73/graph.cc:4052:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/bliss-0.73/graph.cc:4056:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((c = getc(fp)) != '\n') data/bliss-0.73/graph.cc:4113:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(fp); data/bliss-0.73/graph.cc:4340:7: [1] (buffer) is_permutation: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if(!is_permutation(get_nof_vertices(), perm)) data/bliss-0.73/graph.cc:5288:7: [1] (buffer) is_permutation: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if(!is_permutation(get_nof_vertices(), perm)) data/bliss-0.73/graph.cc:5322:46: [1] (buffer) is_permutation: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if(!(perm.size() == get_nof_vertices() and is_permutation(perm))) data/bliss-0.73/utils.cc:93:1: [1] (buffer) is_permutation: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. is_permutation(const unsigned int N, const unsigned int* perm) data/bliss-0.73/utils.cc:107:1: [1] (buffer) is_permutation: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. is_permutation(const std::vector<unsigned int>& perm) ANALYSIS SUMMARY: Hits = 21 Lines analyzed = 8045 in approximately 0.21 seconds (37776 lines/second) Physical Source Lines of Code (SLOC) = 5722 Hits@level = [0] 86 [1] 15 [2] 4 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 107 [1+] 21 [2+] 6 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 18.6998 [1+] 3.67005 [2+] 1.04858 [3+] 0.349528 [4+] 0.349528 [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.