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-4.11.1/utils/domainstate.mli.c Examining data/ocaml-4.11.1/utils/domainstate.ml.c Examining data/ocaml-4.11.1/otherlibs/win32unix/winworker.c Examining data/ocaml-4.11.1/otherlibs/win32unix/gettimeofday.c Examining data/ocaml-4.11.1/otherlibs/win32unix/read.c Examining data/ocaml-4.11.1/otherlibs/win32unix/mmap.c Examining data/ocaml-4.11.1/otherlibs/win32unix/envir.c Examining data/ocaml-4.11.1/otherlibs/win32unix/system.c Examining data/ocaml-4.11.1/otherlibs/win32unix/unixsupport.c Examining data/ocaml-4.11.1/otherlibs/win32unix/socket.c Examining data/ocaml-4.11.1/otherlibs/win32unix/winwait.c Examining data/ocaml-4.11.1/otherlibs/win32unix/nonblock.c Examining data/ocaml-4.11.1/otherlibs/win32unix/link.c Examining data/ocaml-4.11.1/otherlibs/win32unix/getsockname.c Examining data/ocaml-4.11.1/otherlibs/win32unix/lseek.c Examining data/ocaml-4.11.1/otherlibs/win32unix/select.c Examining data/ocaml-4.11.1/otherlibs/win32unix/shutdown.c Examining data/ocaml-4.11.1/otherlibs/win32unix/sockopt.c Examining data/ocaml-4.11.1/otherlibs/win32unix/mkdir.c Examining data/ocaml-4.11.1/otherlibs/win32unix/lockf.c Examining data/ocaml-4.11.1/otherlibs/win32unix/times.c Examining data/ocaml-4.11.1/otherlibs/win32unix/errmsg.c Examining data/ocaml-4.11.1/otherlibs/win32unix/stat.c Examining data/ocaml-4.11.1/otherlibs/win32unix/windbug.c Examining data/ocaml-4.11.1/otherlibs/win32unix/sleep.c Examining data/ocaml-4.11.1/otherlibs/win32unix/listen.c Examining data/ocaml-4.11.1/otherlibs/win32unix/close_on.c Examining data/ocaml-4.11.1/otherlibs/win32unix/sendrecv.c Examining data/ocaml-4.11.1/otherlibs/win32unix/open.c Examining data/ocaml-4.11.1/otherlibs/win32unix/channels.c Examining data/ocaml-4.11.1/otherlibs/win32unix/createprocess.c Examining data/ocaml-4.11.1/otherlibs/win32unix/unixsupport.h Examining data/ocaml-4.11.1/otherlibs/win32unix/isatty.c Examining data/ocaml-4.11.1/otherlibs/win32unix/dup.c Examining data/ocaml-4.11.1/otherlibs/win32unix/write.c Examining data/ocaml-4.11.1/otherlibs/win32unix/utimes.c Examining data/ocaml-4.11.1/otherlibs/win32unix/getpid.c Examining data/ocaml-4.11.1/otherlibs/win32unix/close.c Examining data/ocaml-4.11.1/otherlibs/win32unix/accept.c Examining data/ocaml-4.11.1/otherlibs/win32unix/dup2.c Examining data/ocaml-4.11.1/otherlibs/win32unix/winlist.h Examining data/ocaml-4.11.1/otherlibs/win32unix/windir.c Examining data/ocaml-4.11.1/otherlibs/win32unix/startup.c Examining data/ocaml-4.11.1/otherlibs/win32unix/socketaddr.h Examining data/ocaml-4.11.1/otherlibs/win32unix/windbug.h Examining data/ocaml-4.11.1/otherlibs/win32unix/getpeername.c Examining data/ocaml-4.11.1/otherlibs/win32unix/rename.c Examining data/ocaml-4.11.1/otherlibs/win32unix/connect.c Examining data/ocaml-4.11.1/otherlibs/win32unix/winworker.h Examining data/ocaml-4.11.1/otherlibs/win32unix/winlist.c Examining data/ocaml-4.11.1/otherlibs/win32unix/truncate.c Examining data/ocaml-4.11.1/otherlibs/win32unix/pipe.c Examining data/ocaml-4.11.1/otherlibs/win32unix/symlink.c Examining data/ocaml-4.11.1/otherlibs/win32unix/bind.c Examining data/ocaml-4.11.1/otherlibs/win32unix/readlink.c Examining data/ocaml-4.11.1/otherlibs/bigarray/empty.c Examining data/ocaml-4.11.1/otherlibs/str/strstubs.c Examining data/ocaml-4.11.1/otherlibs/raw_spacetime_lib/spacetime_offline.c Examining data/ocaml-4.11.1/otherlibs/systhreads/threads.h Examining data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h Examining data/ocaml-4.11.1/otherlibs/systhreads/st_stubs.c Examining data/ocaml-4.11.1/otherlibs/systhreads/st_posix.h Examining data/ocaml-4.11.1/otherlibs/unix/gettimeofday.c Examining data/ocaml-4.11.1/otherlibs/unix/execv.c Examining data/ocaml-4.11.1/otherlibs/unix/strofaddr.c Examining data/ocaml-4.11.1/otherlibs/unix/getproto.c Examining data/ocaml-4.11.1/otherlibs/unix/read.c Examining data/ocaml-4.11.1/otherlibs/unix/fsync.c Examining data/ocaml-4.11.1/otherlibs/unix/getcwd.c Examining data/ocaml-4.11.1/otherlibs/unix/getgr.c Examining data/ocaml-4.11.1/otherlibs/unix/exit.c Examining data/ocaml-4.11.1/otherlibs/unix/mmap.c Examining data/ocaml-4.11.1/otherlibs/unix/unlink.c Examining data/ocaml-4.11.1/otherlibs/unix/setgid.c Examining data/ocaml-4.11.1/otherlibs/unix/setsid.c Examining data/ocaml-4.11.1/otherlibs/unix/cstringv.c Examining data/ocaml-4.11.1/otherlibs/unix/unixsupport.c Examining data/ocaml-4.11.1/otherlibs/unix/chroot.c Examining data/ocaml-4.11.1/otherlibs/unix/socket.c Examining data/ocaml-4.11.1/otherlibs/unix/nanosecond_stat.h Examining data/ocaml-4.11.1/otherlibs/unix/chmod.c Examining data/ocaml-4.11.1/otherlibs/unix/time.c Examining data/ocaml-4.11.1/otherlibs/unix/link.c Examining data/ocaml-4.11.1/otherlibs/unix/setgroups.c Examining data/ocaml-4.11.1/otherlibs/unix/itimer.c Examining data/ocaml-4.11.1/otherlibs/unix/getsockname.c Examining data/ocaml-4.11.1/otherlibs/unix/termios.c Examining data/ocaml-4.11.1/otherlibs/unix/lseek.c Examining data/ocaml-4.11.1/otherlibs/unix/select.c Examining data/ocaml-4.11.1/otherlibs/unix/signals.c Examining data/ocaml-4.11.1/otherlibs/unix/shutdown.c Examining data/ocaml-4.11.1/otherlibs/unix/sockopt.c Examining data/ocaml-4.11.1/otherlibs/unix/socketaddr.c Examining data/ocaml-4.11.1/otherlibs/unix/socketpair.c Examining data/ocaml-4.11.1/otherlibs/unix/mkdir.c Examining data/ocaml-4.11.1/otherlibs/unix/lockf.c Examining data/ocaml-4.11.1/otherlibs/unix/times.c Examining data/ocaml-4.11.1/otherlibs/unix/chdir.c Examining data/ocaml-4.11.1/otherlibs/unix/gethostname.c Examining data/ocaml-4.11.1/otherlibs/unix/errmsg.c Examining data/ocaml-4.11.1/otherlibs/unix/stat.c Examining data/ocaml-4.11.1/otherlibs/unix/fchown.c Examining data/ocaml-4.11.1/otherlibs/unix/sleep.c Examining data/ocaml-4.11.1/otherlibs/unix/listen.c Examining data/ocaml-4.11.1/otherlibs/unix/setuid.c Examining data/ocaml-4.11.1/otherlibs/unix/sendrecv.c Examining data/ocaml-4.11.1/otherlibs/unix/open.c Examining data/ocaml-4.11.1/otherlibs/unix/getaddrinfo.c Examining data/ocaml-4.11.1/otherlibs/unix/cst2constr.c Examining data/ocaml-4.11.1/otherlibs/unix/getpw.c Examining data/ocaml-4.11.1/otherlibs/unix/channels.c Examining data/ocaml-4.11.1/otherlibs/unix/getserv.c Examining data/ocaml-4.11.1/otherlibs/unix/rewinddir.c Examining data/ocaml-4.11.1/otherlibs/unix/getgroups.c Examining data/ocaml-4.11.1/otherlibs/unix/fcntl.c Examining data/ocaml-4.11.1/otherlibs/unix/gmtime.c Examining data/ocaml-4.11.1/otherlibs/unix/geteuid.c Examining data/ocaml-4.11.1/otherlibs/unix/unixsupport.h Examining data/ocaml-4.11.1/otherlibs/unix/isatty.c Examining data/ocaml-4.11.1/otherlibs/unix/umask.c Examining data/ocaml-4.11.1/otherlibs/unix/alarm.c Examining data/ocaml-4.11.1/otherlibs/unix/dup.c Examining data/ocaml-4.11.1/otherlibs/unix/getnameinfo.c Examining data/ocaml-4.11.1/otherlibs/unix/write.c Examining data/ocaml-4.11.1/otherlibs/unix/closedir.c Examining data/ocaml-4.11.1/otherlibs/unix/putenv.c Examining data/ocaml-4.11.1/otherlibs/unix/utimes.c Examining data/ocaml-4.11.1/otherlibs/unix/getpid.c Examining data/ocaml-4.11.1/otherlibs/unix/getlogin.c Examining data/ocaml-4.11.1/otherlibs/unix/close.c Examining data/ocaml-4.11.1/otherlibs/unix/accept.c Examining data/ocaml-4.11.1/otherlibs/unix/rmdir.c Examining data/ocaml-4.11.1/otherlibs/unix/dup2.c Examining data/ocaml-4.11.1/otherlibs/unix/addrofstr.c Examining data/ocaml-4.11.1/otherlibs/unix/execvp.c Examining data/ocaml-4.11.1/otherlibs/unix/mkfifo.c Examining data/ocaml-4.11.1/otherlibs/unix/fork.c Examining data/ocaml-4.11.1/otherlibs/unix/socketaddr.h Examining data/ocaml-4.11.1/otherlibs/unix/readdir.c Examining data/ocaml-4.11.1/otherlibs/unix/getppid.c Examining data/ocaml-4.11.1/otherlibs/unix/mmap_ba.c Examining data/ocaml-4.11.1/otherlibs/unix/getpeername.c Examining data/ocaml-4.11.1/otherlibs/unix/access.c Examining data/ocaml-4.11.1/otherlibs/unix/fchmod.c Examining data/ocaml-4.11.1/otherlibs/unix/rename.c Examining data/ocaml-4.11.1/otherlibs/unix/connect.c Examining data/ocaml-4.11.1/otherlibs/unix/cst2constr.h Examining data/ocaml-4.11.1/otherlibs/unix/getegid.c Examining data/ocaml-4.11.1/otherlibs/unix/getgid.c Examining data/ocaml-4.11.1/otherlibs/unix/kill.c Examining data/ocaml-4.11.1/otherlibs/unix/truncate.c Examining data/ocaml-4.11.1/otherlibs/unix/chown.c Examining data/ocaml-4.11.1/otherlibs/unix/execve.c Examining data/ocaml-4.11.1/otherlibs/unix/pipe.c Examining data/ocaml-4.11.1/otherlibs/unix/ftruncate.c Examining data/ocaml-4.11.1/otherlibs/unix/opendir.c Examining data/ocaml-4.11.1/otherlibs/unix/getuid.c Examining data/ocaml-4.11.1/otherlibs/unix/symlink.c Examining data/ocaml-4.11.1/otherlibs/unix/nice.c Examining data/ocaml-4.11.1/otherlibs/unix/initgroups.c Examining data/ocaml-4.11.1/otherlibs/unix/bind.c Examining data/ocaml-4.11.1/otherlibs/unix/gethost.c Examining data/ocaml-4.11.1/otherlibs/unix/readlink.c Examining data/ocaml-4.11.1/otherlibs/unix/wait.c Examining data/ocaml-4.11.1/otherlibs/unix/envir.c Examining data/ocaml-4.11.1/runtime/startup_aux.c Examining data/ocaml-4.11.1/runtime/spacetime_nat.c Examining data/ocaml-4.11.1/runtime/signals_byt.c Examining data/ocaml-4.11.1/runtime/md5.c Examining data/ocaml-4.11.1/runtime/fail_nat.c Examining data/ocaml-4.11.1/runtime/roots_nat.c Examining data/ocaml-4.11.1/runtime/globroots.c Examining data/ocaml-4.11.1/runtime/fail_byt.c Examining data/ocaml-4.11.1/runtime/eventlog.c Examining data/ocaml-4.11.1/runtime/meta.c Examining data/ocaml-4.11.1/runtime/dynlink_nat.c Examining data/ocaml-4.11.1/runtime/floats.c Examining data/ocaml-4.11.1/runtime/afl.c Examining data/ocaml-4.11.1/runtime/compact.c Examining data/ocaml-4.11.1/runtime/minor_gc.c Examining data/ocaml-4.11.1/runtime/parsing.c Examining data/ocaml-4.11.1/runtime/signals_nat.c Examining data/ocaml-4.11.1/runtime/unix.c Examining data/ocaml-4.11.1/runtime/hash.c Examining data/ocaml-4.11.1/runtime/signals.c Examining data/ocaml-4.11.1/runtime/io.c Examining data/ocaml-4.11.1/runtime/memprof.c Examining data/ocaml-4.11.1/runtime/str.c Examining data/ocaml-4.11.1/runtime/lexing.c Examining data/ocaml-4.11.1/runtime/intern.c Examining data/ocaml-4.11.1/runtime/bigarray.c Examining data/ocaml-4.11.1/runtime/custom.c Examining data/ocaml-4.11.1/runtime/startup_nat.c Examining data/ocaml-4.11.1/runtime/spacetime_byt.c Examining data/ocaml-4.11.1/runtime/freelist.c Examining data/ocaml-4.11.1/runtime/signals_osdep.h Examining data/ocaml-4.11.1/runtime/stacks.c Examining data/ocaml-4.11.1/runtime/array.c Examining data/ocaml-4.11.1/runtime/printexc.c Examining data/ocaml-4.11.1/runtime/main.c Examining data/ocaml-4.11.1/runtime/alloc.c Examining data/ocaml-4.11.1/runtime/memory.c Examining data/ocaml-4.11.1/runtime/sys.c Examining data/ocaml-4.11.1/runtime/obj.c Examining data/ocaml-4.11.1/runtime/gc_ctrl.c Examining data/ocaml-4.11.1/runtime/domain.c Examining data/ocaml-4.11.1/runtime/caml/custom.h Examining data/ocaml-4.11.1/runtime/caml/domain_state.h Examining data/ocaml-4.11.1/runtime/caml/mlvalues.h Examining data/ocaml-4.11.1/runtime/caml/address_class.h Examining data/ocaml-4.11.1/runtime/caml/exec.h Examining data/ocaml-4.11.1/runtime/caml/printexc.h Examining data/ocaml-4.11.1/runtime/caml/instruct.h Examining data/ocaml-4.11.1/runtime/caml/callback.h Examining data/ocaml-4.11.1/runtime/caml/compact.h Examining data/ocaml-4.11.1/runtime/caml/hooks.h Examining data/ocaml-4.11.1/runtime/caml/gc.h Examining data/ocaml-4.11.1/runtime/caml/memory.h Examining data/ocaml-4.11.1/runtime/caml/dynlink.h Examining data/ocaml-4.11.1/runtime/caml/minor_gc.h Examining data/ocaml-4.11.1/runtime/caml/misc.h Examining data/ocaml-4.11.1/runtime/caml/finalise.h Examining data/ocaml-4.11.1/runtime/caml/roots.h Examining data/ocaml-4.11.1/runtime/caml/weak.h Examining data/ocaml-4.11.1/runtime/caml/prims.h Examining data/ocaml-4.11.1/runtime/caml/gc_ctrl.h Examining data/ocaml-4.11.1/runtime/caml/interp.h Examining data/ocaml-4.11.1/runtime/caml/eventlog.h Examining data/ocaml-4.11.1/runtime/caml/startup_aux.h Examining data/ocaml-4.11.1/runtime/caml/spacetime.h Examining data/ocaml-4.11.1/runtime/caml/debugger.h Examining data/ocaml-4.11.1/runtime/caml/startup.h Examining data/ocaml-4.11.1/runtime/caml/compatibility.h Examining data/ocaml-4.11.1/runtime/caml/io.h Examining data/ocaml-4.11.1/runtime/caml/fail.h Examining data/ocaml-4.11.1/runtime/caml/hash.h Examining data/ocaml-4.11.1/runtime/caml/bigarray.h Examining data/ocaml-4.11.1/runtime/caml/osdeps.h Examining data/ocaml-4.11.1/runtime/caml/signals_machdep.h Examining data/ocaml-4.11.1/runtime/caml/intext.h Examining data/ocaml-4.11.1/runtime/caml/reverse.h Examining data/ocaml-4.11.1/runtime/caml/globroots.h Examining data/ocaml-4.11.1/runtime/caml/config.h Examining data/ocaml-4.11.1/runtime/caml/instrtrace.h Examining data/ocaml-4.11.1/runtime/caml/freelist.h Examining data/ocaml-4.11.1/runtime/caml/stacks.h Examining data/ocaml-4.11.1/runtime/caml/memprof.h Examining data/ocaml-4.11.1/runtime/caml/backtrace_prim.h Examining data/ocaml-4.11.1/runtime/caml/ui.h Examining data/ocaml-4.11.1/runtime/caml/fix_code.h Examining data/ocaml-4.11.1/runtime/caml/alloc.h Examining data/ocaml-4.11.1/runtime/caml/stack.h Examining data/ocaml-4.11.1/runtime/caml/md5.h Examining data/ocaml-4.11.1/runtime/caml/domain.h Examining data/ocaml-4.11.1/runtime/caml/compare.h Examining data/ocaml-4.11.1/runtime/caml/sys.h Examining data/ocaml-4.11.1/runtime/caml/signals.h Examining data/ocaml-4.11.1/runtime/caml/major_gc.h Examining data/ocaml-4.11.1/runtime/caml/backtrace.h Examining data/ocaml-4.11.1/runtime/clambda_checks.c Examining data/ocaml-4.11.1/runtime/fix_code.c Examining data/ocaml-4.11.1/runtime/interp.c Examining data/ocaml-4.11.1/runtime/instrtrace.c Examining data/ocaml-4.11.1/runtime/callback.c Examining data/ocaml-4.11.1/runtime/finalise.c Examining data/ocaml-4.11.1/runtime/misc.c Examining data/ocaml-4.11.1/runtime/ints.c Examining data/ocaml-4.11.1/runtime/backtrace.c Examining data/ocaml-4.11.1/runtime/win32.c Examining data/ocaml-4.11.1/runtime/major_gc.c Examining data/ocaml-4.11.1/runtime/compare.c Examining data/ocaml-4.11.1/runtime/weak.c Examining data/ocaml-4.11.1/runtime/spacetime_snapshot.c Examining data/ocaml-4.11.1/runtime/dynlink.c Examining data/ocaml-4.11.1/runtime/roots_byt.c Examining data/ocaml-4.11.1/runtime/startup_byt.c Examining data/ocaml-4.11.1/runtime/extern.c Examining data/ocaml-4.11.1/runtime/debugger.c Examining data/ocaml-4.11.1/runtime/backtrace_nat.c Examining data/ocaml-4.11.1/runtime/backtrace_byt.c Examining data/ocaml-4.11.1/testsuite/tests/lib-dynlink-bytecode/stub2.c Examining data/ocaml-4.11.1/testsuite/tests/lib-dynlink-bytecode/stub1.c Examining data/ocaml-4.11.1/testsuite/tests/runtime-C-exceptions/stub_test.c Examining data/ocaml-4.11.1/testsuite/tests/lib-unix/common/fdstatus_aux.c Examining data/ocaml-4.11.1/testsuite/tests/lib-unix/win-stat/fakeclock.c Examining data/ocaml-4.11.1/testsuite/tests/lib-unix/win-env/stubs.c Examining data/ocaml-4.11.1/testsuite/tests/locale/stubs.c Examining data/ocaml-4.11.1/testsuite/tests/lib-dynlink-pr9209/test.c Examining data/ocaml-4.11.1/testsuite/tests/callback/callbackprim.c Examining data/ocaml-4.11.1/testsuite/tests/unboxed-primitive-args/test_common.c Examining data/ocaml-4.11.1/testsuite/tests/unboxed-primitive-args/test_common.h Examining data/ocaml-4.11.1/testsuite/tests/embedded/cmstub.c Examining data/ocaml-4.11.1/testsuite/tests/embedded/cmmain.c Examining data/ocaml-4.11.1/testsuite/tests/unwind/stack_walker.c Examining data/ocaml-4.11.1/testsuite/tests/basic-manyargs/manyargsprim.c Examining data/ocaml-4.11.1/testsuite/tests/regression/pr3612/custom_finalize.c Examining data/ocaml-4.11.1/testsuite/tests/basic/constprop.ml.c Examining data/ocaml-4.11.1/testsuite/tests/lib-dynlink-csharp/entry.c Examining data/ocaml-4.11.1/testsuite/tests/compatibility/stub.c Examining data/ocaml-4.11.1/testsuite/tests/lib-threads/sigint.c Examining data/ocaml-4.11.1/testsuite/tests/c-api/alloc_async_stubs.c Examining data/ocaml-4.11.1/testsuite/tests/gc-roots/globrootsprim.c Examining data/ocaml-4.11.1/testsuite/tests/lib-bigarray-2/bigarrfstub.c Examining data/ocaml-4.11.1/testsuite/tests/lib-dynlink-native/factorial.c Examining data/ocaml-4.11.1/testsuite/tests/manual-intf-c/curses_stubs.c Examining data/ocaml-4.11.1/testsuite/tests/ephe-c-api/stubs.c Examining data/ocaml-4.11.1/testsuite/tests/output-complete-obj/test.ml_stub.c Examining data/ocaml-4.11.1/testsuite/tests/output-complete-obj/puts.c Examining data/ocaml-4.11.1/testsuite/tests/statmemprof/minor_no_postpone_stub.c Examining data/ocaml-4.11.1/testsuite/tests/statmemprof/thread_exit_in_callback_stub.c Examining data/ocaml-4.11.1/testsuite/tests/asmcomp/is_in_static_data.c Examining data/ocaml-4.11.1/testsuite/tests/asmgen/mainarith.c Examining data/ocaml-4.11.1/testsuite/tests/asmgen/main.c Examining data/ocaml-4.11.1/testsuite/tests/lib-marshal/intextaux.c Examining data/ocaml-4.11.1/testsuite/tests/int64-unboxing/stubs.c Examining data/ocaml-4.11.1/yacc/defs.h Examining data/ocaml-4.11.1/yacc/symtab.c Examining data/ocaml-4.11.1/yacc/error.c Examining data/ocaml-4.11.1/yacc/closure.c Examining data/ocaml-4.11.1/yacc/output.c Examining data/ocaml-4.11.1/yacc/skeleton.c Examining data/ocaml-4.11.1/yacc/verbose.c Examining data/ocaml-4.11.1/yacc/main.c Examining data/ocaml-4.11.1/yacc/lr0.c Examining data/ocaml-4.11.1/yacc/lalr.c Examining data/ocaml-4.11.1/yacc/reader.c Examining data/ocaml-4.11.1/yacc/mkpar.c Examining data/ocaml-4.11.1/yacc/wstr.c Examining data/ocaml-4.11.1/yacc/warshall.c Examining data/ocaml-4.11.1/tools/checkstack.c Examining data/ocaml-4.11.1/tools/objinfo_helper.c Examining data/ocaml-4.11.1/stdlib/headernt.c Examining data/ocaml-4.11.1/stdlib/header.c Examining data/ocaml-4.11.1/ocamltest/ocamltest_stdlib_stubs.c Examining data/ocaml-4.11.1/ocamltest/run_common.h Examining data/ocaml-4.11.1/ocamltest/run_stubs.c Examining data/ocaml-4.11.1/ocamltest/run.h Examining data/ocaml-4.11.1/ocamltest/run_win32.c Examining data/ocaml-4.11.1/ocamltest/run_unix.c FINAL RESULTS: data/ocaml-4.11.1/otherlibs/unix/chown.c:29:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. ret = chown(p, Int_val(uid), Int_val(gid)); data/ocaml-4.11.1/otherlibs/unix/readlink.c:44:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. len = readlink(p, buffer, sizeof(buffer) - 1); data/ocaml-4.11.1/runtime/caml/misc.h:301:18: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. #define chmod_os chmod data/ocaml-4.11.1/runtime/unix.c:374:15: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. retcode = readlink("/proc/self/exe", name, namelen); data/ocaml-4.11.1/ocamltest/run_common.h:30:3: [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(stderr, format, ap); data/ocaml-4.11.1/ocamltest/run_stubs.c:61:12: [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. length = vsnprintf(text, initialTextLength, fmt, ap); data/ocaml-4.11.1/ocamltest/run_stubs.c:72:9: [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. if (vsnprintf(text, length, fmt, ap) != length) goto end; data/ocaml-4.11.1/ocamltest/run_unix.c:225:3: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(settings->program, settings->argv); data/ocaml-4.11.1/ocamltest/run_unix.c:267:10: [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. if ( access(COREFILENAME, F_OK) == -1) data/ocaml-4.11.1/ocamltest/run_win32.c:84:27: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. if (fullpath != NULL) wcscpy(fullpath, program_name); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:385:7: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(err, sizeof(err)/sizeof(wchar_t), L"error code %lx", retcode); data/ocaml-4.11.1/otherlibs/unix/getlogin.c:21:15: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. extern char * getlogin(void); data/ocaml-4.11.1/otherlibs/unix/getlogin.c:26:10: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. name = getlogin(); data/ocaml-4.11.1/otherlibs/win32unix/errmsg.c:44:3: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(buffer, sizeof(buffer)/sizeof(wchar_t), data/ocaml-4.11.1/otherlibs/win32unix/mmap.c:164:5: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(buffer, sizeof(buffer)/sizeof(wchar_t), data/ocaml-4.11.1/otherlibs/win32unix/windbug.h:31:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, fmt, ##__VA_ARGS__); \ data/ocaml-4.11.1/runtime/caml/alloc.h:49:27: [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, 1, 2))) data/ocaml-4.11.1/runtime/caml/misc.h:195:27: [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, 1, 2))) data/ocaml-4.11.1/runtime/caml/misc.h:274:19: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. #define strcpy_os wcscpy data/ocaml-4.11.1/runtime/caml/misc.h:291: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. #define access_os access data/ocaml-4.11.1/runtime/caml/misc.h:298:19: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define system_os system data/ocaml-4.11.1/runtime/caml/misc.h:302:18: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define execv_os execv data/ocaml-4.11.1/runtime/caml/misc.h:304:19: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #define execvp_os execvp data/ocaml-4.11.1/runtime/caml/misc.h:308:19: [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. #define sscanf_os sscanf data/ocaml-4.11.1/runtime/caml/misc.h:309:19: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). #define strcpy_os strcpy data/ocaml-4.11.1/runtime/caml/misc.h:310:19: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). #define mktemp_os mktemp data/ocaml-4.11.1/runtime/caml/misc.h:352:27: [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, 2, 3))) data/ocaml-4.11.1/runtime/caml/misc.h:409: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. #define snprintf caml_snprintf data/ocaml-4.11.1/runtime/caml/misc.h:417:21: [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. #define snprintf_os snprintf data/ocaml-4.11.1/runtime/misc.c:73: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 (stderr, msg, ap); data/ocaml-4.11.1/runtime/misc.c:89: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 (stderr, msg, ap); data/ocaml-4.11.1/runtime/startup_byt.c:79:3: [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 (stderr, msg, ap); data/ocaml-4.11.1/runtime/str.c:404: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, sizeof(buf), format, args); data/ocaml-4.11.1/runtime/str.c:422:5: [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. vsnprintf((char *)String_val(res), n + 1, saved_format, args); data/ocaml-4.11.1/stdlib/header.c:105:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fullname, name); data/ocaml-4.11.1/stdlib/header.c:116:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p, name); data/ocaml-4.11.1/stdlib/header.c:188:3: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(runtime_path, argv); data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:34:3: [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. printf(fmt, arg); data/ocaml-4.11.1/testsuite/tests/basic/constprop.ml.c:75:10: [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. Printf.printf "%s: %s\n" msg (if res1 = res2 then "passed" else "FAILED") data/ocaml-4.11.1/testsuite/tests/statmemprof/thread_exit_in_callback_stub.c:7:3: [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(stderr, msg, args); data/ocaml-4.11.1/tools/objinfo_helper.c:75:3: [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 (stderr, msg, ap); data/ocaml-4.11.1/yacc/main.c:189:15: [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. printf (OCAML_VERSION "\n"); data/ocaml-4.11.1/yacc/output.c:805:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out, line_format, ++outline + 1, code_file_name_disp); data/ocaml-4.11.1/yacc/output.c:858:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out, line_format, lineno, input_file_name_disp); data/ocaml-4.11.1/yacc/output.c:870:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out, line_format, lineno, input_file_name_disp); data/ocaml-4.11.1/yacc/output.c:893:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out, line_format, ++outline + 1, code_file_name_disp); data/ocaml-4.11.1/yacc/reader.c:587:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, line_format, lineno, input_file_name_disp); data/ocaml-4.11.1/yacc/reader.c:887:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s, cache); data/ocaml-4.11.1/yacc/reader.c:1310:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, line_format, lineno, input_file_name_disp); data/ocaml-4.11.1/yacc/symtab.c:65:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(bp->name, name); data/ocaml-4.11.1/ocamltest/run_unix.c:104:15: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. realpath1 = realpath(path1, NULL); data/ocaml-4.11.1/ocamltest/run_unix.c:107:15: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. realpath2 = realpath(path2, NULL); data/ocaml-4.11.1/ocamltest/run_unix.c:116:7: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(path1, realpath1) == NULL) data/ocaml-4.11.1/ocamltest/run_unix.c:118:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if (realpath(path2, realpath2) == NULL) data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:130:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(m); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:131:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(m); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:137:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(m); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:158:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(m); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:169:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(m); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:184:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(m); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:233:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&c->lock); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:253:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&c->lock); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:273:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&c->lock); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:304:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&c->lock); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:320:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(m); data/ocaml-4.11.1/otherlibs/unix/chroot.c:29:9: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. ret = chroot(p); data/ocaml-4.11.1/otherlibs/win32unix/windbug.c:26:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. debug = (getenv("OCAMLDEBUG") != NULL); data/ocaml-4.11.1/runtime/sys.c:341:9: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. res = getenv(p); data/ocaml-4.11.1/runtime/unix.c:212:39: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tofree = caml_decompose_path(&path, getenv("PATH")); data/ocaml-4.11.1/runtime/unix.c:419:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return getenv(var); data/ocaml-4.11.1/runtime/unix.c:424:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return getenv(var); data/ocaml-4.11.1/stdlib/header.c:62:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = getenv("PATH"); data/ocaml-4.11.1/stdlib/header.c:97:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. path = getenv("PATH"); data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:99:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(argc >= 3 ? atoi(argv[2]) : time((time_t *) 0)); data/ocaml-4.11.1/testsuite/tests/lib-unix/win-stat/fakeclock.c:107:21: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. HMODULE hModule = LoadLibrary(module); data/ocaml-4.11.1/yacc/main.c:281:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tmpdir = getenv("TMPDIR"); data/ocaml-4.11.1/ocamltest/run_unix.c:115:3: [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 realpath1[PATH_MAX], realpath2[PATH_MAX]; data/ocaml-4.11.1/ocamltest/run_unix.c:145:7: [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(name, *envp, name_length); data/ocaml-4.11.1/ocamltest/run_unix.c:147:7: [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(value, pos_eq + 1, value_length); data/ocaml-4.11.1/ocamltest/run_unix.c:175:16: [2] (misc) open: 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). stdin_fd = open(settings->stdin_filename, inputFlags, inputMode); data/ocaml-4.11.1/ocamltest/run_unix.c:189:17: [2] (misc) open: 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). stdout_fd = open(settings->stdout_filename, outputFlags, outputMode); data/ocaml-4.11.1/ocamltest/run_unix.c:210:19: [2] (misc) open: 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). stderr_fd = open(settings->stderr_filename, outputFlags, outputMode); data/ocaml-4.11.1/ocamltest/run_win32.c:41:3: [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 *caml_error_message, buf[256]; data/ocaml-4.11.1/ocamltest/run_win32.c:49:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(caml_error_message, "unknown Windows error #%lu", error); data/ocaml-4.11.1/ocamltest/run_win32.c:132: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(commandline_p, *arguments_p, l*sizeof(WCHAR)); data/ocaml-4.11.1/ocamltest/run_win32.c:180: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(r, p, l * sizeof(WCHAR)); data/ocaml-4.11.1/ocamltest/run_win32.c:188: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(r, *q, l * sizeof(WCHAR)); data/ocaml-4.11.1/otherlibs/str/strstubs.c:92:17: [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. static unsigned char * re_register[NUM_REGISTERS]; data/ocaml-4.11.1/otherlibs/str/strstubs.c:113:17: [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. static unsigned char re_word_letters[32] = { data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:370:3: [2] (buffer) wchar_t: 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. wchar_t err[1024]; data/ocaml-4.11.1/otherlibs/unix/getaddrinfo.c:46: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(&sa.s_gen, a->ai_addr, len); data/ocaml-4.11.1/otherlibs/unix/gethost.c:93:3: [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 buffer[NETDB_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/gethost.c:101:3: [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 buffer[NETDB_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/gethost.c:127:3: [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 buffer[NETDB_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/gethostname.c:32:3: [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 name[MAXHOSTNAMELEN]; data/ocaml-4.11.1/otherlibs/unix/getnameinfo.c:42:3: [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 host[4096]; data/ocaml-4.11.1/otherlibs/unix/getnameinfo.c:43:3: [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 serv[1024]; data/ocaml-4.11.1/otherlibs/unix/open.c:79:8: [2] (misc) open: 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). fd = open(p, cv_flags, Int_val(perm)); data/ocaml-4.11.1/otherlibs/unix/read.c:26:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/readlink.c:38:3: [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 buffer[PATH_MAX]; data/ocaml-4.11.1/otherlibs/unix/sendrecv.c:36:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/sendrecv.c:56:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/sendrecv.c:86:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/sendrecv.c:104:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/strofaddr.c:30:3: [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 buffer[64]; data/ocaml-4.11.1/otherlibs/unix/strofaddr.c:52:3: [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 buffer[64]; data/ocaml-4.11.1/otherlibs/unix/write.c:34:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/unix/write.c:70:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/win32unix/errmsg.c:31:3: [2] (buffer) wchar_t: 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. wchar_t buffer[512]; data/ocaml-4.11.1/otherlibs/win32unix/mmap.c:153:3: [2] (buffer) wchar_t: 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. wchar_t buffer[512]; data/ocaml-4.11.1/otherlibs/win32unix/read.c:26:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/win32unix/readlink.c:66:7: [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 buffer[16384]; data/ocaml-4.11.1/otherlibs/win32unix/sendrecv.c:34:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/win32unix/sendrecv.c:60:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/win32unix/sendrecv.c:95:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/win32unix/sendrecv.c:119:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/win32unix/stat.c:232:7: [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 buffer[16384]; data/ocaml-4.11.1/otherlibs/win32unix/utimes.c:70: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(&lastModificationTime, &lastAccessTime, sizeof(FILETIME)); data/ocaml-4.11.1/otherlibs/win32unix/write.c:27:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/otherlibs/win32unix/write.c:68:3: [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 iobuf[UNIX_BUFFER_SIZE]; data/ocaml-4.11.1/runtime/afl.c:54:17: [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. static unsigned char afl_area_initial[1 << 16]; data/ocaml-4.11.1/runtime/alloc.c:118: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((char *)String_val(result), p, len); data/ocaml-4.11.1/runtime/array.c:489:7: [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((double *)res + pos, data/ocaml-4.11.1/runtime/array.c:502:7: [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(&Field(res, pos), data/ocaml-4.11.1/runtime/backtrace.c:340: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(Op_val(res), callstack, sizeof(value) * callstack_len); data/ocaml-4.11.1/runtime/backtrace_nat.c:238:3: [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 name[1]; data/ocaml-4.11.1/runtime/callback.c:223:3: [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 name[1]; data/ocaml-4.11.1/runtime/callback.c:252: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(nv->name, name, namelen + 1); data/ocaml-4.11.1/runtime/caml/address_class.h:71:21: [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. CAMLextern unsigned char * caml_page_table[Pagetable1_size]; data/ocaml-4.11.1/runtime/caml/exec.h:45:3: [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 name[4]; /* Section name */ data/ocaml-4.11.1/runtime/caml/exec.h:55:3: [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 magic[EXEC_MAGIC_LENGTH]; /* The magic number */ data/ocaml-4.11.1/runtime/caml/io.h:49:3: [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 buff[IO_BUFFER_SIZE]; /* The buffer itself */ data/ocaml-4.11.1/runtime/caml/md5.h:28:41: [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. CAMLextern void caml_md5_block(unsigned char digest[16], data/ocaml-4.11.1/runtime/caml/md5.h:36:18: [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. unsigned char in[64]; data/ocaml-4.11.1/runtime/caml/misc.h:292:17: [2] (misc) open: 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). #define open_os open data/ocaml-4.11.1/runtime/caml/misc.h:311:18: [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). #define fopen_os fopen data/ocaml-4.11.1/runtime/caml/misc.h:439:12: [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. unsigned char digest[16]; data/ocaml-4.11.1/runtime/caml/mlvalues.h:178:34: [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. #define Tag_val(val) (((unsigned char *) (val)) [-1]) data/ocaml-4.11.1/runtime/caml/mlvalues.h:180:32: [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. #define Tag_hp(hp) (((unsigned char *) (hp)) [sizeof(value)-1]) data/ocaml-4.11.1/runtime/caml/mlvalues.h:183:34: [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. #define Tag_val(val) (((unsigned char *) (val)) [-sizeof(value)]) data/ocaml-4.11.1/runtime/caml/mlvalues.h:185:32: [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. #define Tag_hp(hp) (((unsigned char *) (hp)) [0]) data/ocaml-4.11.1/runtime/caml/mlvalues.h:252:23: [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. #define Byte(x, i) (((char *) (x)) [i]) /* Also an l-value. */ data/ocaml-4.11.1/runtime/caml/mlvalues.h:253:34: [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. #define Byte_u(x, i) (((unsigned char *) (x)) [i]) /* Also an l-value. */ data/ocaml-4.11.1/runtime/compare.c:73: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(newstack, stk->init_stack, data/ocaml-4.11.1/runtime/debugger.c:247:39: [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). sock_addr.s_inet.sin_port = htons(atoi(port)); data/ocaml-4.11.1/runtime/extern.c:142: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(newstack, extern_stack_init, data/ocaml-4.11.1/runtime/extern.c:306:3: [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 data[SIZE_EXTERN_OUTPUT_BLOCK]; data/ocaml-4.11.1/runtime/extern.c:436: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(extern_ptr, data, len); data/ocaml-4.11.1/runtime/extern.c:745:36: [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. /*out*/ char header[32], data/ocaml-4.11.1/runtime/extern.c:792:3: [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 header[32]; data/ocaml-4.11.1/runtime/extern.c:826:3: [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 header[32]; data/ocaml-4.11.1/runtime/extern.c:839: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(&Byte(res, ofs), header, header_len); data/ocaml-4.11.1/runtime/extern.c:843: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(&Byte(res, ofs), blk->data, n); data/ocaml-4.11.1/runtime/extern.c:860:3: [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 header[32]; data/ocaml-4.11.1/runtime/extern.c:876: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, header, header_len); data/ocaml-4.11.1/runtime/extern.c:893:3: [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 header[32]; data/ocaml-4.11.1/runtime/extern.c:905: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(res, header, header_len); data/ocaml-4.11.1/runtime/extern.c:909: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(res, blk->data, n); data/ocaml-4.11.1/runtime/extern.c:959: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(extern_ptr, data, len); data/ocaml-4.11.1/runtime/extern.c:975: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(extern_ptr, data, len * 2); data/ocaml-4.11.1/runtime/extern.c:992: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(extern_ptr, data, len * 4); data/ocaml-4.11.1/runtime/extern.c:1009: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(extern_ptr, data, len * 8); data/ocaml-4.11.1/runtime/extern.c:1018: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(extern_ptr, data, len * 8); data/ocaml-4.11.1/runtime/floats.c:204:3: [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 buffer[64]; data/ocaml-4.11.1/runtime/floats.c:233: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(p, txt, strlen(txt)); data/ocaml-4.11.1/runtime/floats.c:375:3: [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 parse_buffer[64]; data/ocaml-4.11.1/runtime/instrtrace.c:85:10: [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. static char buf[256]; data/ocaml-4.11.1/runtime/instrtrace.c:86:3: [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 nambuf[128]; data/ocaml-4.11.1/runtime/intern.c:71:8: [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. static char * intern_resolve_code_pointer(unsigned char digest[16], data/ocaml-4.11.1/runtime/intern.c:71:52: [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. static char * intern_resolve_code_pointer(unsigned char digest[16], data/ocaml-4.11.1/runtime/intern.c:75:46: [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. static void intern_bad_code_pointer(unsigned char digest[16]) data/ocaml-4.11.1/runtime/intern.c:137: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(dest, intern_src, len); data/ocaml-4.11.1/runtime/intern.c:291: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(newstack, intern_stack_init, data/ocaml-4.11.1/runtime/intern.c:328:12: [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. unsigned char digest[16]; data/ocaml-4.11.1/runtime/intern.c:728:3: [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 errmsg[100]; data/ocaml-4.11.1/runtime/intern.c:773:3: [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 header[32]; data/ocaml-4.11.1/runtime/intern.c:953:8: [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. static char * intern_resolve_code_pointer(unsigned char digest[16], data/ocaml-4.11.1/runtime/intern.c:953:52: [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. static char * intern_resolve_code_pointer(unsigned char digest[16], data/ocaml-4.11.1/runtime/intern.c:973:46: [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. static void intern_bad_code_pointer(unsigned char digest[16]) data/ocaml-4.11.1/runtime/intern.c:975:3: [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 msg[256]; data/ocaml-4.11.1/runtime/intern.c:1049: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(data, intern_src, len); data/ocaml-4.11.1/runtime/intern.c:1061: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(data, intern_src, len * 2); data/ocaml-4.11.1/runtime/intern.c:1074: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(data, intern_src, len * 4); data/ocaml-4.11.1/runtime/intern.c:1087: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(data, intern_src, len * 8); data/ocaml-4.11.1/runtime/intern.c:1095: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(data, intern_src, len * 8); data/ocaml-4.11.1/runtime/ints.c:144:8: [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. static char parse_format(value fmt, data/ocaml-4.11.1/runtime/ints.c:145:26: [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 * suffix, data/ocaml-4.11.1/runtime/ints.c:146:26: [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 format_string[FORMAT_BUFFER_SIZE]) data/ocaml-4.11.1/runtime/ints.c:172:3: [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 format_string[FORMAT_BUFFER_SIZE]; data/ocaml-4.11.1/runtime/ints.c:331:3: [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 format_string[FORMAT_BUFFER_SIZE]; data/ocaml-4.11.1/runtime/ints.c:579:3: [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 format_string[FORMAT_BUFFER_SIZE]; data/ocaml-4.11.1/runtime/ints.c:842:3: [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 format_string[FORMAT_BUFFER_SIZE]; data/ocaml-4.11.1/runtime/md5.c:46:3: [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 buffer[4096]; data/ocaml-4.11.1/runtime/md5.c:77:41: [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. CAMLexport void caml_md5_block(unsigned char digest[16], data/ocaml-4.11.1/runtime/md5.c:158:13: [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(p, buf, len); data/ocaml-4.11.1/runtime/md5.c:161:9: [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(p, buf, t); data/ocaml-4.11.1/runtime/md5.c:170:9: [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->in, buf, 64); data/ocaml-4.11.1/runtime/md5.c:179: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->in, buf, len); data/ocaml-4.11.1/runtime/md5.c:223: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(digest, ctx->buf, 16); data/ocaml-4.11.1/runtime/memory.c:194:21: [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. CAMLexport unsigned char * caml_page_table[Pagetable1_size]; data/ocaml-4.11.1/runtime/memory.c:195:17: [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. static unsigned char caml_page_table_empty[Pagetable2_size] = { 0, }; data/ocaml-4.11.1/runtime/memory.c:935: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(result, s, slen + 1); data/ocaml-4.11.1/runtime/memory.c:955: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(result, s, (slen + 1)*sizeof(wchar_t)); data/ocaml-4.11.1/runtime/memory.c:982: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(p, s, l); data/ocaml-4.11.1/runtime/memory.c:1014: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(p, s, l*sizeof(wchar_t)); data/ocaml-4.11.1/runtime/memprof.c:179: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(Op_val(res), callstack_buffer, sizeof(value) * callstack_len); data/ocaml-4.11.1/runtime/memprof.c:200: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(Op_val(res), callstack_buffer, sizeof(value) * callstack_len); data/ocaml-4.11.1/runtime/meta.c:83: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(ret + off, Bytes_val(s), s_len); data/ocaml-4.11.1/runtime/meta.c:107: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(cf->digest, String_val(Field(digest_opt, 0)), 16); data/ocaml-4.11.1/runtime/obj.c:113: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(Bp_val(res), Bp_val(arg), sz * sizeof(value)); data/ocaml-4.11.1/runtime/printexc.c:36:3: [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 data[256]; data/ocaml-4.11.1/runtime/printexc.c:57:3: [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 intbuf[64]; data/ocaml-4.11.1/runtime/signals_nat.c:198:8: [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. static char sig_alt_stack[SIGSTKSZ]; data/ocaml-4.11.1/runtime/startup_byt.c:71:8: [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. static char magicstr[EXEC_MAGIC_LENGTH+1]; data/ocaml-4.11.1/runtime/startup_byt.c:101: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(magicstr, trail->magic, EXEC_MAGIC_LENGTH); data/ocaml-4.11.1/runtime/startup_byt.c:121:3: [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 [2], * u8; data/ocaml-4.11.1/runtime/str.c:393:3: [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[128]; data/ocaml-4.11.1/runtime/str.c:443: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((char *)String_val(res), buf, n); data/ocaml-4.11.1/runtime/sys.c:525:8: [2] (misc) open: 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). fd = open("/dev/urandom", O_RDONLY, 0); data/ocaml-4.11.1/runtime/sys.c:527:14: [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. unsigned char buffer[12]; data/ocaml-4.11.1/runtime/unix.c:168:8: [2] (misc) open: 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). fd = open(name, O_RDONLY); data/ocaml-4.11.1/runtime/win32.c:70:3: [2] (buffer) wchar_t: 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. wchar_t buffer[512]; data/ocaml-4.11.1/runtime/win32.c:457: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 iobuf[2]; data/ocaml-4.11.1/runtime/win32.c:840:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, data/ocaml-4.11.1/runtime/win32.c:844:17: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). retcode = MultiByteToWideChar(CP_ACP, 0, s, slen, out, outlen); data/ocaml-4.11.1/runtime/win32.c:846:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). retcode = MultiByteToWideChar(CP_ACP, 0, s, slen, out, outlen); data/ocaml-4.11.1/runtime/win32.c:972:3: [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 buffer[1024]; data/ocaml-4.11.1/stdlib/header.c:53:10: [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. static char fullname[MAXPATHLEN + 1]; data/ocaml-4.11.1/stdlib/header.c:87:8: [2] (misc) open: 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). fd = open(name, O_RDONLY); data/ocaml-4.11.1/stdlib/header.c:106:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fullname, ".exe"); data/ocaml-4.11.1/stdlib/header.c:118:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(fullname, ".exe"); data/ocaml-4.11.1/stdlib/header.c:137:3: [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 buffer[TRAILER_SIZE]; data/ocaml-4.11.1/stdlib/header.c:138:10: [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. static char runtime_path[MAXPATHLEN]; data/ocaml-4.11.1/stdlib/header.c:181:8: [2] (misc) open: 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). fd = open(truename, O_RDONLY | O_BINARY); data/ocaml-4.11.1/stdlib/headernt.c:51:3: [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 buffer[TRAILER_SIZE]; data/ocaml-4.11.1/stdlib/headernt.c:52:10: [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. static char runtime_path[MAX_PATH]; data/ocaml-4.11.1/stdlib/headernt.c:99:10: [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. static char str[MAX_PATH]; data/ocaml-4.11.1/stdlib/headernt.c:115:3: [2] (buffer) wchar_t: 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. wchar_t path[MAX_PATH]; data/ocaml-4.11.1/stdlib/headernt.c:166:3: [2] (buffer) wchar_t: 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. wchar_t truename[MAX_PATH]; data/ocaml-4.11.1/stdlib/headernt.c:169:3: [2] (buffer) wchar_t: 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. wchar_t wruntime_path[MAX_PATH]; data/ocaml-4.11.1/stdlib/headernt.c:187:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP, 0, runtime_path, -1, wruntime_path, data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:75:40: [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). printf("%ld\n", call_gen_code(FUN, atoi(argv[1]))); data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:81:39: [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). printf("%f\n", call_gen_code(FUN, atoi(argv[1]))); data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:99:23: [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). srand(argc >= 3 ? atoi(argv[2]) : time((time_t *) 0)); data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:100:9: [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). n = atoi(argv[1]); data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:124:9: [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). x = atoi(argv[1]); data/ocaml-4.11.1/testsuite/tests/asmgen/main.c:126:11: [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). y = atoi(argv[2]); data/ocaml-4.11.1/testsuite/tests/asmgen/mainarith.c:312:9: [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). X = atoi(argv[1]); data/ocaml-4.11.1/testsuite/tests/asmgen/mainarith.c:313:9: [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). Y = atoi(argv[2]); data/ocaml-4.11.1/testsuite/tests/lib-dynlink-csharp/entry.c:40:3: [2] (buffer) wchar_t: 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. wchar_t * argv[2]; data/ocaml-4.11.1/testsuite/tests/lib-dynlink-native/factorial.c:25:10: [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. static char buf[256]; data/ocaml-4.11.1/testsuite/tests/lib-dynlink-native/factorial.c:30:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf,"%i",x); data/ocaml-4.11.1/testsuite/tests/lib-threads/sigint.c:25:9: [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). pid = atoi(argv[1]); data/ocaml-4.11.1/testsuite/tests/lib-unix/common/fdstatus_aux.c:22:16: [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). h = (HANDLE) atoi(s); data/ocaml-4.11.1/testsuite/tests/lib-unix/win-stat/fakeclock.c:30: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(&result.ft, lpFileTime, sizeof(FILETIME)); data/ocaml-4.11.1/testsuite/tests/lib-unix/win-stat/fakeclock.c:32: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(lpLocalFileTime, &result.ft, sizeof(FILETIME)); data/ocaml-4.11.1/testsuite/tests/lib-unix/win-stat/fakeclock.c:44: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(result, &clk.ft, sizeof(FILETIME)); data/ocaml-4.11.1/testsuite/tests/lib-unix/win-stat/fakeclock.c:129: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(jump + 2, &pNew, 8); /* imm64 */ data/ocaml-4.11.1/testsuite/tests/lib-unix/win-stat/fakeclock.c:137: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(jump + 1, &dwRelativeAddr, 4); data/ocaml-4.11.1/testsuite/tests/unwind/stack_walker.c:32:13: [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 procname[256]; data/ocaml-4.11.1/yacc/main.c:317:17: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). action_fd = mkstemp(action_file_name); data/ocaml-4.11.1/yacc/main.c:320:16: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). entry_fd = mkstemp(entry_file_name); data/ocaml-4.11.1/yacc/main.c:323:15: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). text_fd = mkstemp(text_file_name); data/ocaml-4.11.1/yacc/reader.c:52:17: [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. static unsigned char caml_ident_start[32] = data/ocaml-4.11.1/yacc/reader.c:54:17: [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. static unsigned char caml_ident_body[32] = data/ocaml-4.11.1/yacc/reader.c:300:13: [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, idcptr, size); data/ocaml-4.11.1/yacc/reader.c:751:24: [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. c = ((unsigned char *)s)[i]; data/ocaml-4.11.1/yacc/reader.c:1213:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cache, "$$%d", ++gensym); data/ocaml-4.11.1/yacc/reader.c:1513:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(name_pool, "$accept"); data/ocaml-4.11.1/yacc/reader.c:1514:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(name_pool+8, "$end"); data/ocaml-4.11.1/yacc/reader.c:1699:10: [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. static char name[7] = "'\\xxx'"; data/ocaml-4.11.1/ocamltest/run_unix.c:141:15: [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). int l = strlen(*envp); data/ocaml-4.11.1/ocamltest/run_unix.c:270:29: [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). size_t corefile_len = strlen(corefilename_prefix) + 128; data/ocaml-4.11.1/ocamltest/run_win32.c:81:13: [1] (buffer) wcslen: 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). int l = wcslen(program_name) + 1; data/ocaml-4.11.1/ocamltest/run_win32.c:121:27: [1] (buffer) wcslen: 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). commandline_length += wcslen(*arguments_p); data/ocaml-4.11.1/ocamltest/run_win32.c:131:13: [1] (buffer) wcslen: 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). int l = wcslen(*arguments_p); data/ocaml-4.11.1/ocamltest/run_win32.c:156:9: [1] (buffer) wcslen: 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). l = wcslen(p) + 1; /* also count terminating '\0' */ data/ocaml-4.11.1/ocamltest/run_win32.c:165:24: [1] (buffer) wcslen: 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). localenv_length += wcslen(*q) + 1; data/ocaml-4.11.1/ocamltest/run_win32.c:179:9: [1] (buffer) wcslen: 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). l = wcslen(p) + 1; /* also count terminating '\0' */ data/ocaml-4.11.1/ocamltest/run_win32.c:187:9: [1] (buffer) wcslen: 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). l = wcslen(*q) + 1; data/ocaml-4.11.1/otherlibs/systhreads/st_posix.h:340:12: [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). msglen = strlen(msg); data/ocaml-4.11.1/otherlibs/systhreads/st_posix.h:341:12: [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). errlen = strlen(err); data/ocaml-4.11.1/otherlibs/systhreads/st_win32.h:387:12: [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). msglen = strlen(msg); data/ocaml-4.11.1/otherlibs/unix/read.c:32:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(Int_val(fd), iobuf, (int) numbytes); data/ocaml-4.11.1/otherlibs/unix/select.c:70:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read, write, except; data/ocaml-4.11.1/otherlibs/unix/select.c:80:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). retcode = fdlist_to_fdset(readfds, &read, &maxfd); data/ocaml-4.11.1/otherlibs/unix/select.c:94:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). retcode = select(maxfd + 1, &read, &write, &except, tvp); data/ocaml-4.11.1/otherlibs/unix/select.c:97:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readfds = fdset_to_fdlist(readfds, &read); data/ocaml-4.11.1/otherlibs/unix/umask.c:23:18: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). return Val_int(umask(Int_val(perm))); data/ocaml-4.11.1/otherlibs/win32unix/envir.c:34:37: [1] (buffer) wcslen: 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 (p = envp, size = 0; *p; p += wcslen(p) + 1) size++; data/ocaml-4.11.1/otherlibs/win32unix/envir.c:36:34: [1] (buffer) wcslen: 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 (p = envp, i = 0; *p; p += wcslen(p) + 1) { data/ocaml-4.11.1/otherlibs/win32unix/readlink.c:67:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DWORD read; data/ocaml-4.11.1/otherlibs/win32unix/readlink.c:72:80: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, NULL, 0, buffer, 16384, &read, NULL)) { data/ocaml-4.11.1/otherlibs/win32unix/select.c:1022:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set read, write, except; data/ocaml-4.11.1/otherlibs/win32unix/select.c:1042:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fdlist_to_fdset(readfds, &read) data/ocaml-4.11.1/otherlibs/win32unix/select.c:1054:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (select(FD_SETSIZE, &read, &write, &except, tvp) == -1) { data/ocaml-4.11.1/otherlibs/win32unix/select.c:1064:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_list = fdset_to_fdlist(readfds, &read); data/ocaml-4.11.1/otherlibs/win32unix/stat.c:233:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DWORD read; data/ocaml-4.11.1/otherlibs/win32unix/stat.c:237:80: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, NULL, 0, buffer, 16384, &read, NULL)) { data/ocaml-4.11.1/runtime/afl.c:71:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(FORKSRV_FD_READ, &msg, 4) != 4) data/ocaml-4.11.1/runtime/alloc.c:137: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). len = strlen(s); data/ocaml-4.11.1/runtime/callback.c:241:20: [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). size_t namelen = strlen(name); data/ocaml-4.11.1/runtime/caml/misc.h:272:19: [1] (buffer) wcslen: 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). #define strlen_os wcslen data/ocaml-4.11.1/runtime/caml/misc.h:307: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). #define strlen_os strlen data/ocaml-4.11.1/runtime/debugger.c:217:13: [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). a_len = strlen(address); data/ocaml-4.11.1/runtime/debugger.c:224:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sock_addr.s_unix.sun_path, address, data/ocaml-4.11.1/runtime/dynlink.c:102:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(ldconf, config, st.st_size); data/ocaml-4.11.1/runtime/dynlink.c:183:37: [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 (q = req_prims; *q != 0; q += strlen(q) + 1) { data/ocaml-4.11.1/runtime/extern.c:653:27: [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). writeblock(ident, strlen(ident) + 1); data/ocaml-4.11.1/runtime/extern.c:664:27: [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). writeblock(ident, strlen(ident) + 1); data/ocaml-4.11.1/runtime/fix_code.c:60:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, (char *) caml_start_code, caml_code_size) != caml_code_size) data/ocaml-4.11.1/runtime/floats.c:233:20: [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). memcpy(p, txt, strlen(txt)); data/ocaml-4.11.1/runtime/floats.c:234:7: [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). p[strlen(txt)] = 0; data/ocaml-4.11.1/runtime/ints.c:155: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). len_suffix = strlen(suffix); data/ocaml-4.11.1/runtime/md5.c:45:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). intnat read; data/ocaml-4.11.1/runtime/md5.c:54:55: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). caml_MD5Update (&ctx, (unsigned char *) buffer, read); data/ocaml-4.11.1/runtime/md5.c:61:54: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). caml_MD5Update(&ctx, (unsigned char *) buffer, read); data/ocaml-4.11.1/runtime/md5.c:62:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). toread -= read; data/ocaml-4.11.1/runtime/memory.c:931:17: [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). size_t slen = strlen(s); data/ocaml-4.11.1/runtime/memory.c:951:14: [1] (buffer) wcslen: 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). int slen = wcslen(s); data/ocaml-4.11.1/runtime/memory.c:971:12: [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). len += strlen(s); data/ocaml-4.11.1/runtime/memory.c:981: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). size_t l = strlen(s); data/ocaml-4.11.1/runtime/memory.c:1003:12: [1] (buffer) wcslen: 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). len += wcslen(s); data/ocaml-4.11.1/runtime/memory.c:1013:16: [1] (buffer) wcslen: 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). size_t l = wcslen(s); data/ocaml-4.11.1/runtime/parsing.c:113: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). names += strlen(names) + 1; data/ocaml-4.11.1/runtime/printexc.c:46: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). size_t len = strlen(s); data/ocaml-4.11.1/runtime/spacetime_snapshot.c:353: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). len = strlen(s); data/ocaml-4.11.1/runtime/startup_byt.c:98:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, (char *) trail, TRAILER_SIZE) < TRAILER_SIZE) data/ocaml-4.11.1/runtime/startup_byt.c:134:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). err = read (fd, buf, 2); data/ocaml-4.11.1/runtime/startup_byt.c:162:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, (char *) trail->section, toc_size) != toc_size) data/ocaml-4.11.1/runtime/startup_byt.c:212:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, data, len) != len) data/ocaml-4.11.1/runtime/startup_byt.c:230:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, data, len) != len) data/ocaml-4.11.1/runtime/str.c:55:10: [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). return strlen(String_val(s)) == caml_string_length(s); data/ocaml-4.11.1/runtime/sys.c:85:24: [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). mlsize_t err_len = strlen(err); data/ocaml-4.11.1/runtime/sys.c:528:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int nread = read(fd, buffer, 12); data/ocaml-4.11.1/runtime/unix.c:79:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). retcode = read(fd, buf, n); data/ocaml-4.11.1/runtime/win32.c:91:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). retcode = read(fd, buf, n); data/ocaml-4.11.1/runtime/win32.c:95:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). retcode = read(fd, buf, 16384); data/ocaml-4.11.1/runtime/win32.c:190:17: [1] (buffer) wcslen: 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). fullnamelen = wcslen(name) + 1; data/ocaml-4.11.1/runtime/win32.c:379:12: [1] (buffer) wcslen: 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 = wcslen(prefix); i > 0; i--) { data/ocaml-4.11.1/runtime/win32.c:420:16: [1] (buffer) wcslen: 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). dirnamelen = wcslen(dirname); data/ocaml-4.11.1/runtime/win32.c:890:10: [1] (buffer) wcslen: 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). slen = wcslen(s); data/ocaml-4.11.1/stdlib/header.c:98: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). fullname = malloc(strlen(name) + (path == NULL ? 0 : strlen(path)) + 6); data/ocaml-4.11.1/stdlib/header.c:98:56: [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). fullname = malloc(strlen(name) + (path == NULL ? 0 : strlen(path)) + 6); data/ocaml-4.11.1/stdlib/header.c:144:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buffer, TRAILER_SIZE) < TRAILER_SIZE) return NULL; data/ocaml-4.11.1/stdlib/header.c:150:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, buffer, 8) < 8) return NULL; data/ocaml-4.11.1/stdlib/header.c:161:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, runtime_path, path_size) != path_size) return NULL; data/ocaml-4.11.1/stdlib/header.c:168:17: [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). write(2, msg, strlen(msg)); data/ocaml-4.11.1/stdlib/headernt.c:103:30: [1] (buffer) wcslen: 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). WriteConsole(hOut, wstr, wcslen(wstr), &numwritten, NULL); data/ocaml-4.11.1/stdlib/headernt.c:106:40: [1] (buffer) wcslen: 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). WideCharToMultiByte(CP, 0, wstr, wcslen(wstr), str, sizeof(str), data/ocaml-4.11.1/yacc/output.c:792:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(in)) == EOF) data/ocaml-4.11.1/yacc/output.c:798:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(in)) != EOF) data/ocaml-4.11.1/yacc/output.c:853:18: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((c = getc(in)) == EOF) data/ocaml-4.11.1/yacc/output.c:879:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(in)) != EOF) data/ocaml-4.11.1/yacc/output.c:910:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(*file)) != EOF) data/ocaml-4.11.1/yacc/reader.c:105:25: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (saw_eof || (c = getc(f)) == EOF) data/ocaml-4.11.1/yacc/reader.c:138:13: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc(f); data/ocaml-4.11.1/yacc/reader.c:1509:27: [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). name_pool_size += strlen(bp->name) + 1; data/ocaml-4.11.1/yacc/reader.c:1821:23: [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). spacing = strlen(symbol_name[rlhs[i]]) + 1; data/ocaml-4.11.1/yacc/symtab.c:53:23: [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). bp->name = MALLOC(strlen(name) + 1); ANALYSIS SUMMARY: Hits = 360 Lines analyzed = 63052 in approximately 1.99 seconds (31672 lines/second) Physical Source Lines of Code (SLOC) = 45166 Hits@level = [0] 362 [1] 89 [2] 195 [3] 26 [4] 46 [5] 4 Hits@level+ = [0+] 722 [1+] 360 [2+] 271 [3+] 76 [4+] 50 [5+] 4 Hits/KSLOC@level+ = [0+] 15.9855 [1+] 7.9706 [2+] 6.00009 [3+] 1.68268 [4+] 1.10703 [5+] 0.0885622 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.