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/ocaml-integers-0.4.0/src/ocaml_integers.h Examining data/ocaml-integers-0.4.0/src/unsigned_stubs.c FINAL RESULTS: data/ocaml-integers-0.4.0/src/unsigned_stubs.c:152:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(String_val(a), "%" SCNu ## BITS , &u) != 1) \ data/ocaml-integers-0.4.0/src/unsigned_stubs.c:162:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if (sprintf(buf, "%" PRIu ## BITS , Uint_custom_val(BITS, a)) < 0) \ data/ocaml-integers-0.4.0/src/unsigned_stubs.c:179:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(String_val(a), "%" SCNu ## BITS , &u) != 1) \ data/ocaml-integers-0.4.0/src/unsigned_stubs.c:189:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if (sprintf(buf, "%" PRIu ## BITS , Uint ## BITS ##_val(a)) < 0) \ data/ocaml-integers-0.4.0/src/unsigned_stubs.c:161: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[BUF_SIZE(TYPE(BITS))]; \ data/ocaml-integers-0.4.0/src/unsigned_stubs.c:188: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[BUF_SIZE(TYPE(BITS))]; \ ANALYSIS SUMMARY: Hits = 6 Lines analyzed = 300 in approximately 0.02 seconds (13325 lines/second) Physical Source Lines of Code (SLOC) = 265 Hits@level = [0] 0 [1] 0 [2] 2 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 6 [1+] 6 [2+] 6 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 22.6415 [1+] 22.6415 [2+] 22.6415 [3+] 15.0943 [4+] 15.0943 [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.