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-zarith-1.10/caml_z.c Examining data/ocaml-zarith-1.10/tests/setround.c Examining data/ocaml-zarith-1.10/zarith.h FINAL RESULTS: data/ocaml-zarith-1.10/caml_z.c:338: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(dst, src, sz * sizeof(mp_limb_t)); data/ocaml-zarith-1.10/caml_z.c:345: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(r, src, sz * sizeof(mp_limb_t)); data/ocaml-zarith-1.10/caml_z.c:530: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(&y, (void *) v, 8); data/ocaml-zarith-1.10/caml_z.c:774: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. const char tab[2][16] = data/ocaml-zarith-1.10/caml_z.c:641:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dd,d,sz); data/ocaml-zarith-1.10/caml_z.c:838:16: [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 = strlen(prefix); i > 0; i--, size_dst++) data/ocaml-zarith-1.10/caml_z.c:846:16: [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 = strlen(prefix); i > 0; i--, size_dst++) data/ocaml-zarith-1.10/caml_z.c:854:14: [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). width -= strlen(prefix) + (sign ? 1 : 0); data/ocaml-zarith-1.10/caml_z.c:856:14: [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 = strlen(prefix); i > 0; i--, size_dst++) ANALYSIS SUMMARY: Hits = 9 Lines analyzed = 3403 in approximately 0.11 seconds (32350 lines/second) Physical Source Lines of Code (SLOC) = 2841 Hits@level = [0] 11 [1] 5 [2] 4 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 20 [1+] 9 [2+] 4 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 7.03977 [1+] 3.1679 [2+] 1.40795 [3+] 0 [4+] 0 [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.