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/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp FINAL RESULTS: data/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp:447:23: [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. const char *ptr = getenv(var.c_str()); data/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp:209: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). file.open(conf_file.c_str(), ios::in); data/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp:303:5: [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 new_timestamp[26]; data/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp:313: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). file.open(log_file.c_str(), ios::in); data/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp:358: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). file.open(log_file.c_str(), ios::out); data/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp:382:12: [1] (buffer) equal: 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. return equal(str.begin() + str.size() - sfx.size(), str.end(), sfx.begin()); data/bosixnet-2.0/src/bosixnet-webui/bosixnet-webui.cpp:390:12: [1] (buffer) equal: 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. return equal(str.begin(), str.begin() + pfx.size(), pfx.begin()); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 499 in approximately 0.02 seconds (22740 lines/second) Physical Source Lines of Code (SLOC) = 409 Hits@level = [0] 2 [1] 2 [2] 4 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 9 [1+] 7 [2+] 5 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 22.0049 [1+] 17.1149 [2+] 12.2249 [3+] 2.44499 [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.