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/m16c-flash-0.1/ccomport.cxx Examining data/m16c-flash-0.1/ccomport.h Examining data/m16c-flash-0.1/cm16flash.cxx Examining data/m16c-flash-0.1/cm16flash.h Examining data/m16c-flash-0.1/cmotfile.cxx Examining data/m16c-flash-0.1/cmotfile.h Examining data/m16c-flash-0.1/cpage.cxx Examining data/m16c-flash-0.1/cpage.h Examining data/m16c-flash-0.1/flashm16.cxx FINAL RESULTS: data/m16c-flash-0.1/cm16flash.cxx:230:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(pszVersionInfo); data/m16c-flash-0.1/ccomport.cxx:41:10: [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). m_fd = open(pszDev, O_RDWR | O_NOCTTY | O_NDELAY); data/m16c-flash-0.1/cm16flash.cxx:68:12: [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 ucSRDs[2]; data/m16c-flash-0.1/cm16flash.cxx:125:12: [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 ucSRDs[2]; data/m16c-flash-0.1/cm16flash.cxx:270:12: [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 ucSRDs[2]; data/m16c-flash-0.1/cm16flash.cxx:331:12: [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 ucSRDs[2]; data/m16c-flash-0.1/cmotfile.cxx:43:10: [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). m_fp = fopen(pszFilename, "r"); data/m16c-flash-0.1/flashm16.cxx:70:12: [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 ucSRDs[2]; data/m16c-flash-0.1/flashm16.cxx:71: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 szVersion[9]; data/m16c-flash-0.1/ccomport.cxx:143:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( read(m_fd, &pBuffer[n], 1) == -1 ) { data/m16c-flash-0.1/cm16flash.cxx:44:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(M16_DELAY); data/m16c-flash-0.1/cm16flash.cxx:79:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(M16_DELAY); data/m16c-flash-0.1/cm16flash.cxx:89:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(M16_DELAY); ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 1319 in approximately 0.05 seconds (25001 lines/second) Physical Source Lines of Code (SLOC) = 739 Hits@level = [0] 62 [1] 4 [2] 8 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 75 [1+] 13 [2+] 9 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 101.488 [1+] 17.5913 [2+] 12.1786 [3+] 1.35318 [4+] 1.35318 [5+] 0 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.