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/qcalcfilehash-1.0.6+git20200806.0d09090/ObjectConsole.cpp Examining data/qcalcfilehash-1.0.6+git20200806.0d09090/main.cpp Examining data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.h Examining data/qcalcfilehash-1.0.6+git20200806.0d09090/ObjectConsole.h Examining data/qcalcfilehash-1.0.6+git20200806.0d09090/version.h Examining data/qcalcfilehash-1.0.6+git20200806.0d09090/mainwindow.cpp Examining data/qcalcfilehash-1.0.6+git20200806.0d09090/mainwindow.h Examining data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp FINAL RESULTS: data/qcalcfilehash-1.0.6+git20200806.0d09090/main.cpp:25:31: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. QString locale = QLocale::system().name(); data/qcalcfilehash-1.0.6+git20200806.0d09090/main.cpp:16:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. bool useGUI = getenv("DISPLAY") != NULL; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:82:16: [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. const unsigned char Crc8Table[256] = { data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:232:14: [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 buffer_md4[MD4_DIGEST_LENGTH]; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:270:14: [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 buffer_md5[MD5_DIGEST_LENGTH]; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:308:14: [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 buffer_sha1[SHA_DIGEST_LENGTH]; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:346:14: [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 buffer_sha224[SHA224_DIGEST_LENGTH]; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:384:14: [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 buffer_sha256[SHA256_DIGEST_LENGTH]; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:423:14: [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 buffer_sha384[SHA384_DIGEST_LENGTH]; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:460:14: [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 buffer_sha512[SHA512_DIGEST_LENGTH]; data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:173:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (file.read(buf,1)){ data/qcalcfilehash-1.0.6+git20200806.0d09090/ThreadCalcHash.cpp:209:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (file.read(buf,1)){ ANALYSIS SUMMARY: Hits = 12 Lines analyzed = 934 in approximately 0.03 seconds (28470 lines/second) Physical Source Lines of Code (SLOC) = 719 Hits@level = [0] 0 [1] 2 [2] 8 [3] 1 [4] 1 [5] 0 Hits@level+ = [0+] 12 [1+] 12 [2+] 10 [3+] 2 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 16.6898 [1+] 16.6898 [2+] 13.9082 [3+] 2.78164 [4+] 1.39082 [5+] 0 Dot directories skipped = 2 (--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.