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/vnlog-1.30/b64_cencode.c Examining data/vnlog-1.30/test/test1.c Examining data/vnlog-1.30/test/test2.c Examining data/vnlog-1.30/vnlog-base64.h Examining data/vnlog-1.30/vnlog.c Examining data/vnlog-1.30/vnlog.h FINAL RESULTS: data/vnlog-1.30/vnlog.c:106:5: [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(ctx->root->_fp, fmt, ap); data/vnlog-1.30/vnlog.c:224: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. snprintf(ctx->fields[idx].c, sizeof(ctx->fields[0].c), fmt, arg) ) \ data/vnlog-1.30/test/test2.c:8:16: [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). FILE* fp = fopen("test2.got", "w"); data/vnlog-1.30/vnlog.c:87: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 out_base64[vnlog_base64_dstlen_to_encode(ctx->fields[i].binlen)]; data/vnlog-1.30/vnlog.c:247: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(ctx->fields[idx].binptr, data, len); data/vnlog-1.30/vnlog.h:89: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 c[VNLOG_MAX_FIELD_LEN]; data/vnlog-1.30/test/test1.c:19:35: [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). vnlog_set_field_value__d(str, strlen(str)); ANALYSIS SUMMARY: Hits = 7 Lines analyzed = 900 in approximately 0.05 seconds (16445 lines/second) Physical Source Lines of Code (SLOC) = 460 Hits@level = [0] 2 [1] 1 [2] 4 [3] 0 [4] 2 [5] 0 Hits@level+ = [0+] 9 [1+] 7 [2+] 6 [3+] 2 [4+] 2 [5+] 0 Hits/KSLOC@level+ = [0+] 19.5652 [1+] 15.2174 [2+] 13.0435 [3+] 4.34783 [4+] 4.34783 [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.