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/libsoldout-1.4/array.c Examining data/libsoldout-1.4/markdown.h Examining data/libsoldout-1.4/benchmark.c Examining data/libsoldout-1.4/buffer.h Examining data/libsoldout-1.4/renderers.h Examining data/libsoldout-1.4/mkd2man.c Examining data/libsoldout-1.4/array.h Examining data/libsoldout-1.4/buffer.c Examining data/libsoldout-1.4/renderers.c Examining data/libsoldout-1.4/mkd2html.c Examining data/libsoldout-1.4/mkd2latex.c Examining data/libsoldout-1.4/markdown.c FINAL RESULTS: data/libsoldout-1.4/buffer.c:286:6: [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. n = vsnprintf(buf->data + buf->size, buf->asize - buf->size, fmt, ap); data/libsoldout-1.4/buffer.c:291:7: [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. n = vsnprintf (buf->data + buf->size, data/libsoldout-1.4/buffer.h:75:26: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf, format_index, first_variadic_index))) data/libsoldout-1.4/mkd2html.c:82:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. (ch = getopt_long(argc, argv, "dHhmnx", longopts, 0)) != -1) data/libsoldout-1.4/mkd2man.c:256:12: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. (ch = getopt_long(argc, argv, "d:hs:t:", longopts, 0)) != -1) data/libsoldout-1.4/benchmark.c:69:10: [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). nb = atoi(argv[i] + 2); data/libsoldout-1.4/benchmark.c:90:9: [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). in = fopen(argv[f], "r"); data/libsoldout-1.4/buffer.c:125: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(ret->data, src->data, src->size); data/libsoldout-1.4/buffer.c:192: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->data + buf->size, data, len); data/libsoldout-1.4/mkd2html.c:115:8: [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). in = fopen(argv[0], "r"); data/libsoldout-1.4/mkd2latex.c:414:8: [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). in = fopen(argv[1], "r"); data/libsoldout-1.4/mkd2man.c:236:2: [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 datebuf[64]; data/libsoldout-1.4/mkd2man.c:286:8: [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). in = fopen(argv[0], "r"); data/libsoldout-1.4/buffer.c:92:21: [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). const size_t len = strlen(b); data/libsoldout-1.4/buffer.c:199:19: [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). bufput(buf, str, strlen (str)); } data/libsoldout-1.4/buffer.h:51:31: [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). struct buf name = { strname, strlen(strname) } data/libsoldout-1.4/mkd2man.c:265: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). if (strlen(optarg) != 1 && data/libsoldout-1.4/mkd2man.c:320:18: [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). for (i = 0; i < strlen(man_metadata.title); i++) ANALYSIS SUMMARY: Hits = 18 Lines analyzed = 4610 in approximately 0.15 seconds (30731 lines/second) Physical Source Lines of Code (SLOC) = 3163 Hits@level = [0] 22 [1] 5 [2] 8 [3] 2 [4] 3 [5] 0 Hits@level+ = [0+] 40 [1+] 18 [2+] 13 [3+] 5 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 12.6462 [1+] 5.6908 [2+] 4.11002 [3+] 1.58078 [4+] 0.948467 [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.