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-alsa-0.3.0/src/alsa_stubs.c

FINAL RESULTS:

data/ocaml-alsa-0.3.0/src/alsa_stubs.c:756:32:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
static int int_of_access(value access)
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:758:19:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  int a = Int_val(access);
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:768:75:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
CAMLprim value ocaml_snd_pcm_set_access(value handle, value params, value access)
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:770:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  CAMLparam3(handle, params, access);
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:772:107:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  check_for_err(snd_pcm_hw_params_set_access(Pcm_handle_val(handle), Hw_params_val(params), int_of_access(access)));
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:920:29:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
static int get_access(value access)
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:922:19:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  int a = Int_val(access);
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:933:71:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
CAMLprim value ocaml_snd_set_access(value handle, value params, value access)
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:935:30:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  CAMLparam3(handle, params, access);
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:937:104:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  check_for_err(snd_pcm_hw_params_set_access(Pcm_handle_val(handle), Hw_params_val(params), get_access(access)));
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:316: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((void*)String_val(dbuf) + ofs, buf, len * Frame_size_val(handle_));
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:335: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(buf, String_val(sbuf) + ofs, len * Frame_size_val(handle_));
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:369: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((void*)String_val(Field(dbuf, c)) + ofs, buf[c], 2 * len);
data/ocaml-alsa-0.3.0/src/alsa_stubs.c:394: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(buf[c], String_val(Field(sbuf, c)) + ofs, 2 * len);

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 1224 in approximately 0.05 seconds (22413 lines/second)
Physical Source Lines of Code (SLOC) = 952
Hits@level = [0]   1 [1]   0 [2]   4 [3]   0 [4]  10 [5]   0
Hits@level+ = [0+]  15 [1+]  14 [2+]  14 [3+]  10 [4+]  10 [5+]   0
Hits/KSLOC@level+ = [0+] 15.7563 [1+] 14.7059 [2+] 14.7059 [3+] 10.5042 [4+] 10.5042 [5+]   0
Dot directories skipped = 2 (--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.