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/varconf-1.0.1/tests/conftest.cpp Examining data/varconf-1.0.1/varconf/dyntypes.cpp Examining data/varconf-1.0.1/varconf/config.h Examining data/varconf-1.0.1/varconf/dyncmp.cpp Examining data/varconf-1.0.1/varconf/varconf.h Examining data/varconf-1.0.1/varconf/parse_error.cpp Examining data/varconf-1.0.1/varconf/varconf_defs.h Examining data/varconf-1.0.1/varconf/dynvar.h Examining data/varconf-1.0.1/varconf/dyncmp.h Examining data/varconf-1.0.1/varconf/config.cpp Examining data/varconf-1.0.1/varconf/parse_error.h Examining data/varconf-1.0.1/varconf/dyntypes.h Examining data/varconf-1.0.1/varconf/variable.cpp Examining data/varconf-1.0.1/varconf/variable.h Examining data/varconf-1.0.1/varconf/dynbase.h Examining data/varconf-1.0.1/varconf/dynbase.cpp FINAL RESULTS: data/varconf-1.0.1/varconf/config.cpp:36:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/varconf-1.0.1/varconf/config.cpp:36:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/varconf-1.0.1/varconf/parse_error.cpp:34:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/varconf-1.0.1/varconf/parse_error.cpp:34:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/varconf-1.0.1/varconf/variable.cpp:35:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/varconf-1.0.1/varconf/variable.cpp:35:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/varconf-1.0.1/varconf/config.cpp:138: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 buf[1024]; data/varconf-1.0.1/varconf/config.cpp:261:11: [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 buf[1024]; data/varconf-1.0.1/varconf/config.cpp:269:9: [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 buf[1024]; data/varconf-1.0.1/varconf/config.cpp:532: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 buf[1024]; data/varconf-1.0.1/varconf/config.cpp:544: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 buf[1024]; data/varconf-1.0.1/varconf/config.cpp:561: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 buf[1024]; data/varconf-1.0.1/varconf/config.cpp:596: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 buf[1024]; data/varconf-1.0.1/varconf/parse_error.cpp:65: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 buf[1024]; data/varconf-1.0.1/varconf/variable.cpp:77: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 buf[1024]; data/varconf-1.0.1/varconf/variable.cpp:87: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 buf[1024]; data/varconf-1.0.1/varconf/variable.cpp:161: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 buf[1024]; snprintf(buf, 1024, "%d", i); data/varconf-1.0.1/varconf/variable.cpp:173: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 buf[1024]; snprintf(buf, 1024, "%lf", d); data/varconf-1.0.1/varconf/variable.cpp:212:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). m_val_int = atoi(m_val.c_str()); data/varconf-1.0.1/varconf/dynvar.h:47:17: [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. inline Variable equal(const Variable& one, const Variable& two) ANALYSIS SUMMARY: Hits = 20 Lines analyzed = 2582 in approximately 0.07 seconds (35213 lines/second) Physical Source Lines of Code (SLOC) = 1733 Hits@level = [0] 13 [1] 1 [2] 13 [3] 0 [4] 6 [5] 0 Hits@level+ = [0+] 33 [1+] 20 [2+] 19 [3+] 6 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 19.0421 [1+] 11.5407 [2+] 10.9636 [3+] 3.4622 [4+] 3.4622 [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.