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/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.h Examining data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c Examining data/vanessa-logger-0.0.10/sample/vanessa_logger_sample_config.h Examining data/vanessa-logger-0.0.10/sample/unused.h Examining data/vanessa-logger-0.0.10/sample/vanessa_logger_sample.c FINAL RESULTS: data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:608:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (((vfprintf(fh, vl->buffer, ap) < 0 || fflush(fh) == EOF) && data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:611:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, vl->buffer, ap); data/vanessa-logger-0.0.10/sample/vanessa_logger_sample.c:39:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:387:7: [2] (misc) fopen: 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). fopen(vl->data.d_filename->filename, "a"); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:458:7: [2] (misc) fopen: 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). fopen(vl->data.d_filename->filename, "a"); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:577: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(vl->buffer + offset, prefix, len - 2); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:578: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(vl->buffer + offset + len - 2, ": ", 2); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:586: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(vl->buffer + offset, fmt, len); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:1078:8: [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. static char vanessa_logger_strherror_str[34]; data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:1126: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(buf, str, len); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:1292:3: [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(out_pos, "%02x", *in_pos); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:573:9: [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). len = strlen(prefix) + 2; data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:582:8: [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). len = strlen(fmt); data/vanessa-logger-0.0.10/libvanessa_logger/vanessa_logger.c:1120:8: [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). len = strlen(str) + 1; ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 2138 in approximately 0.08 seconds (25962 lines/second) Physical Source Lines of Code (SLOC) = 1049 Hits@level = [0] 37 [1] 3 [2] 8 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 51 [1+] 14 [2+] 11 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 48.6177 [1+] 13.346 [2+] 10.4862 [3+] 2.85987 [4+] 2.85987 [5+] 0 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.