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/pcb2gcode-1.1.4-git20120902/Fixed.hpp Examining data/pcb2gcode-1.1.4-git20120902/board.cpp Examining data/pcb2gcode-1.1.4-git20120902/board.hpp Examining data/pcb2gcode-1.1.4-git20120902/coord.hpp Examining data/pcb2gcode-1.1.4-git20120902/drill.hpp Examining data/pcb2gcode-1.1.4-git20120902/exporter.hpp Examining data/pcb2gcode-1.1.4-git20120902/gerberimporter.cpp Examining data/pcb2gcode-1.1.4-git20120902/gerberimporter.hpp Examining data/pcb2gcode-1.1.4-git20120902/importer.hpp Examining data/pcb2gcode-1.1.4-git20120902/layer.hpp Examining data/pcb2gcode-1.1.4-git20120902/main.cpp Examining data/pcb2gcode-1.1.4-git20120902/mill.cpp Examining data/pcb2gcode-1.1.4-git20120902/mill.hpp Examining data/pcb2gcode-1.1.4-git20120902/ngc_exporter.hpp Examining data/pcb2gcode-1.1.4-git20120902/options.cpp Examining data/pcb2gcode-1.1.4-git20120902/options.hpp Examining data/pcb2gcode-1.1.4-git20120902/surface.cpp Examining data/pcb2gcode-1.1.4-git20120902/surface.hpp Examining data/pcb2gcode-1.1.4-git20120902/svg_exporter.hpp Examining data/pcb2gcode-1.1.4-git20120902/svg_exporter.cpp Examining data/pcb2gcode-1.1.4-git20120902/drill.cpp Examining data/pcb2gcode-1.1.4-git20120902/layer.cpp Examining data/pcb2gcode-1.1.4-git20120902/ngc_exporter.cpp FINAL RESULTS: data/pcb2gcode-1.1.4-git20120902/drill.cpp:48:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename.get(), cfilename); data/pcb2gcode-1.1.4-git20120902/gerberimporter.cpp:30:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename.get(), cfilename); data/pcb2gcode-1.1.4-git20120902/drill.cpp:84:23: [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). std::ofstream of; of.open( of_name.c_str() ); data/pcb2gcode-1.1.4-git20120902/drill.cpp:208:23: [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). std::ofstream of; of.open( outputname.c_str() ); data/pcb2gcode-1.1.4-git20120902/ngc_exporter.cpp:81:23: [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). std::ofstream of; of.open( of_name.c_str() ); data/pcb2gcode-1.1.4-git20120902/options.cpp:110:11: [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). stream.open(file.c_str()); data/pcb2gcode-1.1.4-git20120902/drill.cpp:47:47: [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). boost::scoped_array<char> filename( new char[strlen(cfilename) + 1] ); data/pcb2gcode-1.1.4-git20120902/gerberimporter.cpp:29:50: [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). boost::scoped_array<char> filename( new char[strlen(cfilename) + 1] ); ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 3560 in approximately 0.12 seconds (29727 lines/second) Physical Source Lines of Code (SLOC) = 2339 Hits@level = [0] 2 [1] 2 [2] 4 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 10 [1+] 8 [2+] 6 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 4.27533 [1+] 3.42027 [2+] 2.5652 [3+] 0.855066 [4+] 0.855066 [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.