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/libpgf-6.14.12/include/PGFplatform.h Examining data/libpgf-6.14.12/include/PGFstream.h Examining data/libpgf-6.14.12/include/PGFtypes.h Examining data/libpgf-6.14.12/include/PGFimage.h Examining data/libpgf-6.14.12/src/BitStream.h Examining data/libpgf-6.14.12/src/Decoder.h Examining data/libpgf-6.14.12/src/Encoder.cpp Examining data/libpgf-6.14.12/src/Encoder.h Examining data/libpgf-6.14.12/src/PGFstream.cpp Examining data/libpgf-6.14.12/src/Subband.cpp Examining data/libpgf-6.14.12/src/Subband.h Examining data/libpgf-6.14.12/src/WaveletTransform.cpp Examining data/libpgf-6.14.12/src/WaveletTransform.h Examining data/libpgf-6.14.12/src/PGFimage.cpp Examining data/libpgf-6.14.12/src/Decoder.cpp FINAL RESULTS: data/libpgf-6.14.12/include/PGFtypes.h:105:2: [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 magic[3]; ///< PGF identification = "PGF" data/libpgf-6.14.12/src/PGFimage.cpp:77:2: [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(m_preHeader.magic, PGFMagic, 3); data/libpgf-6.14.12/src/PGFimage.cpp:855:2: [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(m_preHeader.magic, PGFMagic, 3); data/libpgf-6.14.12/src/PGFimage.cpp:860:2: [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(&m_header, &header, HeaderSize); data/libpgf-6.14.12/src/PGFimage.cpp:892:3: [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(m_postHeader.userData, userData, userDataLength); data/libpgf-6.14.12/src/PGFimage.cpp:943:7: [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(temp, m_channel[i], size*DataTSize); data/libpgf-6.14.12/src/PGFstream.cpp:118:3: [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(m_pos, buffPtr, *count); data/libpgf-6.14.12/src/PGFstream.cpp:138:3: [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(m_pos, buffPtr, *count); data/libpgf-6.14.12/src/PGFstream.cpp:156:3: [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(buffPtr, m_pos, *count); data/libpgf-6.14.12/src/PGFstream.cpp:161:3: [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(buffPtr, m_pos, *count); data/libpgf-6.14.12/include/PGFplatform.h:513:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *count = (int)read(hFile, buffPtr, *count); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 8379 in approximately 0.24 seconds (35582 lines/second) Physical Source Lines of Code (SLOC) = 4881 Hits@level = [0] 0 [1] 1 [2] 10 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 11 [1+] 11 [2+] 10 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 2.25364 [1+] 2.25364 [2+] 2.04876 [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.