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/rlog-1.4/rlog/rlog-prec99.h Examining data/rlog-1.4/rlog/rloginit.cpp Examining data/rlog-1.4/rlog/rloginit.h Examining data/rlog-1.4/rlog/rlog-novariadic.h Examining data/rlog-1.4/rlog/RLogTime.cpp Examining data/rlog-1.4/rlog/StdioNode.cpp Examining data/rlog-1.4/rlog/RLogNode.cpp Examining data/rlog-1.4/rlog/RLogPublisher.cpp Examining data/rlog-1.4/rlog/StdioNode.h Examining data/rlog-1.4/rlog/SyslogNode.h Examining data/rlog-1.4/rlog/common.h Examining data/rlog-1.4/rlog/rloglocation.h Examining data/rlog-1.4/rlog/rloglocation.cpp Examining data/rlog-1.4/rlog/RLogNode.h Examining data/rlog-1.4/rlog/Error.cpp Examining data/rlog-1.4/rlog/SyslogNode.cpp Examining data/rlog-1.4/rlog/RLogPublisher.h Examining data/rlog-1.4/rlog/test.cpp Examining data/rlog-1.4/rlog/RLogChannel.h Examining data/rlog-1.4/rlog/rlog.cpp Examining data/rlog-1.4/rlog/Error.h Examining data/rlog-1.4/rlog/Mutex.h Examining data/rlog-1.4/rlog/Lock.h Examining data/rlog-1.4/rlog/rlog-c99.h Examining data/rlog-1.4/rlog/RLogTime.h Examining data/rlog-1.4/rlog/rlog.h Examining data/rlog-1.4/rlog/RLogChannel.cpp Examining data/rlog-1.4/rlog/testlog.cpp FINAL RESULTS: data/rlog-1.4/rlog/Error.cpp:216:16: [4] (format) vsnprintf: 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. int ncpy = vsnprintf( msgBuf, sizeof(msgBuf), format, args ); data/rlog-1.4/rlog/Error.cpp:234:2: [4] (format) vsnprintf: 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. vsnprintf( buf, len, format, args ); data/rlog-1.4/rlog/RLogPublisher.cpp:160:13: [4] (format) vsnprintf: 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. int ncpy = vsnprintf( buf , bufSize, format, args ); data/rlog-1.4/rlog/StdioNode.cpp:172:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(timeStamp, "%s%02i:%02i:%02i%s ", data/rlog-1.4/rlog/Mutex.h:30:29: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define rlog_mutex_init InitializeCriticalSection data/rlog-1.4/rlog/Mutex.h:32:29: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define rlog_mutex_lock EnterCriticalSection data/rlog-1.4/rlog/Error.cpp:212: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 msgBuf[64]; data/rlog-1.4/rlog/RLogPublisher.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 msgBuf[64]; data/rlog-1.4/rlog/RLogPublisher.cpp:157: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( &args, &ap, sizeof(va_list) ); data/rlog-1.4/rlog/RLogTime.cpp:47:5: [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(&llEnd, &end, sizeof(long long)); data/rlog-1.4/rlog/RLogTime.cpp:48:5: [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(&llStart, &start, sizeof(long long)); data/rlog-1.4/rlog/RLogTime.cpp:69:5: [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(&ullEnd, &end, sizeof(ULONGLONG)); data/rlog-1.4/rlog/RLogTime.cpp:70:5: [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(&ullStart, &start, sizeof(ULONGLONG)); data/rlog-1.4/rlog/StdioNode.cpp:159: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 timeStamp[32]; data/rlog-1.4/rlog/StdioNode.cpp:199:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(timeStamp, "%02i:%02i:%02i ", data/rlog-1.4/rlog/StdioNode.cpp:221: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 tid[16] = ""; data/rlog-1.4/rlog/RLogChannel.cpp:188:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = next ? next - path : strlen( path ); ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 3498 in approximately 0.10 seconds (36105 lines/second) Physical Source Lines of Code (SLOC) = 1639 Hits@level = [0] 2 [1] 1 [2] 10 [3] 2 [4] 4 [5] 0 Hits@level+ = [0+] 19 [1+] 17 [2+] 16 [3+] 6 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 11.5924 [1+] 10.3722 [2+] 9.76205 [3+] 3.66077 [4+] 2.44051 [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.