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/rr-5.4.0/include/rr/rr.h Examining data/rr-5.4.0/src/AddressSpace.cc Examining data/rr-5.4.0/src/AddressSpace.h Examining data/rr-5.4.0/src/AutoRemoteSyscalls.cc Examining data/rr-5.4.0/src/AutoRemoteSyscalls.h Examining data/rr-5.4.0/src/BreakpointCondition.h Examining data/rr-5.4.0/src/BuildidCommand.cc Examining data/rr-5.4.0/src/CPUFeaturesCommand.cc Examining data/rr-5.4.0/src/CPUIDBugDetector.cc Examining data/rr-5.4.0/src/CPUIDBugDetector.h Examining data/rr-5.4.0/src/Command.cc Examining data/rr-5.4.0/src/Command.h Examining data/rr-5.4.0/src/CompressedReader.cc Examining data/rr-5.4.0/src/CompressedReader.h Examining data/rr-5.4.0/src/CompressedWriter.cc Examining data/rr-5.4.0/src/CompressedWriter.h Examining data/rr-5.4.0/src/DiversionSession.cc Examining data/rr-5.4.0/src/DiversionSession.h Examining data/rr-5.4.0/src/DumpCommand.cc Examining data/rr-5.4.0/src/DumpCommand.h Examining data/rr-5.4.0/src/Dwarf.cc Examining data/rr-5.4.0/src/Dwarf.h Examining data/rr-5.4.0/src/ElfReader.cc Examining data/rr-5.4.0/src/ElfReader.h Examining data/rr-5.4.0/src/EmuFs.cc Examining data/rr-5.4.0/src/EmuFs.h Examining data/rr-5.4.0/src/Event.cc Examining data/rr-5.4.0/src/Event.h Examining data/rr-5.4.0/src/ExtraRegisters.cc Examining data/rr-5.4.0/src/ExtraRegisters.h Examining data/rr-5.4.0/src/FdTable.cc Examining data/rr-5.4.0/src/FdTable.h Examining data/rr-5.4.0/src/FileMonitor.cc Examining data/rr-5.4.0/src/FileMonitor.h Examining data/rr-5.4.0/src/FileNameCommand.cc Examining data/rr-5.4.0/src/Flags.cc Examining data/rr-5.4.0/src/Flags.h Examining data/rr-5.4.0/src/GdbCommand.cc Examining data/rr-5.4.0/src/GdbCommand.h Examining data/rr-5.4.0/src/GdbCommandHandler.cc Examining data/rr-5.4.0/src/GdbCommandHandler.h Examining data/rr-5.4.0/src/GdbConnection.cc Examining data/rr-5.4.0/src/GdbConnection.h Examining data/rr-5.4.0/src/GdbExpression.cc Examining data/rr-5.4.0/src/GdbExpression.h Examining data/rr-5.4.0/src/GdbInitCommand.cc Examining data/rr-5.4.0/src/GdbRegister.h Examining data/rr-5.4.0/src/GdbServer.cc Examining data/rr-5.4.0/src/GdbServer.h Examining data/rr-5.4.0/src/HasTaskSet.cc Examining data/rr-5.4.0/src/HasTaskSet.h Examining data/rr-5.4.0/src/HelpCommand.cc Examining data/rr-5.4.0/src/LsCommand.cc Examining data/rr-5.4.0/src/MagicSaveDataMonitor.cc Examining data/rr-5.4.0/src/MagicSaveDataMonitor.h Examining data/rr-5.4.0/src/MemoryRange.h Examining data/rr-5.4.0/src/MmappedFileMonitor.cc Examining data/rr-5.4.0/src/MmappedFileMonitor.h Examining data/rr-5.4.0/src/MonitoredSharedMemory.cc Examining data/rr-5.4.0/src/MonitoredSharedMemory.h Examining data/rr-5.4.0/src/Monkeypatcher.cc Examining data/rr-5.4.0/src/Monkeypatcher.h Examining data/rr-5.4.0/src/PackCommand.cc Examining data/rr-5.4.0/src/PerfCounters.cc Examining data/rr-5.4.0/src/PerfCounters.h Examining data/rr-5.4.0/src/PerfCounters_aarch64.h Examining data/rr-5.4.0/src/PerfCounters_x86.h Examining data/rr-5.4.0/src/PreserveFileMonitor.h Examining data/rr-5.4.0/src/ProcFdDirMonitor.cc Examining data/rr-5.4.0/src/ProcFdDirMonitor.h Examining data/rr-5.4.0/src/ProcMemMonitor.cc Examining data/rr-5.4.0/src/ProcMemMonitor.h Examining data/rr-5.4.0/src/ProcStatMonitor.cc Examining data/rr-5.4.0/src/ProcStatMonitor.h Examining data/rr-5.4.0/src/PropertyTable.h Examining data/rr-5.4.0/src/PsCommand.cc Examining data/rr-5.4.0/src/RecordCommand.cc Examining data/rr-5.4.0/src/RecordCommand.h Examining data/rr-5.4.0/src/RecordSession.cc Examining data/rr-5.4.0/src/RecordSession.h Examining data/rr-5.4.0/src/RecordTask.cc Examining data/rr-5.4.0/src/RecordTask.h Examining data/rr-5.4.0/src/Registers.cc Examining data/rr-5.4.0/src/Registers.h Examining data/rr-5.4.0/src/ReplayCommand.cc Examining data/rr-5.4.0/src/ReplayCommand.h Examining data/rr-5.4.0/src/ReplaySession.cc Examining data/rr-5.4.0/src/ReplaySession.h Examining data/rr-5.4.0/src/ReplayTask.cc Examining data/rr-5.4.0/src/ReplayTask.h Examining data/rr-5.4.0/src/ReplayTimeline.cc Examining data/rr-5.4.0/src/ReplayTimeline.h Examining data/rr-5.4.0/src/RerunCommand.cc Examining data/rr-5.4.0/src/ReturnAddressList.cc Examining data/rr-5.4.0/src/ReturnAddressList.h Examining data/rr-5.4.0/src/Scheduler.cc Examining data/rr-5.4.0/src/Scheduler.h Examining data/rr-5.4.0/src/ScopedFd.h Examining data/rr-5.4.0/src/SeccompFilterRewriter.cc Examining data/rr-5.4.0/src/SeccompFilterRewriter.h Examining data/rr-5.4.0/src/Session.cc Examining data/rr-5.4.0/src/Session.h Examining data/rr-5.4.0/src/SourcesCommand.cc Examining data/rr-5.4.0/src/StdioMonitor.cc Examining data/rr-5.4.0/src/StdioMonitor.h Examining data/rr-5.4.0/src/StringVectorToCharArray.h Examining data/rr-5.4.0/src/SysCpuMonitor.cc Examining data/rr-5.4.0/src/SysCpuMonitor.h Examining data/rr-5.4.0/src/Task.cc Examining data/rr-5.4.0/src/Task.h Examining data/rr-5.4.0/src/TaskishUid.h Examining data/rr-5.4.0/src/ThreadDb.cc Examining data/rr-5.4.0/src/ThreadDb.h Examining data/rr-5.4.0/src/ThreadGroup.cc Examining data/rr-5.4.0/src/ThreadGroup.h Examining data/rr-5.4.0/src/Ticks.h Examining data/rr-5.4.0/src/TraceFrame.cc Examining data/rr-5.4.0/src/TraceFrame.h Examining data/rr-5.4.0/src/TraceInfoCommand.cc Examining data/rr-5.4.0/src/TraceStream.cc Examining data/rr-5.4.0/src/TraceStream.h Examining data/rr-5.4.0/src/TraceTaskEvent.h Examining data/rr-5.4.0/src/VirtualPerfCounterMonitor.cc Examining data/rr-5.4.0/src/VirtualPerfCounterMonitor.h Examining data/rr-5.4.0/src/WaitStatus.cc Examining data/rr-5.4.0/src/WaitStatus.h Examining data/rr-5.4.0/src/audit/rtld-audit.c Examining data/rr-5.4.0/src/audit/rtld-audit.h Examining data/rr-5.4.0/src/audit/stap-note-iter.c Examining data/rr-5.4.0/src/audit/stap-note-iter.h Examining data/rr-5.4.0/src/chaos-test/chaosutil.h Examining data/rr-5.4.0/src/chaos-test/core_count.c Examining data/rr-5.4.0/src/chaos-test/futex_wakeup.c Examining data/rr-5.4.0/src/chaos-test/getaffinity_core_count.c Examining data/rr-5.4.0/src/chaos-test/mmap_adjacent.c Examining data/rr-5.4.0/src/chaos-test/mmap_bits.c Examining data/rr-5.4.0/src/chaos-test/pipe_wakeup.c Examining data/rr-5.4.0/src/chaos-test/starvation_multithreaded.c Examining data/rr-5.4.0/src/chaos-test/starvation_singlethreaded.c Examining data/rr-5.4.0/src/core.h Examining data/rr-5.4.0/src/exec_stub.c Examining data/rr-5.4.0/src/fast_forward.cc Examining data/rr-5.4.0/src/fast_forward.h Examining data/rr-5.4.0/src/ftrace.cc Examining data/rr-5.4.0/src/ftrace.h Examining data/rr-5.4.0/src/ftrace/ftrace_helper.c Examining data/rr-5.4.0/src/kernel_abi.cc Examining data/rr-5.4.0/src/kernel_abi.h Examining data/rr-5.4.0/src/kernel_metadata.cc Examining data/rr-5.4.0/src/kernel_metadata.h Examining data/rr-5.4.0/src/kernel_supplement.h Examining data/rr-5.4.0/src/log.cc Examining data/rr-5.4.0/src/log.h Examining data/rr-5.4.0/src/main.cc Examining data/rr-5.4.0/src/main.h Examining data/rr-5.4.0/src/perf-test/unbuffered-syscalls.c Examining data/rr-5.4.0/src/preload/overrides.c Examining data/rr-5.4.0/src/preload/preload_interface.h Examining data/rr-5.4.0/src/preload/syscallbuf.c Examining data/rr-5.4.0/src/preload/syscallbuf.h Examining data/rr-5.4.0/src/record_signal.cc Examining data/rr-5.4.0/src/record_signal.h Examining data/rr-5.4.0/src/record_syscall.cc Examining data/rr-5.4.0/src/record_syscall.h Examining data/rr-5.4.0/src/remote_code_ptr.cc Examining data/rr-5.4.0/src/remote_code_ptr.h Examining data/rr-5.4.0/src/remote_ptr.h Examining data/rr-5.4.0/src/replay_syscall.cc Examining data/rr-5.4.0/src/replay_syscall.h Examining data/rr-5.4.0/src/seccomp-bpf.h Examining data/rr-5.4.0/src/test-monitor/test-monitor.cc Examining data/rr-5.4.0/src/test/64bit_child.c Examining data/rr-5.4.0/src/test/_llseek.c Examining data/rr-5.4.0/src/test/abort.c Examining data/rr-5.4.0/src/test/abort_nonmain.c Examining data/rr-5.4.0/src/test/accept.c Examining data/rr-5.4.0/src/test/acct.c Examining data/rr-5.4.0/src/test/adjtimex.c Examining data/rr-5.4.0/src/test/aio.c Examining data/rr-5.4.0/src/test/alarm.c Examining data/rr-5.4.0/src/test/alarm2.c Examining data/rr-5.4.0/src/test/alsa_ioctl.c Examining data/rr-5.4.0/src/test/arch_prctl.c Examining data/rr-5.4.0/src/test/args.c Examining data/rr-5.4.0/src/test/async_kill_with_threads.c Examining data/rr-5.4.0/src/test/async_kill_with_threads_main_running.c Examining data/rr-5.4.0/src/test/async_kill_with_threads_thread_running.c Examining data/rr-5.4.0/src/test/async_segv.c Examining data/rr-5.4.0/src/test/async_segv_ignored.c Examining data/rr-5.4.0/src/test/async_signal_syscalls.c Examining data/rr-5.4.0/src/test/async_signal_syscalls2.c Examining data/rr-5.4.0/src/test/async_signal_syscalls_siginfo.c Examining data/rr-5.4.0/src/test/async_usr1.c Examining data/rr-5.4.0/src/test/at_threadexit.c Examining data/rr-5.4.0/src/test/bad_ip.c Examining data/rr-5.4.0/src/test/bad_syscall.c Examining data/rr-5.4.0/src/test/barrier.c Examining data/rr-5.4.0/src/test/big_buffers.c Examining data/rr-5.4.0/src/test/blacklist.c Examining data/rr-5.4.0/src/test/block.c Examining data/rr-5.4.0/src/test/block_clone_checkpoint.c Examining data/rr-5.4.0/src/test/block_clone_interrupted.c Examining data/rr-5.4.0/src/test/block_clone_syscallbuf_overflow.c Examining data/rr-5.4.0/src/test/block_intr_sigchld.c Examining data/rr-5.4.0/src/test/block_open.c Examining data/rr-5.4.0/src/test/blocked_bad_ip.c Examining data/rr-5.4.0/src/test/blocked_sigill.c Examining data/rr-5.4.0/src/test/breakpoint.c Examining data/rr-5.4.0/src/test/breakpoint_conditions.c Examining data/rr-5.4.0/src/test/breakpoint_overlap.c Examining data/rr-5.4.0/src/test/brk.c Examining data/rr-5.4.0/src/test/brk2.c Examining data/rr-5.4.0/src/test/call_function.c Examining data/rr-5.4.0/src/test/capget.c Examining data/rr-5.4.0/src/test/check_lost_interrupts.c Examining data/rr-5.4.0/src/test/check_session_leaks.c Examining data/rr-5.4.0/src/test/checkpoint_dying_threads.c Examining data/rr-5.4.0/src/test/checkpoint_mixed_mode.c Examining data/rr-5.4.0/src/test/checksum_sanity.c Examining data/rr-5.4.0/src/test/chew_cpu.c Examining data/rr-5.4.0/src/test/chmod.c Examining data/rr-5.4.0/src/test/chown.c Examining data/rr-5.4.0/src/test/clock.c Examining data/rr-5.4.0/src/test/clock_adjtime.c Examining data/rr-5.4.0/src/test/clock_nanosleep.c Examining data/rr-5.4.0/src/test/clock_time64.c Examining data/rr-5.4.0/src/test/clone.c Examining data/rr-5.4.0/src/test/clone_bad_stack.c Examining data/rr-5.4.0/src/test/clone_bad_tls.c Examining data/rr-5.4.0/src/test/clone_cleartid_coredump.c Examining data/rr-5.4.0/src/test/clone_fail.c Examining data/rr-5.4.0/src/test/clone_file_range.c Examining data/rr-5.4.0/src/test/clone_immediate_exit.c Examining data/rr-5.4.0/src/test/clone_interruption.c Examining data/rr-5.4.0/src/test/clone_newflags.c Examining data/rr-5.4.0/src/test/clone_parent.c Examining data/rr-5.4.0/src/test/clone_share_vm.c Examining data/rr-5.4.0/src/test/clone_untraced.c Examining data/rr-5.4.0/src/test/clone_vfork.c Examining data/rr-5.4.0/src/test/clone_vfork_pidfd.c Examining data/rr-5.4.0/src/test/cloned_sigmask.c Examining data/rr-5.4.0/src/test/conditional_breakpoint_calls.c Examining data/rr-5.4.0/src/test/conditional_breakpoint_offload.c Examining data/rr-5.4.0/src/test/condvar_stress.c Examining data/rr-5.4.0/src/test/constructor.c Examining data/rr-5.4.0/src/test/copy_file_range.c Examining data/rr-5.4.0/src/test/crash.c Examining data/rr-5.4.0/src/test/crash_in_function.c Examining data/rr-5.4.0/src/test/creat_address_not_truncated.c Examining data/rr-5.4.0/src/test/cwd_inaccessible.c Examining data/rr-5.4.0/src/test/daemon.c Examining data/rr-5.4.0/src/test/daemon_read.c Examining data/rr-5.4.0/src/test/dconf_mock.c Examining data/rr-5.4.0/src/test/desched_blocking_poll.c Examining data/rr-5.4.0/src/test/deterministic_sigsys.c Examining data/rr-5.4.0/src/test/dev_tty.c Examining data/rr-5.4.0/src/test/direct.c Examining data/rr-5.4.0/src/test/diversion_syscall.c Examining data/rr-5.4.0/src/test/dlopen.c Examining data/rr-5.4.0/src/test/doublesegv.c Examining data/rr-5.4.0/src/test/dup.c Examining data/rr-5.4.0/src/test/early_error.c Examining data/rr-5.4.0/src/test/elapsed_time.c Examining data/rr-5.4.0/src/test/epoll_create.c Examining data/rr-5.4.0/src/test/epoll_create1.c Examining data/rr-5.4.0/src/test/eventfd.c Examining data/rr-5.4.0/src/test/exec_failed.c Examining data/rr-5.4.0/src/test/exec_flags.c Examining data/rr-5.4.0/src/test/exec_from_main_thread.c Examining data/rr-5.4.0/src/test/exec_from_other_thread.c Examining data/rr-5.4.0/src/test/exec_many.c Examining data/rr-5.4.0/src/test/exec_no_env.c Examining data/rr-5.4.0/src/test/exec_self.c Examining data/rr-5.4.0/src/test/exec_stopsig.c Examining data/rr-5.4.0/src/test/execve_loop.c Examining data/rr-5.4.0/src/test/exit_codes.c Examining data/rr-5.4.0/src/test/exit_group.c Examining data/rr-5.4.0/src/test/exit_race.c Examining data/rr-5.4.0/src/test/exit_status.c Examining data/rr-5.4.0/src/test/exit_with_syscallbuf_signal.c Examining data/rr-5.4.0/src/test/explicit_checkpoints.c Examining data/rr-5.4.0/src/test/fadvise.c Examining data/rr-5.4.0/src/test/fanotify.c Examining data/rr-5.4.0/src/test/fatal_sigsegv_thread.c Examining data/rr-5.4.0/src/test/fcntl_dupfd.c Examining data/rr-5.4.0/src/test/fcntl_misc.c Examining data/rr-5.4.0/src/test/fcntl_owner_ex.c Examining data/rr-5.4.0/src/test/fcntl_rw_hints.c Examining data/rr-5.4.0/src/test/fcntl_seals.c Examining data/rr-5.4.0/src/test/fcntl_sig.c Examining data/rr-5.4.0/src/test/fd_cleanup.c Examining data/rr-5.4.0/src/test/fd_tracking_across_threads.c Examining data/rr-5.4.0/src/test/fds_clean.c Examining data/rr-5.4.0/src/test/flock.c Examining data/rr-5.4.0/src/test/flock2.c Examining data/rr-5.4.0/src/test/flock_ofd.c Examining data/rr-5.4.0/src/test/fork_brk.c Examining data/rr-5.4.0/src/test/fork_child_crash.c Examining data/rr-5.4.0/src/test/fork_many.c Examining data/rr-5.4.0/src/test/fork_stress.c Examining data/rr-5.4.0/src/test/fork_syscalls.c Examining data/rr-5.4.0/src/test/function_calls.c Examining data/rr-5.4.0/src/test/futex_exit_race.c Examining data/rr-5.4.0/src/test/futex_exit_race_sigsegv.c Examining data/rr-5.4.0/src/test/futex_pi.c Examining data/rr-5.4.0/src/test/futex_priorities.c Examining data/rr-5.4.0/src/test/futex_requeue.c Examining data/rr-5.4.0/src/test/gcrypt_rdrand.c Examining data/rr-5.4.0/src/test/gdb_bogus_breakpoint.c Examining data/rr-5.4.0/src/test/getcpu.c Examining data/rr-5.4.0/src/test/getcwd.c Examining data/rr-5.4.0/src/test/getgroups.c Examining data/rr-5.4.0/src/test/getpwnam.c Examining data/rr-5.4.0/src/test/getrandom.c Examining data/rr-5.4.0/src/test/getsid.c Examining data/rr-5.4.0/src/test/gettimeofday.c Examining data/rr-5.4.0/src/test/goto_event.c Examining data/rr-5.4.0/src/test/grandchild_threads.c Examining data/rr-5.4.0/src/test/grandchild_threads_main_running.c Examining data/rr-5.4.0/src/test/grandchild_threads_parent_alive.c Examining data/rr-5.4.0/src/test/grandchild_threads_thread_running.c Examining data/rr-5.4.0/src/test/hello.c Examining data/rr-5.4.0/src/test/history.c Examining data/rr-5.4.0/src/test/hooks.c Examining data/rr-5.4.0/src/test/ignore_nested.c Examining data/rr-5.4.0/src/test/ignored_async_usr1.c Examining data/rr-5.4.0/src/test/ignored_sigsegv.c Examining data/rr-5.4.0/src/test/immediate_restart.c Examining data/rr-5.4.0/src/test/inotify.c Examining data/rr-5.4.0/src/test/int3.c Examining data/rr-5.4.0/src/test/interrupt.c Examining data/rr-5.4.0/src/test/intr_futex_wait_restart.c Examining data/rr-5.4.0/src/test/intr_poll.c Examining data/rr-5.4.0/src/test/intr_ppoll.c Examining data/rr-5.4.0/src/test/intr_pselect.c Examining data/rr-5.4.0/src/test/intr_ptrace_decline.c Examining data/rr-5.4.0/src/test/intr_read_no_restart.c Examining data/rr-5.4.0/src/test/intr_read_restart.c Examining data/rr-5.4.0/src/test/intr_sleep.c Examining data/rr-5.4.0/src/test/intr_sleep_no_restart.c Examining data/rr-5.4.0/src/test/invalid_exec.c Examining data/rr-5.4.0/src/test/invalid_fcntl.c Examining data/rr-5.4.0/src/test/invalid_ioctl.c Examining data/rr-5.4.0/src/test/invalid_jump.c Examining data/rr-5.4.0/src/test/io.c Examining data/rr-5.4.0/src/test/ioctl.c Examining data/rr-5.4.0/src/test/ioctl_fs.c Examining data/rr-5.4.0/src/test/ioctl_pty.c Examining data/rr-5.4.0/src/test/ioctl_sg.c Examining data/rr-5.4.0/src/test/ioctl_tty.c Examining data/rr-5.4.0/src/test/jit_proc_mem.c Examining data/rr-5.4.0/src/test/join_threads.c Examining data/rr-5.4.0/src/test/joystick.c Examining data/rr-5.4.0/src/test/kcmp.c Examining data/rr-5.4.0/src/test/keyctl.c Examining data/rr-5.4.0/src/test/kill_newborn.c Examining data/rr-5.4.0/src/test/kill_ptracee.c Examining data/rr-5.4.0/src/test/legacy_ugid.c Examining data/rr-5.4.0/src/test/link.c Examining data/rr-5.4.0/src/test/madvise.c Examining data/rr-5.4.0/src/test/madvise_dontfork.c Examining data/rr-5.4.0/src/test/madvise_free.c Examining data/rr-5.4.0/src/test/madvise_wipeonfork.c Examining data/rr-5.4.0/src/test/main_thread_exit.c Examining data/rr-5.4.0/src/test/map_fixed.c Examining data/rr-5.4.0/src/test/map_shared_syscall.c Examining data/rr-5.4.0/src/test/membarrier.c Examining data/rr-5.4.0/src/test/memfd_create.c Examining data/rr-5.4.0/src/test/memfd_create_shared.c Examining data/rr-5.4.0/src/test/mincore.c Examining data/rr-5.4.0/src/test/mknod.c Examining data/rr-5.4.0/src/test/mlock.c Examining data/rr-5.4.0/src/test/mmap_adjacent_to_rr_usage.c Examining data/rr-5.4.0/src/test/mmap_fd_reuse_checkpoint.c Examining data/rr-5.4.0/src/test/mmap_private.c Examining data/rr-5.4.0/src/test/mmap_private_grow_under_map.c Examining data/rr-5.4.0/src/test/mmap_replace_most_mappings.c Examining data/rr-5.4.0/src/test/mmap_ro.c Examining data/rr-5.4.0/src/test/mmap_self_maps_shared.c Examining data/rr-5.4.0/src/test/mmap_shared.c Examining data/rr-5.4.0/src/test/mmap_shared_dev_zero.c Examining data/rr-5.4.0/src/test/mmap_shared_grow.c Examining data/rr-5.4.0/src/test/mmap_shared_grow_under_map.c Examining data/rr-5.4.0/src/test/mmap_shared_multiple.c Examining data/rr-5.4.0/src/test/mmap_shared_prot.c Examining data/rr-5.4.0/src/test/mmap_shared_subpage.c Examining data/rr-5.4.0/src/test/mmap_shared_write.c Examining data/rr-5.4.0/src/test/mmap_shared_write_exec_race.c Examining data/rr-5.4.0/src/test/mmap_shared_write_fork.c Examining data/rr-5.4.0/src/test/mmap_short_file.c Examining data/rr-5.4.0/src/test/mmap_tmpfs.c Examining data/rr-5.4.0/src/test/mmap_write.c Examining data/rr-5.4.0/src/test/mmap_write_complex.c Examining data/rr-5.4.0/src/test/mmap_write_private.c Examining data/rr-5.4.0/src/test/mmap_zero_size_fd.c Examining data/rr-5.4.0/src/test/mount_ns_exec.c Examining data/rr-5.4.0/src/test/mount_ns_exec2.c Examining data/rr-5.4.0/src/test/mprotect.c Examining data/rr-5.4.0/src/test/mprotect_growsdown.c Examining data/rr-5.4.0/src/test/mprotect_heterogenous.c Examining data/rr-5.4.0/src/test/mprotect_none.c Examining data/rr-5.4.0/src/test/mprotect_stack.c Examining data/rr-5.4.0/src/test/mprotect_syscallbuf_overflow.c Examining data/rr-5.4.0/src/test/mq.c Examining data/rr-5.4.0/src/test/mremap.c Examining data/rr-5.4.0/src/test/mremap_after_coalesce.c Examining data/rr-5.4.0/src/test/mremap_grow.c Examining data/rr-5.4.0/src/test/mremap_grow_shared.c Examining data/rr-5.4.0/src/test/mremap_non_page_size.c Examining data/rr-5.4.0/src/test/mremap_overwrite.c Examining data/rr-5.4.0/src/test/mremap_private_grow_under_map.c Examining data/rr-5.4.0/src/test/mremap_shrink.c Examining data/rr-5.4.0/src/test/msg.c Examining data/rr-5.4.0/src/test/msg_trunc.c Examining data/rr-5.4.0/src/test/msync.c Examining data/rr-5.4.0/src/test/mtio.c Examining data/rr-5.4.0/src/test/multiple_pending_signals.c Examining data/rr-5.4.0/src/test/multiple_pending_signals_sequential.c Examining data/rr-5.4.0/src/test/munmap_discontinuous.c Examining data/rr-5.4.0/src/test/munmap_segv.c Examining data/rr-5.4.0/src/test/mutex_pi_stress.c Examining data/rr-5.4.0/src/test/nanosleep.c Examining data/rr-5.4.0/src/test/nested_detach_wait.c Examining data/rr-5.4.0/src/test/netfilter.c Examining data/rr-5.4.0/src/test/netlink_mmap_disable.c Examining data/rr-5.4.0/src/test/no_mask_timeslice.c Examining data/rr-5.4.0/src/test/nscd.c Examining data/rr-5.4.0/src/test/nsutils.h Examining data/rr-5.4.0/src/test/numa.c Examining data/rr-5.4.0/src/test/orphan_process.c Examining data/rr-5.4.0/src/test/overflow_branch_counter.c Examining data/rr-5.4.0/src/test/packet_mmap_disable.c Examining data/rr-5.4.0/src/test/patch_page_end.c Examining data/rr-5.4.0/src/test/pause.c Examining data/rr-5.4.0/src/test/perf_event.c Examining data/rr-5.4.0/src/test/personality.c Examining data/rr-5.4.0/src/test/pid_ns_reap.c Examining data/rr-5.4.0/src/test/pid_ns_segv.c Examining data/rr-5.4.0/src/test/pidfd.c Examining data/rr-5.4.0/src/test/pivot_root.c Examining data/rr-5.4.0/src/test/poll_sig_race.c Examining data/rr-5.4.0/src/test/ppoll.c Examining data/rr-5.4.0/src/test/prctl.c Examining data/rr-5.4.0/src/test/prctl_caps.c Examining data/rr-5.4.0/src/test/prctl_deathsig.c Examining data/rr-5.4.0/src/test/prctl_name.c Examining data/rr-5.4.0/src/test/prctl_short_name.c Examining data/rr-5.4.0/src/test/prctl_speculation_ctrl.c Examining data/rr-5.4.0/src/test/priority.c Examining data/rr-5.4.0/src/test/privileged_net_ioctl.c Examining data/rr-5.4.0/src/test/proc_fds.c Examining data/rr-5.4.0/src/test/proc_mem.c Examining data/rr-5.4.0/src/test/protect_rr_fds.c Examining data/rr-5.4.0/src/test/prw.c Examining data/rr-5.4.0/src/test/pthread_condvar_locking.c Examining data/rr-5.4.0/src/test/pthread_rwlocks.c Examining data/rr-5.4.0/src/test/ptrace_attach_null_status.c Examining data/rr-5.4.0/src/test/ptrace_attach_running.c Examining data/rr-5.4.0/src/test/ptrace_attach_sleeping.c Examining data/rr-5.4.0/src/test/ptrace_attach_stopped.c Examining data/rr-5.4.0/src/test/ptrace_attach_thread_running.c Examining data/rr-5.4.0/src/test/ptrace_breakpoint.c Examining data/rr-5.4.0/src/test/ptrace_change_patched_syscall.c Examining data/rr-5.4.0/src/test/ptrace_exec.c Examining data/rr-5.4.0/src/test/ptrace_kill_grandtracee.c Examining data/rr-5.4.0/src/test/ptrace_remote_unmap.c Examining data/rr-5.4.0/src/test/ptrace_seize.c Examining data/rr-5.4.0/src/test/ptrace_sigchld_blocked.c Examining data/rr-5.4.0/src/test/ptrace_signals.c Examining data/rr-5.4.0/src/test/ptrace_singlestep.c Examining data/rr-5.4.0/src/test/ptrace_syscall.c Examining data/rr-5.4.0/src/test/ptrace_syscall_clone_untraced.c Examining data/rr-5.4.0/src/test/ptrace_sysemu.c Examining data/rr-5.4.0/src/test/ptrace_sysemu_syscall.c Examining data/rr-5.4.0/src/test/ptrace_trace_clone.c Examining data/rr-5.4.0/src/test/ptrace_trace_exit.c Examining data/rr-5.4.0/src/test/ptrace_traceme.c Examining data/rr-5.4.0/src/test/ptrace_util.h Examining data/rr-5.4.0/src/test/ptracer_death.c Examining data/rr-5.4.0/src/test/ptracer_death_multithread.c Examining data/rr-5.4.0/src/test/ptracer_death_multithread_peer.c Examining data/rr-5.4.0/src/test/quotactl.c Examining data/rr-5.4.0/src/test/read_big_struct.c Examining data/rr-5.4.0/src/test/read_large.c Examining data/rr-5.4.0/src/test/read_nothing.c Examining data/rr-5.4.0/src/test/read_oversize.c Examining data/rr-5.4.0/src/test/readdir.c Examining data/rr-5.4.0/src/test/readlink.c Examining data/rr-5.4.0/src/test/readlinkat.c Examining data/rr-5.4.0/src/test/readv.c Examining data/rr-5.4.0/src/test/record_replay_subject.c Examining data/rr-5.4.0/src/test/recvfrom.c Examining data/rr-5.4.0/src/test/redzone_integrity.c Examining data/rr-5.4.0/src/test/remove_latest_trace.c Examining data/rr-5.4.0/src/test/rename.c Examining data/rr-5.4.0/src/test/restart_abnormal_exit.c Examining data/rr-5.4.0/src/test/reverse_continue_breakpoint.c Examining data/rr-5.4.0/src/test/reverse_continue_multiprocess.c Examining data/rr-5.4.0/src/test/reverse_continue_process_signal.c Examining data/rr-5.4.0/src/test/reverse_many_breakpoints.c Examining data/rr-5.4.0/src/test/reverse_step_long.c Examining data/rr-5.4.0/src/test/reverse_step_threads.c Examining data/rr-5.4.0/src/test/reverse_step_threads_break.c Examining data/rr-5.4.0/src/test/rlimit.c Examining data/rr-5.4.0/src/test/robust_futex.c Examining data/rr-5.4.0/src/test/rr_ps.c Examining data/rr-5.4.0/src/test/rr_ps_ns.c Examining data/rr-5.4.0/src/test/rusage.c Examining data/rr-5.4.0/src/test/samask.c Examining data/rr-5.4.0/src/test/save_data_fd.c Examining data/rr-5.4.0/src/test/sched_attr.c Examining data/rr-5.4.0/src/test/sched_setaffinity.c Examining data/rr-5.4.0/src/test/sched_setparam.c Examining data/rr-5.4.0/src/test/sched_yield.c Examining data/rr-5.4.0/src/test/sched_yield_to_lower_priority.c Examining data/rr-5.4.0/src/test/scm_rights.c Examining data/rr-5.4.0/src/test/scratch_read.c Examining data/rr-5.4.0/src/test/search.c Examining data/rr-5.4.0/src/test/seccomp.c Examining data/rr-5.4.0/src/test/seccomp_blocks_rr.c Examining data/rr-5.4.0/src/test/seccomp_clone_fail.c Examining data/rr-5.4.0/src/test/seccomp_desched.c Examining data/rr-5.4.0/src/test/seccomp_kill_exit.c Examining data/rr-5.4.0/src/test/seccomp_null.c Examining data/rr-5.4.0/src/test/seccomp_signals.c Examining data/rr-5.4.0/src/test/seccomp_sigsys_args.c Examining data/rr-5.4.0/src/test/seccomp_sigsys_sigtrap.c Examining data/rr-5.4.0/src/test/seccomp_sigsys_syscallbuf.c Examining data/rr-5.4.0/src/test/seccomp_tsync.c Examining data/rr-5.4.0/src/test/seccomp_veto_exec.c Examining data/rr-5.4.0/src/test/segfault.c Examining data/rr-5.4.0/src/test/self_shebang.c Examining data/rr-5.4.0/src/test/self_sigint.c Examining data/rr-5.4.0/src/test/sem.c Examining data/rr-5.4.0/src/test/send_block.c Examining data/rr-5.4.0/src/test/sendfile.c Examining data/rr-5.4.0/src/test/set_ptracer.c Examining data/rr-5.4.0/src/test/set_tid_address.c Examining data/rr-5.4.0/src/test/setgid.c Examining data/rr-5.4.0/src/test/setgroups.c Examining data/rr-5.4.0/src/test/setitimer.c Examining data/rr-5.4.0/src/test/setsid.c Examining data/rr-5.4.0/src/test/setuid.c Examining data/rr-5.4.0/src/test/shared_exec.c Examining data/rr-5.4.0/src/test/shared_map.c Examining data/rr-5.4.0/src/test/shared_persistent_file.c Examining data/rr-5.4.0/src/test/shared_write.c Examining data/rr-5.4.0/src/test/shm.c Examining data/rr-5.4.0/src/test/shm_unmap.c Examining data/rr-5.4.0/src/test/sigaction_old.c Examining data/rr-5.4.0/src/test/sigaltstack.c Examining data/rr-5.4.0/src/test/sigchld_interrupt_signal.c Examining data/rr-5.4.0/src/test/sigcont.c Examining data/rr-5.4.0/src/test/sighandler_bad_rsp_sigsegv.c Examining data/rr-5.4.0/src/test/sighandler_fork.c Examining data/rr-5.4.0/src/test/sighandler_mask.c Examining data/rr-5.4.0/src/test/sigill.c Examining data/rr-5.4.0/src/test/signal_deferred.c Examining data/rr-5.4.0/src/test/signal_during_preload_init.c Examining data/rr-5.4.0/src/test/signal_frame.c Examining data/rr-5.4.0/src/test/signal_numbers.c Examining data/rr-5.4.0/src/test/signal_unstoppable.c Examining data/rr-5.4.0/src/test/signalfd.c Examining data/rr-5.4.0/src/test/sigprocmask.c Examining data/rr-5.4.0/src/test/sigprocmask_ensure_delivery.c Examining data/rr-5.4.0/src/test/sigprocmask_evil.c Examining data/rr-5.4.0/src/test/sigprocmask_exec.c Examining data/rr-5.4.0/src/test/sigprocmask_in_syscallbuf_sighandler.c Examining data/rr-5.4.0/src/test/sigprocmask_race.c Examining data/rr-5.4.0/src/test/sigprocmask_rr_sigs.c Examining data/rr-5.4.0/src/test/sigprocmask_rr_sigs_nondefault.c Examining data/rr-5.4.0/src/test/sigprocmask_syscallbuf.c Examining data/rr-5.4.0/src/test/sigqueueinfo.c Examining data/rr-5.4.0/src/test/sigreturn_reg.c Examining data/rr-5.4.0/src/test/sigreturnmask.c Examining data/rr-5.4.0/src/test/sigrt.c Examining data/rr-5.4.0/src/test/sigstop.c Examining data/rr-5.4.0/src/test/sigstop2.c Examining data/rr-5.4.0/src/test/sigsuspend.c Examining data/rr-5.4.0/src/test/sigtrap.c Examining data/rr-5.4.0/src/test/simple.c Examining data/rr-5.4.0/src/test/simple_threads_stress.c Examining data/rr-5.4.0/src/test/sioc.c Examining data/rr-5.4.0/src/test/sock_names_opts.c Examining data/rr-5.4.0/src/test/spinlock_priorities.c Examining data/rr-5.4.0/src/test/splice.c Examining data/rr-5.4.0/src/test/stack_growth.c Examining data/rr-5.4.0/src/test/stack_growth_after_syscallbuf.c Examining data/rr-5.4.0/src/test/stack_growth_syscallbuf.c Examining data/rr-5.4.0/src/test/stack_growth_with_guard.c Examining data/rr-5.4.0/src/test/stack_invalid.c Examining data/rr-5.4.0/src/test/stack_overflow.c Examining data/rr-5.4.0/src/test/stack_overflow_altstack.c Examining data/rr-5.4.0/src/test/stack_overflow_with_guard.c Examining data/rr-5.4.0/src/test/statfs.c Examining data/rr-5.4.0/src/test/statx.c Examining data/rr-5.4.0/src/test/std_random.cc Examining data/rr-5.4.0/src/test/stdout_child.c Examining data/rr-5.4.0/src/test/stdout_cloexec.c Examining data/rr-5.4.0/src/test/stdout_dup.c Examining data/rr-5.4.0/src/test/stdout_redirect.c Examining data/rr-5.4.0/src/test/step_thread.c Examining data/rr-5.4.0/src/test/stray_time_slice_signal.c Examining data/rr-5.4.0/src/test/strict_priorities.c Examining data/rr-5.4.0/src/test/switch_read.c Examining data/rr-5.4.0/src/test/symlink.c Examining data/rr-5.4.0/src/test/sync.c Examining data/rr-5.4.0/src/test/sync_file_range.c Examining data/rr-5.4.0/src/test/syscall_bp.c Examining data/rr-5.4.0/src/test/syscall_in_writable_mem.c Examining data/rr-5.4.0/src/test/syscallbuf_fd_disabling.c Examining data/rr-5.4.0/src/test/syscallbuf_signal_blocking.c Examining data/rr-5.4.0/src/test/syscallbuf_signal_blocking_read.c Examining data/rr-5.4.0/src/test/syscallbuf_signal_reset.c Examining data/rr-5.4.0/src/test/syscallbuf_sigstop.c Examining data/rr-5.4.0/src/test/syscallbuf_timeslice.c Examining data/rr-5.4.0/src/test/syscallbuf_timeslice2.c Examining data/rr-5.4.0/src/test/sysconf.c Examining data/rr-5.4.0/src/test/sysconf_onln.c Examining data/rr-5.4.0/src/test/sysctl.c Examining data/rr-5.4.0/src/test/sysemu_singlestep.c Examining data/rr-5.4.0/src/test/sysinfo.c Examining data/rr-5.4.0/src/test/target_fork.c Examining data/rr-5.4.0/src/test/target_process.c Examining data/rr-5.4.0/src/test/term_nonmain.c Examining data/rr-5.4.0/src/test/term_rr.c Examining data/rr-5.4.0/src/test/term_trace_reset.c Examining data/rr-5.4.0/src/test/term_trace_syscall.c Examining data/rr-5.4.0/src/test/test_lib.c Examining data/rr-5.4.0/src/test/tgkill.c Examining data/rr-5.4.0/src/test/thread_exit_signal.c Examining data/rr-5.4.0/src/test/thread_open_race.c Examining data/rr-5.4.0/src/test/thread_stress.c Examining data/rr-5.4.0/src/test/thread_yield.c Examining data/rr-5.4.0/src/test/threaded_syscall_spam.c Examining data/rr-5.4.0/src/test/threads.c Examining data/rr-5.4.0/src/test/timer.c Examining data/rr-5.4.0/src/test/timerfd.c Examining data/rr-5.4.0/src/test/times.c Examining data/rr-5.4.0/src/test/tls.c Examining data/rr-5.4.0/src/test/truncate_temp.c Examining data/rr-5.4.0/src/test/ttyname.c Examining data/rr-5.4.0/src/test/tun.c Examining data/rr-5.4.0/src/test/two_signals_with_mask.c Examining data/rr-5.4.0/src/test/ulimit_low.c Examining data/rr-5.4.0/src/test/uname.c Examining data/rr-5.4.0/src/test/unexpected_exit.c Examining data/rr-5.4.0/src/test/unexpected_exit_execve.c Examining data/rr-5.4.0/src/test/unexpected_exit_execve_twice.c Examining data/rr-5.4.0/src/test/unexpected_exit_pid_ns.c Examining data/rr-5.4.0/src/test/unexpected_stack_growth.c Examining data/rr-5.4.0/src/test/unjoined_thread.c Examining data/rr-5.4.0/src/test/unshare.c Examining data/rr-5.4.0/src/test/usb.c Examining data/rr-5.4.0/src/test/user_ignore_sig.c Examining data/rr-5.4.0/src/test/util.h Examining data/rr-5.4.0/src/test/utimes.c Examining data/rr-5.4.0/src/test/vdso_clock_gettime_stack.c Examining data/rr-5.4.0/src/test/vdso_gettimeofday_stack.c Examining data/rr-5.4.0/src/test/vdso_time_stack.c Examining data/rr-5.4.0/src/test/vfork.c Examining data/rr-5.4.0/src/test/vfork_flush.c Examining data/rr-5.4.0/src/test/vfork_read_clone_stress.c Examining data/rr-5.4.0/src/test/vfork_shared.c Examining data/rr-5.4.0/src/test/video_capture.c Examining data/rr-5.4.0/src/test/vm_readv_writev.c Examining data/rr-5.4.0/src/test/vsyscall.c Examining data/rr-5.4.0/src/test/vsyscall_reverse_next.c Examining data/rr-5.4.0/src/test/wait.c Examining data/rr-5.4.0/src/test/wait_for_all.c Examining data/rr-5.4.0/src/test/wait_sigstop.c Examining data/rr-5.4.0/src/test/watchpoint.c Examining data/rr-5.4.0/src/test/watchpoint_at_sched.c Examining data/rr-5.4.0/src/test/watchpoint_before_signal.c Examining data/rr-5.4.0/src/test/watchpoint_no_progress.c Examining data/rr-5.4.0/src/test/watchpoint_size_change.c Examining data/rr-5.4.0/src/test/watchpoint_syscall.c Examining data/rr-5.4.0/src/test/watchpoint_unaligned.c Examining data/rr-5.4.0/src/test/write_race.c Examining data/rr-5.4.0/src/test/writev.c Examining data/rr-5.4.0/src/test/x86/blocked_sigsegv.c Examining data/rr-5.4.0/src/test/x86/chew_cpu_cpuid.c Examining data/rr-5.4.0/src/test/x86/cpuid.c Examining data/rr-5.4.0/src/test/x86/cpuid_same_state.c Examining data/rr-5.4.0/src/test/x86/cpuid_singlestep.c Examining data/rr-5.4.0/src/test/x86/cross_arch.c Examining data/rr-5.4.0/src/test/x86/fault_in_code_page.c Examining data/rr-5.4.0/src/test/x86/fxregs.c Examining data/rr-5.4.0/src/test/x86/hle.c Examining data/rr-5.4.0/src/test/x86/int3_ok.c Examining data/rr-5.4.0/src/test/x86/lsl.c Examining data/rr-5.4.0/src/test/x86/modify_ldt.c Examining data/rr-5.4.0/src/test/x86/old_fork.c Examining data/rr-5.4.0/src/test/x86/patch_40_80_f6_81.c Examining data/rr-5.4.0/src/test/x86/prctl_tsc.c Examining data/rr-5.4.0/src/test/x86/ptrace.c Examining data/rr-5.4.0/src/test/x86/ptrace_debug_regs.c Examining data/rr-5.4.0/src/test/x86/ptrace_exec32.c Examining data/rr-5.4.0/src/test/x86/ptrace_tls.c Examining data/rr-5.4.0/src/test/x86/rdtsc.c Examining data/rr-5.4.0/src/test/x86/sigreturn.c Examining data/rr-5.4.0/src/test/x86/singlestep_pushf.c Examining data/rr-5.4.0/src/test/x86/string_instructions.c Examining data/rr-5.4.0/src/test/x86/string_instructions_async_signals.c Examining data/rr-5.4.0/src/test/x86/string_instructions_async_signals_shared.c Examining data/rr-5.4.0/src/test/x86/string_instructions_multiwatch.c Examining data/rr-5.4.0/src/test/x86/string_instructions_replay.c Examining data/rr-5.4.0/src/test/x86/string_instructions_singlestep_fastforward.c Examining data/rr-5.4.0/src/test/x86/string_instructions_watch.c Examining data/rr-5.4.0/src/test/x86/sysfs.c Examining data/rr-5.4.0/src/test/x86/util.h Examining data/rr-5.4.0/src/test/x86/x87env.c Examining data/rr-5.4.0/src/test/xattr.c Examining data/rr-5.4.0/src/test/zero_length_read.c Examining data/rr-5.4.0/src/util.h Examining data/rr-5.4.0/src/util.cc Examining data/rr-5.4.0/third-party/blake2/blake2-impl.h Examining data/rr-5.4.0/third-party/blake2/blake2.h Examining data/rr-5.4.0/third-party/blake2/neon/blake2b-load-neon.h Examining data/rr-5.4.0/third-party/blake2/neon/blake2b-neon.c Examining data/rr-5.4.0/third-party/blake2/neon/blake2b-round.h Examining data/rr-5.4.0/third-party/blake2/neon/blake2b.c Examining data/rr-5.4.0/third-party/blake2/sse/blake2-config.h Examining data/rr-5.4.0/third-party/blake2/sse/blake2b-load-sse2.h Examining data/rr-5.4.0/third-party/blake2/sse/blake2b-load-sse41.h Examining data/rr-5.4.0/third-party/blake2/sse/blake2b-round.h Examining data/rr-5.4.0/third-party/blake2/sse/blake2b.c Examining data/rr-5.4.0/third-party/brotli/common/constants.h Examining data/rr-5.4.0/third-party/brotli/common/context.h Examining data/rr-5.4.0/third-party/brotli/common/dictionary.c Examining data/rr-5.4.0/third-party/brotli/common/dictionary.h Examining data/rr-5.4.0/third-party/brotli/common/platform.h Examining data/rr-5.4.0/third-party/brotli/common/transform.c Examining data/rr-5.4.0/third-party/brotli/common/transform.h Examining data/rr-5.4.0/third-party/brotli/common/version.h Examining data/rr-5.4.0/third-party/brotli/dec/bit_reader.c Examining data/rr-5.4.0/third-party/brotli/dec/bit_reader.h Examining data/rr-5.4.0/third-party/brotli/dec/context.h Examining data/rr-5.4.0/third-party/brotli/dec/decode.c Examining data/rr-5.4.0/third-party/brotli/dec/huffman.c Examining data/rr-5.4.0/third-party/brotli/dec/huffman.h Examining data/rr-5.4.0/third-party/brotli/dec/port.h Examining data/rr-5.4.0/third-party/brotli/dec/prefix.h Examining data/rr-5.4.0/third-party/brotli/dec/state.c Examining data/rr-5.4.0/third-party/brotli/dec/state.h Examining data/rr-5.4.0/third-party/brotli/dec/transform.h Examining data/rr-5.4.0/third-party/brotli/enc/backward_references.c Examining data/rr-5.4.0/third-party/brotli/enc/backward_references.h Examining data/rr-5.4.0/third-party/brotli/enc/backward_references_hq.c Examining data/rr-5.4.0/third-party/brotli/enc/backward_references_hq.h Examining data/rr-5.4.0/third-party/brotli/enc/backward_references_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/bit_cost.c Examining data/rr-5.4.0/third-party/brotli/enc/bit_cost.h Examining data/rr-5.4.0/third-party/brotli/enc/bit_cost_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/block_encoder_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/block_splitter.c Examining data/rr-5.4.0/third-party/brotli/enc/block_splitter.h Examining data/rr-5.4.0/third-party/brotli/enc/block_splitter_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/brotli_bit_stream.c Examining data/rr-5.4.0/third-party/brotli/enc/brotli_bit_stream.h Examining data/rr-5.4.0/third-party/brotli/enc/cluster.c Examining data/rr-5.4.0/third-party/brotli/enc/cluster.h Examining data/rr-5.4.0/third-party/brotli/enc/cluster_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/command.h Examining data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c Examining data/rr-5.4.0/third-party/brotli/enc/compress_fragment.h Examining data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c Examining data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.h Examining data/rr-5.4.0/third-party/brotli/enc/context.h Examining data/rr-5.4.0/third-party/brotli/enc/dictionary_hash.c Examining data/rr-5.4.0/third-party/brotli/enc/dictionary_hash.h Examining data/rr-5.4.0/third-party/brotli/enc/encode.c Examining data/rr-5.4.0/third-party/brotli/enc/encoder_dict.c Examining data/rr-5.4.0/third-party/brotli/enc/encoder_dict.h Examining data/rr-5.4.0/third-party/brotli/enc/entropy_encode.c Examining data/rr-5.4.0/third-party/brotli/enc/entropy_encode.h Examining data/rr-5.4.0/third-party/brotli/enc/entropy_encode_static.h Examining data/rr-5.4.0/third-party/brotli/enc/fast_log.h Examining data/rr-5.4.0/third-party/brotli/enc/find_match_length.h Examining data/rr-5.4.0/third-party/brotli/enc/hash.h Examining data/rr-5.4.0/third-party/brotli/enc/hash_composite_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/hash_forgetful_chain_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/hash_longest_match64_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/hash_longest_match_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/hash_longest_match_quickly_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/hash_rolling_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/hash_to_binary_tree_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/histogram.c Examining data/rr-5.4.0/third-party/brotli/enc/histogram.h Examining data/rr-5.4.0/third-party/brotli/enc/histogram_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/literal_cost.c Examining data/rr-5.4.0/third-party/brotli/enc/literal_cost.h Examining data/rr-5.4.0/third-party/brotli/enc/memory.c Examining data/rr-5.4.0/third-party/brotli/enc/memory.h Examining data/rr-5.4.0/third-party/brotli/enc/metablock.c Examining data/rr-5.4.0/third-party/brotli/enc/metablock.h Examining data/rr-5.4.0/third-party/brotli/enc/metablock_inc.h Examining data/rr-5.4.0/third-party/brotli/enc/params.h Examining data/rr-5.4.0/third-party/brotli/enc/port.h Examining data/rr-5.4.0/third-party/brotli/enc/prefix.h Examining data/rr-5.4.0/third-party/brotli/enc/quality.h Examining data/rr-5.4.0/third-party/brotli/enc/ringbuffer.h Examining data/rr-5.4.0/third-party/brotli/enc/static_dict.c Examining data/rr-5.4.0/third-party/brotli/enc/static_dict.h Examining data/rr-5.4.0/third-party/brotli/enc/static_dict_lut.h Examining data/rr-5.4.0/third-party/brotli/enc/utf8_util.c Examining data/rr-5.4.0/third-party/brotli/enc/utf8_util.h Examining data/rr-5.4.0/third-party/brotli/enc/write_bits.h Examining data/rr-5.4.0/third-party/brotli/include/brotli/decode.h Examining data/rr-5.4.0/third-party/brotli/include/brotli/encode.h Examining data/rr-5.4.0/third-party/brotli/include/brotli/port.h Examining data/rr-5.4.0/third-party/brotli/include/brotli/types.h Examining data/rr-5.4.0/third-party/proc-service/proc_service.h FINAL RESULTS: data/rr-5.4.0/src/AddressSpace.cc:140:20: [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. ssize_t size = readlink(proc_exe, exe, sizeof(exe)); data/rr-5.4.0/src/Monkeypatcher.cc:1204:17: [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. int ret = readlink(buf, link, sizeof(link) - 1); data/rr-5.4.0/src/RecordTask.cc:340:17: [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. ssize_t ret = readlink(proc_exe, exe, sizeof(exe) - 1); data/rr-5.4.0/src/SourcesCommand.cc:396:19: [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. ssize_t ret = readlink(resolved_base.c_str(), buf, sizeof(buf)); data/rr-5.4.0/src/Task.cc:346:20: [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. ssize_t nbytes = readlink(procfd, path, sizeof(path) - 1); data/rr-5.4.0/src/ftrace/ftrace_helper.c:290:14: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. check(0 == chmod(path, 0666)); data/rr-5.4.0/src/preload/syscallbuf.c:3225:10: [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. CASE(readlink); data/rr-5.4.0/src/record_syscall.cc:3906:16: [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. case Arch::readlink: data/rr-5.4.0/src/record_syscall.cc:5036:17: [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. ssize_t ret = readlink(proc_root, root, sizeof(root) - 1); data/rr-5.4.0/src/test/chmod.c:10:20: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. test_assert(0 == chmod(file_path, 0400)); data/rr-5.4.0/src/test/chown.c:19:20: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. test_assert(0 == chown(path, geteuid(), new_gid)); data/rr-5.4.0/src/test/mount_ns_exec2.c:25:19: [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. ssize_t nread = readlink("/proc/self/exe", exe_buf, sizeof(exe_buf)-1); data/rr-5.4.0/src/test/ptrace_remote_unmap.c:153:23: [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. ssize_t path_size = readlink("/proc/self/exe", exe_path, 200); data/rr-5.4.0/src/test/readlink.c:27:27: [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. test_assert(BUF_SIZE == readlink(link, buf, BUF_SIZE)); data/rr-5.4.0/src/test/readlink.c:31:40: [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. test_assert((ssize_t)strlen(path) == readlink(link, buf2, BUF2_SIZE)); data/rr-5.4.0/src/test/self_shebang.c:14: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. ret = readlink("/proc/self/exe", self, sizeof(self) - 1); data/rr-5.4.0/src/AddressSpace.cc:528:14: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. size_t n = sscanf(fixed + 1, data/rr-5.4.0/src/ExtraRegisters.cc:287:10: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. p += sprintf(p, printed_digit ? "%02x" : "%x", buf[i]); data/rr-5.4.0/src/ExtraRegisters.cc:297:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s%d", name_base, i); data/rr-5.4.0/src/RecordCommand.cc:671: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(args[0].c_str(), StringVectorToCharArray(args).get()); data/rr-5.4.0/src/RecordCommand.cc:673: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(args[0].c_str(), StringVectorToCharArray(args).get()); data/rr-5.4.0/src/RecordSession.cc:1977:7: [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(file_name.c_str(), F_OK) == 0) { data/rr-5.4.0/src/RecordSession.cc:1982:7: [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(file_name.c_str(), F_OK) == 0) { data/rr-5.4.0/src/RecordSession.cc:2096: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. !access(file.c_str(), X_OK)) { data/rr-5.4.0/src/RecordTask.cc:438:9: [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(buf, F_OK) == -1 && errno == ENOENT) { data/rr-5.4.0/src/Registers.cc:216:3: [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, formats[RegisterPrinting<nbytes>::format_index], val); data/rr-5.4.0/src/RerunCommand.cc:151: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(out, any_printed ? "%02x" : "%x", value[i]); data/rr-5.4.0/src/SourcesCommand.cc:309:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. int ret = access(base.c_str(), F_OK); data/rr-5.4.0/src/Task.cc:3690:9: [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(stub_filename.c_str(), 0) == -1 && errno == ENOENT && data/rr-5.4.0/src/TraceFrame.cc:44:3: [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, " %lld %d %d %" PRId64, (long long)time(), tid(), event().type(), data/rr-5.4.0/src/TraceStream.cc:1419:11: [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(incomplete_path.c_str(), F_OK) == 0) { data/rr-5.4.0/src/chaos-test/chaosutil.h:27:23: [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))) inline static int atomic_printf( data/rr-5.4.0/src/chaos-test/chaosutil.h:34: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. len = vsnprintf(buf, sizeof(buf) - 1, fmt, args); data/rr-5.4.0/src/chaos-test/chaosutil.h:61:23: [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))) inline static void caught_test_failure( data/rr-5.4.0/src/chaos-test/chaosutil.h:69: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. len = vsnprintf(buf, sizeof(buf) - 2, fmt, args); data/rr-5.4.0/src/ftrace.cc:40:3: [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(addr.sun_path, s.c_str()); data/rr-5.4.0/src/ftrace/ftrace_helper.c:180:21: [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 (ret >= 0 && access(buf, F_OK) == 0) { data/rr-5.4.0/src/ftrace/ftrace_helper.c:287:3: [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(addr.sun_path, path); data/rr-5.4.0/src/ftrace/ftrace_helper.c:408:20: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. buf_out_ptr += sprintf(buf_out_ptr, "%s ", buf); data/rr-5.4.0/src/ftrace/ftrace_helper.c:442:7: [4] (shell) execlp: 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. execlp("sudo", "sudo", argv[1], control_path, NULL); data/rr-5.4.0/src/preload/syscallbuf.c:3149:30: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. CASE_GENERIC_NONBLOCKING(access); data/rr-5.4.0/src/record_syscall.cc:2191:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path1, "/proc/%d/ns/%s", tid1, name); data/rr-5.4.0/src/record_syscall.cc:2192:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path2, "/proc/%d/ns/%s", tid2, name); data/rr-5.4.0/src/record_syscall.cc:5362:11: [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. if (system("df -h")) { data/rr-5.4.0/src/test-monitor/test-monitor.cc:110:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "/proc/%d/%s", child, suffix); data/rr-5.4.0/src/test-monitor/test-monitor.cc:126:14: [4] (shell) popen: 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. FILE* st = popen(cmdline, "r"); data/rr-5.4.0/src/test-monitor/test-monitor.cc:168:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(cmdline, "%s -ex 'set confirm off' -ex 'set height 0' " data/rr-5.4.0/src/test-monitor/test-monitor.cc:325:5: [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(argv[3], &argv[3]); data/rr-5.4.0/src/test/64bit_child.c:11:13: [4] (shell) popen: 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. FILE* f = popen("echo -n", "r"); data/rr-5.4.0/src/test/chmod.c:11:20: [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. test_assert(0 == access(file_path, R_OK)); data/rr-5.4.0/src/test/chmod.c:13:20: [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. test_assert(0 == access(file_path, W_OK)); data/rr-5.4.0/src/test/chmod.c:15:20: [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. test_assert(0 == access(file_path, R_OK)); data/rr-5.4.0/src/test/clone_vfork.c:13:3: [4] (shell) execl: 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. execl(exe, exe, NULL); data/rr-5.4.0/src/test/creat_address_not_truncated.c:24:15: [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. test_assert(access(dummy_filename, F_OK) == 0); data/rr-5.4.0/src/test/exec_failed.c:11:3: [4] (shell) execlp: 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. execlp("/asdjfklajdfkla", "", NULL); data/rr-5.4.0/src/test/exec_many.c:13:5: [4] (shell) execlp: 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. execlp(argv[0], argv[0], buf, NULL); data/rr-5.4.0/src/test/exec_self.c:18:5: [4] (shell) execlp: 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. execlp(argv[0], argv[0], "self", NULL); data/rr-5.4.0/src/test/exec_stopsig.c:15:5: [4] (shell) execlp: 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. execlp(argv[0], argv[0], "self", NULL); data/rr-5.4.0/src/test/mmap_shared_write_exec_race.c:40:5: [4] (shell) execl: 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. execl(argv[0], argv[0], "exit", (char*)0); data/rr-5.4.0/src/test/prctl_name.c:47:3: [4] (shell) execl: 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. execl(exe_image, exe_image, "exec child", NULL); data/rr-5.4.0/src/test/protect_rr_fds.c:47:5: [4] (shell) execl: 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. execl(argv[0], argv[0], "step2", NULL); data/rr-5.4.0/src/test/recvfrom.c:22:3: [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(addr.sun_path, sock_name); data/rr-5.4.0/src/test/recvfrom.c:36:3: [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(addr2.sun_path, sock_name2); data/rr-5.4.0/src/test/seccomp_veto_exec.c:96: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("", argv); data/rr-5.4.0/src/test/sigprocmask_exec.c:12:5: [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("/proc/self/exe", argv); data/rr-5.4.0/src/test/sioc.c:85: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(req->ifr_name, ifaces->ifaces[wireless_index].ifr_name); data/rr-5.4.0/src/test/sioc.c:87: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(req->ifr_name, ifaces->ifaces[non_loop_index].ifr_name); data/rr-5.4.0/src/test/sioc.c:89: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(req->ifr_name, ifaces->ifaces[0].ifr_name); data/rr-5.4.0/src/test/sioc.c:92: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(eth_req->ifr_name, ifaces->ifaces[eth_index].ifr_name); data/rr-5.4.0/src/test/sioc.c:94: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(eth_req->ifr_name, ifaces->ifaces[non_loop_index].ifr_name); data/rr-5.4.0/src/test/sioc.c:96: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(eth_req->ifr_name, ifaces->ifaces[0].ifr_name); data/rr-5.4.0/src/test/sioc.c:129:3: [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((*wreq)->ifr_ifrn.ifrn_name, name); data/rr-5.4.0/src/test/sioc.c:380:3: [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(name, req->ifr_name); data/rr-5.4.0/src/test/sioc.c:383:3: [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(req->ifr_name, name); data/rr-5.4.0/src/test/sioc.c:476:3: [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(wreq->ifr_ifrn.ifrn_name, name); data/rr-5.4.0/src/test/stdout_child.c:15:5: [4] (shell) execl: 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. execl(argv[0], argv[0], "step2", NULL); data/rr-5.4.0/src/test/stdout_cloexec.c:21:5: [4] (shell) execl: 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. execl(argv[0], argv[0], "step2", NULL); data/rr-5.4.0/src/test/stdout_redirect.c:18:5: [4] (shell) execl: 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. execl(argv[0], argv[0], "step2", NULL); data/rr-5.4.0/src/test/target_process.c:14:5: [4] (shell) execl: 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. execl(exe_image, exe_image, NULL); data/rr-5.4.0/src/test/unshare.c:24:20: [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. test_assert(0 == access("/aaa/cpuinfo", F_OK)); data/rr-5.4.0/src/test/util.h:149:23: [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))) inline static int atomic_printf( data/rr-5.4.0/src/test/util.h:156: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. len = vsnprintf(buf, sizeof(buf) - 1, fmt, args); data/rr-5.4.0/src/test/util.h:170: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. #define fprintf(...) USE_dont_write_stderr data/rr-5.4.0/src/test/util.h:171:9: [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. #define printf(...) USE_atomic_printf_INSTEAD data/rr-5.4.0/src/test/vfork.c:19:5: [4] (shell) execl: 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. execl(exe, exe, NULL); data/rr-5.4.0/src/test/x86/ptrace_exec32.c:37:7: [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(name, F_OK)) { data/rr-5.4.0/src/test/x86/string_instructions.c:20:3: [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(u.buf, val); data/rr-5.4.0/src/test/x86/string_instructions_watch.c:13:3: [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(u.buf, val); data/rr-5.4.0/src/util.cc:731:31: [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. bool can_write_file = (0 == access(file_name.c_str(), W_OK)); data/rr-5.4.0/src/util.cc:1505:7: [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(d.c_str(), W_OK)) { data/rr-5.4.0/src/util.cc:1522:7: [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("/tmp", W_OK)) { data/rr-5.4.0/third-party/brotli/common/platform.h:470:23: [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. #define BROTLI_LOG(x) printf x data/rr-5.4.0/third-party/brotli/dec/port.h:78:23: [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. #define BROTLI_LOG(x) printf x data/rr-5.4.0/src/AddressSpace.cc:2121:37: [3] (random) random: 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. uint64_t r = ((uint64_t)(uint32_t)random() << 32) | (uint32_t)random(); data/rr-5.4.0/src/AddressSpace.cc:2121:65: [3] (random) random: 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. uint64_t r = ((uint64_t)(uint32_t)random() << 32) | (uint32_t)random(); data/rr-5.4.0/src/AddressSpace.cc:2139:9: [3] (random) random: 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. if (random() % 2) { data/rr-5.4.0/src/AddressSpace.cc:2142:41: [3] (random) random: 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. uint64_t r = ((uint64_t)(uint32_t)random() << 32) | (uint32_t)random(); data/rr-5.4.0/src/AddressSpace.cc:2142:69: [3] (random) random: 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. uint64_t r = ((uint64_t)(uint32_t)random() << 32) | (uint32_t)random(); data/rr-5.4.0/src/AddressSpace.cc:2146:23: [3] (random) random: 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. int map_index = random() % mem.size(); data/rr-5.4.0/src/AddressSpace.cc:2160:22: [3] (random) random: 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. int direction = (random() % 2) ? 1 : -1; data/rr-5.4.0/src/GdbServer.cc:1802:28: [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. char* test_monitor_pid = getenv("RUNNING_UNDER_TEST_MONITOR"); data/rr-5.4.0/src/PackCommand.cc:487: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. char* ret = realpath(dir.c_str(), buf); data/rr-5.4.0/src/RecordCommand.cc:700:26: [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. std::string sudo_uid = getenv("SUDO_UID"); data/rr-5.4.0/src/RecordCommand.cc:701:26: [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. std::string sudo_gid = getenv("SUDO_GID"); data/rr-5.4.0/src/RecordCommand.cc:764:27: [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. if (geteuid() != 0 || getenv("SUDO_UID") == NULL) { data/rr-5.4.0/src/RecordCommand.cc:778:18: [3] (random) random: 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. chars.resize(random() % page_size()); data/rr-5.4.0/src/RecordSession.cc:2082:21: [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. const char* env = getenv("PATH"); data/rr-5.4.0/src/Scheduler.cc:162:40: [3] (random) random: 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. pretend_num_cores_ = enable_chaos ? (random() % 8 + 1) : 1; data/rr-5.4.0/src/Scheduler.cc:185:45: [3] (random) random: 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. static double random_frac() { return double(random() % INT32_MAX) / INT32_MAX; } data/rr-5.4.0/src/Scheduler.cc:368:29: [3] (random) random: 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. (random() % min(max_ticks_, max_timeslice_duration)); data/rr-5.4.0/src/Scheduler.cc:394:23: [3] (random) random: 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. int duration_step = random() % high_priority_only_duration_steps; data/rr-5.4.0/src/Scheduler.cc:845:26: [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. static bool disabled = getenv("RR_DISABLE_ROUND_ROBIN") != nullptr; data/rr-5.4.0/src/Task.cc:3248:15: [3] (random) random: 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. int start = random() % 5; data/rr-5.4.0/src/TraceStream.cc:89:22: [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. const char* home = getenv("HOME"); data/rr-5.4.0/src/TraceStream.cc:94:31: [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. const char* xdg_data_home = getenv("XDG_DATA_HOME"); data/rr-5.4.0/src/TraceStream.cc:117:28: [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. const char* output_dir = getenv("_RR_TRACE_DIR"); data/rr-5.4.0/src/audit/rtld-audit.c:51:22: [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. rr_audit_debug = !!getenv("RR_AUDIT_DEBUG"); data/rr-5.4.0/src/ftrace.cc:29:21: [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. string s = string(getenv("HOME")) + "/.local/share/rr/ftrace"; data/rr-5.4.0/src/ftrace/ftrace_helper.c:440:62: [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. asprintf(&control_path, "%s/.local/share/rr/ftrace", getenv("HOME")); data/rr-5.4.0/src/log.cc:116:24: [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. const char* buffer = getenv("RR_LOG_BUFFER"); data/rr-5.4.0/src/log.cc:125:26: [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. const char* filename = getenv("RR_LOG_FILE"); data/rr-5.4.0/src/log.cc:128:16: [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. filename = getenv("RR_APPEND_LOG_FILE"); data/rr-5.4.0/src/log.cc:149:15: [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. char* env = getenv(log_env); data/rr-5.4.0/src/log.cc:400:8: [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. !getenv("RUNNING_UNDER_TEST_MONITOR")) { data/rr-5.4.0/src/main.cc:111:3: [3] (random) srandom: 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. srandom(key); data/rr-5.4.0/src/main.cc:112:3: [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(key); data/rr-5.4.0/src/preload/syscallbuf.c:593:20: [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. extern const char* getenv(const char*); data/rr-5.4.0/src/preload/syscallbuf.c:736:22: [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. buffer_enabled = !!getenv(SYSCALLBUF_ENABLED_ENV_VAR); data/rr-5.4.0/src/record_syscall.cc:2919:22: [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. static bool send = getenv("RR_INIT_BUFFERS_SEND_SIGNAL") != nullptr; data/rr-5.4.0/src/test/pivot_root.c:32:20: [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. test_assert(0 == chroot(".")); data/rr-5.4.0/src/test/quotactl.c:9:22: [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. const char* home = getenv("HOME"); data/rr-5.4.0/src/test/unshare.c:234:20: [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. test_assert(0 == chroot(tmp_name)); data/rr-5.4.0/src/util.cc:661:7: [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. if (getenv("RR_TRUST_TEMP_FILES")) { data/rr-5.4.0/src/util.cc:675:7: [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. if (getenv("RR_COPY_ALL_FILES")) { data/rr-5.4.0/src/util.cc:1181: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(path.c_str(), buf) == buf) { data/rr-5.4.0/src/util.cc:1437:28: [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. char* test_monitor_pid = getenv("RUNNING_UNDER_TEST_MONITOR"); data/rr-5.4.0/src/util.cc:1511:21: [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. const char* dir = getenv("RR_TMPDIR"); data/rr-5.4.0/src/util.cc:1516: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. dir = getenv("TMPDIR"); data/rr-5.4.0/src/util.cc:1588:12: [3] (random) random: 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. o[i] = random(); data/rr-5.4.0/src/util.cc:1741:27: [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. const char* lock_file = getenv("_RR_CPU_LOCK_FILE"); data/rr-5.4.0/src/util.cc:1814:74: [3] (random) random: 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. std::shuffle (cpus.begin(), cpus.end(), std::default_random_engine(random())); data/rr-5.4.0/src/util.cc:1839:15: [3] (random) random: 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. return cpus[random() % cpus.size()]; data/rr-5.4.0/src/AddressSpace.cc:94: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 maps_path[PATH_MAX]; data/rr-5.4.0/src/AddressSpace.cc:95: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(maps_path, "/proc/%d/maps", tid); data/rr-5.4.0/src/AddressSpace.cc:96:21: [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). if (!(maps_file = fopen(maps_path, "r"))) { data/rr-5.4.0/src/AddressSpace.cc:103: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 line[PATH_MAX * 2]; data/rr-5.4.0/src/AddressSpace.cc:112: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 flags[32]; data/rr-5.4.0/src/AddressSpace.cc:137: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 proc_exe[PATH_MAX]; data/rr-5.4.0/src/AddressSpace.cc:138: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 exe[PATH_MAX]; data/rr-5.4.0/src/AddressSpace.cc:488: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[PATH_MAX+1024]; data/rr-5.4.0/src/AddressSpace.cc:661: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(dest + (start - addr), data/rr-5.4.0/src/AddressSpace.cc:1026: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(it_and_is_new.first->second.overwritten_data, data/rr-5.4.0/src/AddressSpace.h:125: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 str[200]; data/rr-5.4.0/src/AddressSpace.h:126: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(str, "%8p-%8p %c%c%c%c %08" PRIx64 " %02x:%02x %-10ld ", data/rr-5.4.0/src/AutoRemoteSyscalls.cc:351: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 cmsgbuf[Arch::cmsg_space(sizeof(int))]; data/rr-5.4.0/src/CompressedReader.cc:114: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(data, &buffer[buffer_read_pos], amount); data/rr-5.4.0/src/CompressedWriter.cc:92: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(&buffer[buf_offset], data, amount); data/rr-5.4.0/src/DumpCommand.cc:173:19: [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). start = end = atoi(spec->c_str()); data/rr-5.4.0/src/ElfReader.cc:95: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(section_names.data(), section_names_ptr, section_names.size()); data/rr-5.4.0/src/ElfReader.cc:184: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.strtab.data(), strtab_ptr, result.strtab.size()); data/rr-5.4.0/src/ElfReader.cc:244: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.strtab.data(), strtab, result.strtab.size()); data/rr-5.4.0/src/ElfReader.cc:343: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 name[4] = { 0 }; data/rr-5.4.0/src/ElfReader.cc:365: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 byte[3] = { 0 }; data/rr-5.4.0/src/ElfReader.cc:474: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 buf[4096]; data/rr-5.4.0/src/ElfReader.cc:501: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[header_prefix_size]; data/rr-5.4.0/src/ElfReader.h:94: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(out, r, sizeof(*out)); data/rr-5.4.0/src/ExtraRegisters.cc:175:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, data_.data() + reg_data.offset, reg_data.size); data/rr-5.4.0/src/ExtraRegisters.cc:201:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, data_.data() + reg_data.offset, reg_data.size); data/rr-5.4.0/src/ExtraRegisters.cc:280: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 out[257]; data/rr-5.4.0/src/ExtraRegisters.cc:296:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[80]; data/rr-5.4.0/src/ExtraRegisters.cc:337: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(reinterpret_cast<uint8_t*>(result.st_space) + i * 10, data/rr-5.4.0/src/ExtraRegisters.cc:357: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(&result->st_space[i * 4], data/rr-5.4.0/src/ExtraRegisters.cc:374: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.data(), &v, sizeof(T)); data/rr-5.4.0/src/ExtraRegisters.cc:413: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.data(), src, sizeof(typename Arch::user_fpregs_struct)); data/rr-5.4.0/src/ExtraRegisters.cc:459: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_.data(), data, xsave_header_offset); data/rr-5.4.0/src/ExtraRegisters.cc:487: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(data_.data() + xsave_header_offset, &assume_features_used, data/rr-5.4.0/src/ExtraRegisters.cc:495: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_.data() + xsave_header_offset, &features, sizeof(features)); data/rr-5.4.0/src/ExtraRegisters.cc:496: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_.data() + xsave_header_offset + sizeof(features), data/rr-5.4.0/src/ExtraRegisters.cc:525: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(data_.data() + native_feature.offset, data + feature.offset, data/rr-5.4.0/src/ExtraRegisters.cc:573: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(data_.data(), data, sizeof(X64Arch::user_fpregs_struct)); data/rr-5.4.0/src/ExtraRegisters.cc:592: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_.data(), ®s, sizeof(regs)); data/rr-5.4.0/src/ExtraRegisters.cc:638: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(data_.data() + xinuse_offset, &xinuse, sizeof(xinuse)); data/rr-5.4.0/src/FdTable.cc:186: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 disabled[SYSCALLBUF_FDS_DISABLED_SIZE]; data/rr-5.4.0/src/FdTable.cc:221: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 path[PATH_MAX]; data/rr-5.4.0/src/FdTable.cc:222: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(path, "/proc/%d/fd/%d", t->tid, fd); data/rr-5.4.0/src/GdbConnection.cc:151: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[32]; data/rr-5.4.0/src/GdbConnection.cc:183: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*)buf.data(), pfx, pfx_num_chars); data/rr-5.4.0/src/GdbConnection.cc:221: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.data(), prefix, pfx_num_chars); data/rr-5.4.0/src/GdbConnection.cc:411:13: [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). FILE* f = fopen(path.c_str(), "r"); data/rr-5.4.0/src/GdbConnection.cc:555:7: [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(&buf[2 * i], "xx"); data/rr-5.4.0/src/GdbConnection.cc:1054:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3]; data/rr-5.4.0/src/GdbConnection.cc:1055: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(buf, "%02x", bytes[i]); data/rr-5.4.0/src/GdbConnection.cc:1350: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[64]; data/rr-5.4.0/src/GdbConnection.cc:1361: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[64]; data/rr-5.4.0/src/GdbConnection.cc:1465: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[PATH_MAX]; data/rr-5.4.0/src/GdbConnection.cc:1524: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[1024]; data/rr-5.4.0/src/GdbConnection.cc:1617:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/rr-5.4.0/src/GdbConnection.cc:1618: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(buf, "1,%llx", (long long)addr.as_int()); data/rr-5.4.0/src/GdbConnection.cc:1637: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 * GdbRegisterValue::MAX_SIZE + 1]; data/rr-5.4.0/src/GdbConnection.cc:1781:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/rr-5.4.0/src/GdbConnection.cc:1782: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(buf, "%llx", (long long)address.as_int()); data/rr-5.4.0/src/GdbConnection.cc:1807:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/rr-5.4.0/src/GdbConnection.cc:1808: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(buf, "F%x", fd); data/rr-5.4.0/src/GdbConnection.cc:1820:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/rr-5.4.0/src/GdbConnection.cc:1821: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(buf, "F%llx;", (long long)len); data/rr-5.4.0/src/GdbConnection.cc:1903: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[32]; data/rr-5.4.0/src/GdbConnection.cc:1904: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, "F-01,%x", gdb_err); data/rr-5.4.0/src/GdbServer.cc:703: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(si_bytes.data(), &stop_siginfo, data/rr-5.4.0/src/GdbServer.cc:869: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 watch[1024]; data/rr-5.4.0/src/GdbServer.cc:1073: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(si_bytes.data(), &stop_siginfo, data/rr-5.4.0/src/GdbServer.cc:1546: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 exe_image[PATH_MAX]; data/rr-5.4.0/src/GdbServer.cc:1547: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[16]; // INET_ADDRSTRLEN, omitted for header churn data/rr-5.4.0/src/GdbServer.cc:1804:17: [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_t pid = atoi(test_monitor_pid); data/rr-5.4.0/src/GdbServer.cc:1807:21: [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). FILE* gdb_cmd = fopen("gdb_cmd", "w"); data/rr-5.4.0/src/LsCommand.cc:211: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 outstr[200]; data/rr-5.4.0/src/LsCommand.cc:216:7: [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(outstr, "<error>"); data/rr-5.4.0/src/MagicSaveDataMonitor.cc:28: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 rec_dump[PATH_MAX]; data/rr-5.4.0/src/MagicSaveDataMonitor.cc:29: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 rep_dump[PATH_MAX]; data/rr-5.4.0/src/MonitoredSharedMemory.cc:45: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(shared.local_addr, real_mem, shared.map.size()); data/rr-5.4.0/src/MonitoredSharedMemory.cc:80: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(m.local_addr, real_mem, size); data/rr-5.4.0/src/Monkeypatcher.cc:1198: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 buf[100]; data/rr-5.4.0/src/Monkeypatcher.cc:1199:7: [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, "/proc/%d/map_files/%llx-%llx", t->tid, data/rr-5.4.0/src/Monkeypatcher.cc:1203: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 link[PATH_MAX]; data/rr-5.4.0/src/PackCommand.cc:131: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 buf[1024 * 1024]; data/rr-5.4.0/src/PackCommand.cc:245: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 new_name_buf[PATH_MAX]; data/rr-5.4.0/src/PackCommand.cc:251:14: [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). out_fd = open(new_name.c_str(), O_WRONLY | O_CREAT | O_EXCL, 0700); data/rr-5.4.0/src/PackCommand.cc:267:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024 * 1024]; data/rr-5.4.0/src/PackCommand.cc:301: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 new_name_buf[PATH_MAX]; data/rr-5.4.0/src/PackCommand.cc:486: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[PATH_MAX]; data/rr-5.4.0/src/PerfCounters.cc:278: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 config[100]; data/rr-5.4.0/src/PerfCounters.cc:279: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(config, "%llx", (long long)ticks_attr.config); data/rr-5.4.0/src/PerfCounters_aarch64.h:12:20: [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). FILE *midr_el1 = fopen(midr_path, "r"); data/rr-5.4.0/src/PerfCounters_x86.h:14: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 vendor[12]; data/rr-5.4.0/src/PerfCounters_x86.h:15: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(&vendor[0], &cpuid_vendor.ebx, 4); data/rr-5.4.0/src/PerfCounters_x86.h:16: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(&vendor[4], &cpuid_vendor.edx, 4); data/rr-5.4.0/src/PerfCounters_x86.h:17: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(&vendor[8], &cpuid_vendor.ecx, 4); data/rr-5.4.0/src/RecordCommand.cc:555:7: [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). open("/dev/null", O_RDONLY); data/rr-5.4.0/src/RecordSession.cc:2131: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 buf[100]; data/rr-5.4.0/src/RecordSession.cc:2135:19: [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). int val = atoi(buf); data/rr-5.4.0/src/RecordTask.cc:39: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(sa.data(), &ksa, sizeof(ksa)); data/rr-5.4.0/src/RecordTask.cc:337: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 proc_exe[PATH_MAX]; data/rr-5.4.0/src/RecordTask.cc:339: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 exe[PATH_MAX]; data/rr-5.4.0/src/RecordTask.cc:436:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX]; data/rr-5.4.0/src/RecordTask.cc:437: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(buf, "/proc/%d/fd/%d", for_tid, fd); data/rr-5.4.0/src/RecordTask.cc:1729:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf.data(), &hdr, sizeof(hdr)); data/rr-5.4.0/src/RecordTask.cc:1843: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 path[PATH_MAX]; data/rr-5.4.0/src/RecordTask.cc:1844: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(path, "/proc/%d/task/%d", tid, hint); data/rr-5.4.0/src/RecordTask.cc:1852: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(path, "/proc/%d/task", tid); data/rr-5.4.0/src/Registers.cc:210: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(&val, register_ptr, nbytes); data/rr-5.4.0/src/Registers.cc:321: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(&val1, rv.pointer_into(®1.u), rv.nbytes); data/rr-5.4.0/src/Registers.cc:322: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(&val2, rv.pointer_into(®2.u), rv.nbytes); data/rr-5.4.0/src/Registers.cc:433:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, rv.pointer_into(&u), rv.nbytes); data/rr-5.4.0/src/Registers.cc:478: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(rv.pointer_into(&u), value, value_size); data/rr-5.4.0/src/Registers.cc:494: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(rv.pointer_into(&u), &value, rv.nbytes); data/rr-5.4.0/src/Registers.cc:546: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(&u, &ptrace_regs, sizeof(ptrace_regs)); data/rr-5.4.0/src/Registers.cc:632: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.data(), tmp_data.data, tmp_data.size); data/rr-5.4.0/src/ReplaySession.cc:1162: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(&recorded_hdr, buf.data.data(), sizeof(struct syscallbuf_hdr)); data/rr-5.4.0/src/RerunCommand.cc:167: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. static const char gp_reg_names[16][4] = { "rax", "rcx", "rdx", "rbx", data/rr-5.4.0/src/RerunCommand.cc:171: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. static const char gp_reg_names_32[8][4] = { "eax", "ecx", "edx", "ebx", data/rr-5.4.0/src/RerunCommand.cc:174: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. static const char seg_reg_names[6][3] = { "es", "cs", "ss", "ds", "fs", "gs" }; data/rr-5.4.0/src/RerunCommand.cc:305:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/rr-5.4.0/src/RerunCommand.cc:306:9: [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, "xmm%d", field.reg_num); data/rr-5.4.0/src/RerunCommand.cc:339:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8]; data/rr-5.4.0/src/RerunCommand.cc:340:9: [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, "ymm%d", field.reg_num); data/rr-5.4.0/src/ScopedFd.h:22:12: [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(pathname, flags, mode)) {} data/rr-5.4.0/src/Session.cc:258: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[1024] = ""; data/rr-5.4.0/src/Session.cc:435: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 path[PATH_MAX]; data/rr-5.4.0/src/Session.cc:509: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[PATH_MAX]; data/rr-5.4.0/src/Session.cc:527: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(new_map.local_addr, preserved_data, size); data/rr-5.4.0/src/Session.cc:538: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[PATH_MAX - 40]; data/rr-5.4.0/src/SourcesCommand.cc:395:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[PATH_MAX + 1]; data/rr-5.4.0/src/StdioMonitor.cc:15:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/rr-5.4.0/src/Task.cc:307: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 path[PATH_MAX]; data/rr-5.4.0/src/Task.cc:313: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 path[PATH_MAX]; data/rr-5.4.0/src/Task.cc:319: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 path[PATH_MAX]; data/rr-5.4.0/src/Task.cc:328: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 path[PATH_MAX]; data/rr-5.4.0/src/Task.cc:337: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 path[PATH_MAX]; data/rr-5.4.0/src/Task.cc:343: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 path[PATH_MAX]; data/rr-5.4.0/src/Task.cc:344: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 procfd[40]; data/rr-5.4.0/src/Task.cc:1288: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(thread_locals, local_addr, PRELOAD_THREAD_LOCALS_SIZE); data/rr-5.4.0/src/Task.cc:1307: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(local_addr, thread_locals, PRELOAD_THREAD_LOCALS_SIZE); data/rr-5.4.0/src/Task.cc:1799: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[16]; data/rr-5.4.0/src/Task.cc:2461: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[1024]; data/rr-5.4.0/src/Task.cc:2462: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, "/proc/%d/fdinfo/%d", t->tid, fd); data/rr-5.4.0/src/Task.cc:2522: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(&state.thread_locals, fetch_preload_thread_locals(), data/rr-5.4.0/src/Task.cc:2541: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 prname[17]; data/rr-5.4.0/src/Task.cc:2574: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(&thread_locals, &state.thread_locals, PRELOAD_THREAD_LOCALS_SIZE); data/rr-5.4.0/src/Task.cc:2619: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 pid_path[PATH_MAX]; data/rr-5.4.0/src/Task.cc:2620: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(pid_path, "/proc/%d", tid); data/rr-5.4.0/src/Task.cc:2664: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[50]; data/rr-5.4.0/src/Task.cc:2665: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(name, "syscallbuf.%d", rec_tid); data/rr-5.4.0/src/Task.cc:2741: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(static_cast<uint8_t*>(buf) + nread, data/rr-5.4.0/src/Task.cc:2772: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(reinterpret_cast<uint8_t*>(&v) + (start - start_word), data/rr-5.4.0/src/Task.cc:2789:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, local_addr, buf_size); data/rr-5.4.0/src/Task.cc:2895: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(local_addr, buf, buf_size); data/rr-5.4.0/src/Task.cc:3141:12: [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). int fd = open("/dev/null", O_WRONLY | O_CLOEXEC); data/rr-5.4.0/src/ThreadDb.cc:69: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, static_cast<void*>(®s), sizeof(regs)); data/rr-5.4.0/src/TraceStream.cc:496:20: [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). auto o = open[i]; data/rr-5.4.0/src/TraceStream.cc:625: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(records.data(), mprotect_records.begin(), data/rr-5.4.0/src/TraceStream.cc:657:36: [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). syscall_ev.opened.resize(open.size()); data/rr-5.4.0/src/TraceStream.cc:658:34: [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). for (size_t i = 0; i < open.size(); ++i) { data/rr-5.4.0/src/TraceStream.cc:660:29: [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). const auto& o = open[i]; data/rr-5.4.0/src/TraceStream.cc:790: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 count_str[20]; data/rr-5.4.0/src/TraceStream.cc:791: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(count_str, "%d", mmap_count); data/rr-5.4.0/src/TraceStream.cc:810: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 count_str[20]; data/rr-5.4.0/src/TraceStream.cc:811: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(count_str, "%d", mmap_count); data/rr-5.4.0/src/TraceStream.cc:840: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 count_str[20]; data/rr-5.4.0/src/TraceStream.cc:841: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(count_str, "%d", mmap_count); data/rr-5.4.0/src/TraceStream.cc:1498: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(cpuid_records_.data(), cpuid_records_bytes.begin(), data/rr-5.4.0/src/audit/stap-note-iter.c:41:21: [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). if ((self->fd = open(path, O_RDONLY)) == -1) { data/rr-5.4.0/src/chaos-test/chaosutil.h: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 buf[1024]; data/rr-5.4.0/src/chaos-test/chaosutil.h:64: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[1024]; data/rr-5.4.0/src/chaos-test/core_count.c:9:15: [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). int cores = atoi(argv[1]); data/rr-5.4.0/src/chaos-test/getaffinity_core_count.c:9:15: [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). int cores = atoi(argv[1]); data/rr-5.4.0/src/chaos-test/mmap_adjacent.c:9:20: [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). int page_count = atoi(argv[1]); data/rr-5.4.0/src/chaos-test/mmap_bits.c:10:20: [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). int bits_match = atoi(argv[1]); data/rr-5.4.0/src/chaos-test/starvation_multithreaded.c:58:7: [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). S = atoi(argv[1]) / 1000000.0 + start; data/rr-5.4.0/src/chaos-test/starvation_multithreaded.c:59:7: [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). T = atoi(argv[2]) / 1000000.0 + start; data/rr-5.4.0/src/chaos-test/starvation_multithreaded.c:60:7: [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). D = atoi(argv[3]) / 1000000.0; data/rr-5.4.0/src/chaos-test/starvation_multithreaded.c:61:7: [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). L = atoi(argv[4]) / 1000000.0 + start; data/rr-5.4.0/src/chaos-test/starvation_singlethreaded.c:15:14: [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). double S = atoi(argv[1]) / 1000000.0 + start; data/rr-5.4.0/src/chaos-test/starvation_singlethreaded.c:16:14: [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). double T = atoi(argv[2]) / 1000000.0 + start; data/rr-5.4.0/src/chaos-test/starvation_singlethreaded.c:17:14: [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). double D = atoi(argv[3]) / 1000000.0; data/rr-5.4.0/src/chaos-test/starvation_singlethreaded.c:18:14: [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). double L = atoi(argv[4]) / 1000000.0 + start; data/rr-5.4.0/src/ftrace.cc: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 cmsgbuf[CMSG_SPACE(sizeof(int))]; data/rr-5.4.0/src/ftrace/ftrace_helper.c:124: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[64 * 1024]; data/rr-5.4.0/src/ftrace/ftrace_helper.c:136: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[1024]; data/rr-5.4.0/src/ftrace/ftrace_helper.c:137:12: [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). int fd = open(name, O_RDONLY); data/rr-5.4.0/src/ftrace/ftrace_helper.c:193:12: [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). out_fd = open("/tmp/ftrace_helper_out", O_RDWR | O_TRUNC | O_CREAT, 0644); data/rr-5.4.0/src/ftrace/ftrace_helper.c:238:14: [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). final_fd = open("/tmp/ftrace_helper_out", O_WRONLY | O_TRUNC | O_CREAT, 0644); data/rr-5.4.0/src/ftrace/ftrace_helper.c:274: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 control_buf[1024]; data/rr-5.4.0/src/ftrace/ftrace_helper.c:302:12: [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). int fd = open(file, O_WRONLY | O_TRUNC); data/rr-5.4.0/src/ftrace/ftrace_helper.c:330:31: [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 read_control_line(char out[MAX_LINE_SIZE]) { data/rr-5.4.0/src/ftrace/ftrace_helper.c:363: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 cmsgbuf[CMSG_SPACE(sizeof(int))]; data/rr-5.4.0/src/ftrace/ftrace_helper.c:367:25: [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). int trace_marker_fd = open("trace_marker", O_WRONLY); data/rr-5.4.0/src/ftrace/ftrace_helper.c:382: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(CMSG_DATA(cmsg), &trace_marker_fd, sizeof(int)); data/rr-5.4.0/src/ftrace/ftrace_helper.c:389: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[MAX_LINE_SIZE]; data/rr-5.4.0/src/ftrace/ftrace_helper.c:390: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 path[PATH_MAX]; data/rr-5.4.0/src/ftrace/ftrace_helper.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_out[65536]; data/rr-5.4.0/src/ftrace/ftrace_helper.c:397: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). cpu = atoi(buf); data/rr-5.4.0/src/ftrace/ftrace_helper.c:411: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). ftrace_pid_fd = open("set_ftrace_pid", O_WRONLY); data/rr-5.4.0/src/ftrace/ftrace_helper.c:421: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(path, "per_cpu/cpu%d/trace_pipe_raw", cpu); data/rr-5.4.0/src/ftrace/ftrace_helper.c:422: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). trace_pipe_fd = open(path, O_RDONLY); data/rr-5.4.0/src/kernel_abi.h:443: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 sa_data[14]; data/rr-5.4.0/src/kernel_abi.h:449: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 sun_path[108]; data/rr-5.4.0/src/kernel_abi.h:481: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 _padding[sizeof(ptr<void>) - sizeof(socklen_t)]; data/rr-5.4.0/src/kernel_abi.h:608: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 _padding[3]; data/rr-5.4.0/src/kernel_abi.h:620: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 c_cc[8]; data/rr-5.4.0/src/kernel_abi.h:641: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 __pad3[sizeof(__kernel_ulong_t) - 2 * sizeof(unsigned_short)]; data/rr-5.4.0/src/kernel_abi.h:710: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 __pad[sizeof(__kernel_ulong_t) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:832: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 ifrn_name[16]; data/rr-5.4.0/src/kernel_abi.h:844: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 ifru_slave[16]; data/rr-5.4.0/src/kernel_abi.h:845: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 ifru_newname[16]; data/rr-5.4.0/src/kernel_abi.h:854: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:894: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 name[16]; data/rr-5.4.0/src/kernel_abi.h:917: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 ifrn_name[16]; data/rr-5.4.0/src/kernel_abi.h:926: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 __pad[sizeof(off_t) - 2 * sizeof(short)]; data/rr-5.4.0/src/kernel_abi.h:937: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 __pad[sizeof(uint32_t) - 2 * sizeof(short)]; data/rr-5.4.0/src/kernel_abi.h:955: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:962: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:970: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:979: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1000: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1017: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1024: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1033: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1040: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1050: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1069: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 __pad[sizeof(off_t) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1093: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1112: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 __pad[sizeof(ptr<void>) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1221: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 __pad[sizeof(size_t) - sizeof(int)]; data/rr-5.4.0/src/kernel_abi.h:1237: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 __pad[sizeof(__kernel_ulong_t) - 2 * sizeof(uint16_t)]; data/rr-5.4.0/src/kernel_abi.h:1241: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 _f[20 - 2 * sizeof(__kernel_ulong_t) - sizeof(uint32_t)]; data/rr-5.4.0/src/kernel_abi.h:1247: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 sysname[UTSNAME_LENGTH]; data/rr-5.4.0/src/kernel_abi.h:1248: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 nodename[UTSNAME_LENGTH]; data/rr-5.4.0/src/kernel_abi.h:1249: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 release[UTSNAME_LENGTH]; data/rr-5.4.0/src/kernel_abi.h:1250: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 version[UTSNAME_LENGTH]; data/rr-5.4.0/src/kernel_abi.h:1251: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 machine[UTSNAME_LENGTH]; data/rr-5.4.0/src/kernel_abi.h:1252: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 domainname[UTSNAME_LENGTH]; data/rr-5.4.0/src/kernel_abi.h:1289: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 __pad[sizeof(__kernel_ulong_t) - sizeof(uint32_t)]; data/rr-5.4.0/src/kernel_abi.h:1316: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 _padding[sizeof(ptr<void>) - sizeof(uint16_t)]; data/rr-5.4.0/src/kernel_abi.h:1336: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 id[16]; data/rr-5.4.0/src/kernel_abi.h:1337: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 driver[16]; data/rr-5.4.0/src/kernel_abi.h:1338: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 name[32]; data/rr-5.4.0/src/kernel_abi.h:1339: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 longname[80]; data/rr-5.4.0/src/kernel_abi.h:1340: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 reserved_[16]; data/rr-5.4.0/src/kernel_abi.h:1341: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 mixername[80]; data/rr-5.4.0/src/kernel_abi.h:1342: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 components[128]; data/rr-5.4.0/src/kernel_abi.h:1476: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 name[8]; data/rr-5.4.0/src/kernel_abi.h:1610: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 map_name[16]; data/rr-5.4.0/src/kernel_abi.h:1635: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 prog_name[16]; data/rr-5.4.0/src/kernel_abi.h:1808: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 u_comm[32]; data/rr-5.4.0/src/kernel_abi.h:1981: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 u_comm[32]; data/rr-5.4.0/src/kernel_metadata.cc:35:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/rr-5.4.0/src/kernel_metadata.cc:62: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 buf[100]; data/rr-5.4.0/src/kernel_metadata.cc:108: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 buf[100]; data/rr-5.4.0/src/kernel_metadata.cc:122:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/rr-5.4.0/src/kernel_metadata.cc:166: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 buf[100]; data/rr-5.4.0/src/kernel_metadata.cc:314: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 buf[100]; data/rr-5.4.0/src/kernel_metadata.cc:403: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[100]; data/rr-5.4.0/src/kernel_supplement.h:148: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 driver[USBDEVFS_MAXDRIVERNAME + 1]; data/rr-5.4.0/src/kernel_supplement.h:157: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 eps[0]; data/rr-5.4.0/src/log.cc:118: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). log_buffer_size = atoi(buffer); data/rr-5.4.0/src/log.cc:374: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[100]; data/rr-5.4.0/src/log.cc:375: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, "%lld-%lld", (long long)(end - LAST_EVENT_COUNT), (long long)(end + 1)); data/rr-5.4.0/src/preload/preload_interface.h:324: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. VOLATILE char syscallbuf_fd_class[SYSCALLBUF_FDS_DISABLED_SIZE]; data/rr-5.4.0/src/preload/syscallbuf.c:108:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #ifdef memcpy data/rr-5.4.0/src/preload/syscallbuf.c:109:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #undef memcpy data/rr-5.4.0/src/preload/syscallbuf.c:111: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. #define memcpy you_must_use_local_memcpy data/rr-5.4.0/src/preload/syscallbuf.c:1948: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[100]; data/rr-5.4.0/src/preload/syscallbuf.c:1949: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, "/proc/self/fd/%d", ret); data/rr-5.4.0/src/preload/syscallbuf.c:1950: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 link[PATH_MAX]; data/rr-5.4.0/src/preload/syscallbuf.c:3211:10: [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). CASE(open); data/rr-5.4.0/src/record_signal.cc:76: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(bytes.data(), &mask, sizeof(mask)); data/rr-5.4.0/src/record_syscall.cc:2189: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 path1[PATH_MAX]; data/rr-5.4.0/src/record_syscall.cc:2190: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 path2[PATH_MAX]; data/rr-5.4.0/src/record_syscall.cc:3240: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(save, &sig_set, sizeof(sig_set)); data/rr-5.4.0/src/record_syscall.cc:3266: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(save, &sa, sizeof(sa)); data/rr-5.4.0/src/record_syscall.cc:3453:16: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. case Arch::vfork: data/rr-5.4.0/src/record_syscall.cc:3707: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). case Arch::open: data/rr-5.4.0/src/record_syscall.cc:3726:11: [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 tmp[1024]; data/rr-5.4.0/src/record_syscall.cc:4957: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 proc_ns_mount[PATH_MAX]; data/rr-5.4.0/src/record_syscall.cc:5006: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(u.buf, buf, wsize); data/rr-5.4.0/src/record_syscall.cc:5030: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 proc_root[32]; data/rr-5.4.0/src/record_syscall.cc:5035: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 root[PATH_MAX]; data/rr-5.4.0/src/record_syscall.cc:5238:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[100]; data/rr-5.4.0/src/record_syscall.cc:5239: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(buf, "/proc/%d/fd", rt->tid); data/rr-5.4.0/src/record_syscall.cc:5577: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[PATH_MAX]; data/rr-5.4.0/src/record_syscall.cc:5602:10: [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/tty", O_WRONLY); data/rr-5.4.0/src/record_syscall.cc:5725: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 fname[255]; data/rr-5.4.0/src/record_syscall.cc:5801:16: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. case Arch::vfork: data/rr-5.4.0/src/record_syscall.cc:5947: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). case Arch::open: data/rr-5.4.0/src/replay_syscall.cc:140:16: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. case Arch::vfork: data/rr-5.4.0/src/replay_syscall.cc:917:16: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. case Arch::vfork: data/rr-5.4.0/src/replay_syscall.cc:1239: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). case Arch::open: data/rr-5.4.0/src/test-monitor/test-monitor.cc:65:17: [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_t pid = atoi(f->d_name); data/rr-5.4.0/src/test-monitor/test-monitor.cc:67: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 path[PATH_MAX]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:68:7: [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(path, "/proc/%d/status", pid); data/rr-5.4.0/src/test-monitor/test-monitor.cc:69:22: [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). FILE* status = fopen(path, "r"); data/rr-5.4.0/src/test-monitor/test-monitor.cc:72:11: [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[1024 * 10]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:88:26: [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_t ppid = atoi(buf + 5); data/rr-5.4.0/src/test-monitor/test-monitor.cc:94:32: [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_t tracer_pid = atoi(buf + 10); data/rr-5.4.0/src/test-monitor/test-monitor.cc:109: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 path[PATH_MAX]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:112:13: [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). FILE* f = fopen(path, "r"); data/rr-5.4.0/src/test-monitor/test-monitor.cc:117: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 line[1024 * 10]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:131: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 line[1024 * 10]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:139: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 cmdline[1024 * 10]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:140: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(cmdline, "gdb -p %d -ex 'set confirm off' -ex 'set height 0' -ex " data/rr-5.4.0/src/test-monitor/test-monitor.cc:147: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 cmdline[1024 * 10]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:148: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(cmdline, "gdb -p %d -ex 'set confirm off' -ex 'set height 0' -ex " data/rr-5.4.0/src/test-monitor/test-monitor.cc:155: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 cmdline[1024 * 10]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:177: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 path[PATH_MAX]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:178: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(path, "/proc/%d/task", pid); data/rr-5.4.0/src/test-monitor/test-monitor.cc:186:19: [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_t tid = atoi(t->d_name); data/rr-5.4.0/src/test-monitor/test-monitor.cc:230:15: [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). FILE* out = fopen(out_file_name, "a"); data/rr-5.4.0/src/test-monitor/test-monitor.cc:273:23: [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). FILE* gdb_cmd = fopen("gdb_cmd", "r"); data/rr-5.4.0/src/test-monitor/test-monitor.cc:275:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024 * 10]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:322:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/rr-5.4.0/src/test-monitor/test-monitor.cc:323: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(buf, "%d", getppid()); data/rr-5.4.0/src/test/_llseek.c:6:12: [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). int fd = open(argv[0], O_RDONLY); data/rr-5.4.0/src/test/alsa_ioctl.c:10:12: [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). int fd = open(ALSA_DEVICE_DIRECTORY "control0", O_NONBLOCK | O_RDONLY); data/rr-5.4.0/src/test/async_signal_syscalls.c:32:13: [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). num_its = atoi(argv[1]); data/rr-5.4.0/src/test/async_signal_syscalls2.c:44:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[3]; data/rr-5.4.0/src/test/async_signal_syscalls2.c:71: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[10]; data/rr-5.4.0/src/test/async_signal_syscalls2.c:75: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/zero", O_RDONLY); data/rr-5.4.0/src/test/async_signal_syscalls_siginfo.c:43:13: [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). num_its = atoi(argv[1]); data/rr-5.4.0/src/test/barrier.c:21: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_buf[16]; data/rr-5.4.0/src/test/big_buffers.c:24: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(DUMMY_FILE, O_RDONLY); data/rr-5.4.0/src/test/blacklist.c:10: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[PATH_MAX]; data/rr-5.4.0/src/test/blacklist.c:12:3: [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). open(file_name, O_CREAT | O_WRONLY, 0700); data/rr-5.4.0/src/test/block.c:462: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(CMSG_DATA(cmptr), &fd, sizeof(fd)); // send stderr as fd data/rr-5.4.0/src/test/block_clone_checkpoint.c:11:12: [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). int fd = open("tmp.txt", O_RDWR | O_CREAT | O_EXCL, 0600); data/rr-5.4.0/src/test/block_clone_checkpoint.c:12: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[BUF_SIZE]; data/rr-5.4.0/src/test/block_clone_interrupted.c:11:12: [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). int fd = open("tmp.txt", O_RDWR | O_CREAT | O_EXCL, 0600); data/rr-5.4.0/src/test/block_clone_syscallbuf_overflow.c:11:12: [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). int fd = open("tmp.txt", O_RDWR | O_CREAT | O_EXCL, 0600); data/rr-5.4.0/src/test/block_open.c:5:41: [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). static int try_open(int flags) { return open("fifo", flags); } data/rr-5.4.0/src/test/breakpoint_overlap.c:43: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). int a = atoi(argv[1]); data/rr-5.4.0/src/test/breakpoint_overlap.c:44: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). int b = atoi(argv[2]); data/rr-5.4.0/src/test/check_lost_interrupts.c:19:14: [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). int fd = open("/dev/null", O_RDONLY); data/rr-5.4.0/src/test/check_session_leaks.c:19:12: [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). int fd = open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/check_session_leaks.c:20: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[1000000]; data/rr-5.4.0/src/test/checkpoint_mixed_mode.c:7:12: [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). int fd = mkstemp(filename); data/rr-5.4.0/src/test/checksum_sanity.c:32:12: [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). int fd = open(name, O_CREAT | O_RDWR | O_EXCL, 0600); data/rr-5.4.0/src/test/checksum_sanity.c:46: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(name2, O_CREAT | O_RDWR | O_EXCL, 0600); data/rr-5.4.0/src/test/checksum_sanity.c:58: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(name3, O_CREAT | O_RDWR | O_EXCL, 0600); data/rr-5.4.0/src/test/checksum_sanity.c:60:13: [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). int fd2 = open(name4, O_CREAT | O_RDWR | O_EXCL, 0600); data/rr-5.4.0/src/test/checksum_sanity.c:77: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("/bin/ls", O_RDONLY); data/rr-5.4.0/src/test/chmod.c:7:12: [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). int fd = open(file_path, O_WRONLY | O_CREAT, 0); data/rr-5.4.0/src/test/clone.c:30: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/zero", O_RDONLY); data/rr-5.4.0/src/test/clone_file_range.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 buf[BUF_SIZE]; data/rr-5.4.0/src/test/clone_file_range.c:28:12: [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). int fd = open(file_name, O_RDWR | O_CREAT | O_EXCL, 0600); data/rr-5.4.0/src/test/clone_file_range.c:37:9: [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). fd2 = open(file_name2, O_RDWR | O_CREAT | O_EXCL, 0600); data/rr-5.4.0/src/test/clone_newflags.c:7:12: [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). int fd = open(path, O_TRUNC | O_RDWR, 0600); data/rr-5.4.0/src/test/clone_newflags.c:21:12: [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). int fd = open(name, O_CREAT | O_RDWR | O_EXCL, 0600); data/rr-5.4.0/src/test/clone_parent.c:8:17: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. pid_t child = vfork(); data/rr-5.4.0/src/test/clone_vfork.c:19: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 child_stack[16384]; data/rr-5.4.0/src/test/clone_vfork_pidfd.c:13: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 child_stack[16384]; data/rr-5.4.0/src/test/copy_file_range.c:17:15: [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). int in_fd = open("dummy.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/copy_file_range.c:18: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). int out_fd = open("dummy2.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/creat_address_not_truncated.c:19: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(map, dummy_filename, sizeof(dummy_filename)); data/rr-5.4.0/src/test/cwd_inaccessible.c:34:13: [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). ret = open(".", O_PATH); data/rr-5.4.0/src/test/daemon_read.c:8: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[100]; data/rr-5.4.0/src/test/daemon_read.c:9:12: [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). int fd = open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/dconf_mock.c:13: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("dconf/user", O_CREAT | O_RDWR, 0600); data/rr-5.4.0/src/test/dev_tty.c:6:12: [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). int fd = open("/dev/tty", O_RDWR); data/rr-5.4.0/src/test/direct.c:8:12: [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). int fd = open("test.out", O_RDWR | O_DIRECT | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/diversion_syscall.c:17:12: [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). int fd = open("/dev/null", O_WRONLY | O_CLOEXEC); data/rr-5.4.0/src/test/early_error.c:62: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[4096]; data/rr-5.4.0/src/test/exec_many.c:8:29: [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). count = argc == 1 ? 100 : atoi(argv[1]); data/rr-5.4.0/src/test/exec_many.c:11:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1000]; data/rr-5.4.0/src/test/exec_many.c:12: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(buf, "%d", count - 1); data/rr-5.4.0/src/test/execve_loop.c:10:15: [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). int count = atoi(argv[1]); data/rr-5.4.0/src/test/execve_loop.c:13:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/rr-5.4.0/src/test/execve_loop.c:14: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(buf, "%d", count - 1); data/rr-5.4.0/src/test/exit_codes.c:8: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). cmd = atoi(argv[1]); data/rr-5.4.0/src/test/fanotify.c:25:13: [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). file_fd = open("foo", O_WRONLY | O_CREAT, 0777); data/rr-5.4.0/src/test/fanotify.c:31:13: [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). file_fd = open("foo", O_WRONLY | O_CREAT, 0777); data/rr-5.4.0/src/test/fcntl_rw_hints.c:40:12: [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). int fd = open("tempfile", O_RDWR | O_CREAT, 0700); data/rr-5.4.0/src/test/flock.c:16: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(FILENAME, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/flock2.c:12: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(FILENAME, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/flock_ofd.c:24: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(FILENAME, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/flock_ofd.c:25:9: [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). fd2 = open(FILENAME, O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/gcrypt_rdrand.c:6:16: [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). FILE* file = fopen("/etc/gcrypt/hwf.deny", "r"); data/rr-5.4.0/src/test/getrandom.c:11: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/rr-5.4.0/src/test/goto_event.c:47:18: [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). num_syscalls = atoi(argv[1]); data/rr-5.4.0/src/test/inotify.c:15:13: [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). file_fd = open("foo", O_WRONLY | O_CREAT, 0777); data/rr-5.4.0/src/test/inotify.c:27:20: [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). test_assert(0 <= open("foo", O_WRONLY | O_CREAT, 0777)); data/rr-5.4.0/src/test/io.c:6: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[32]; data/rr-5.4.0/src/test/ioctl_fs.c:6:12: [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). int fd = open("dummy.txt", O_RDWR | O_CREAT, 0600); data/rr-5.4.0/src/test/ioctl_pty.c:6:12: [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). int fd = open("/dev/ptmx", O_RDWR); data/rr-5.4.0/src/test/ioctl_sg.c:6:12: [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). int fd = open("/dev/sr0", O_NONBLOCK | O_RDONLY); data/rr-5.4.0/src/test/ioctl_sg.c:22:16: [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 inqCmdBlk[INQ_CMD_LEN] = {INQ_CMD_CODE, 0, 0, 0, INQ_REPLY_LEN, 0}; data/rr-5.4.0/src/test/ioctl_sg.c:23:16: [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 inqBuff[INQ_REPLY_LEN]; data/rr-5.4.0/src/test/ioctl_sg.c:24:16: [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 sense_buffer[32]; data/rr-5.4.0/src/test/ioctl_tty.c:20: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/tty", O_RDWR); data/rr-5.4.0/src/test/jit_proc_mem.c:51:15: [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). int memfd = open("/proc/self/mem", O_RDWR); data/rr-5.4.0/src/test/joystick.c:7:14: [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). int fd = open("/dev/input/js0", O_RDONLY); data/rr-5.4.0/src/test/keyctl.c:16: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[192]; data/rr-5.4.0/src/test/link.c:8:12: [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). int fd = open(token_file, O_RDWR | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/map_shared_syscall.c:39:12: [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). int fd = open("/proc/self/exe", O_RDONLY); data/rr-5.4.0/src/test/map_shared_syscall.c:51:15: [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). maps_file = fopen("/proc/self/maps", "r"); data/rr-5.4.0/src/test/mmap_adjacent_to_rr_usage.c:23:21: [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). FILE* maps_file = fopen("/proc/self/maps", "r"); data/rr-5.4.0/src/test/mmap_fd_reuse_checkpoint.c:19: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(kFileName, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_fd_reuse_checkpoint.c:31: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(kFileName, O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_private.c:12:12: [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). int fd = open(argv[0], O_RDONLY); data/rr-5.4.0/src/test/mmap_private_grow_under_map.c:7:12: [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). int fd = open("file", O_RDWR | O_CREAT | O_TRUNC, 0700); data/rr-5.4.0/src/test/mmap_replace_most_mappings.c:88:21: [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). FILE* maps_file = fopen("/proc/self/maps", "r"); data/rr-5.4.0/src/test/mmap_ro.c:9:12: [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). int fd = open(DUMMY_FILE, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_self_maps_shared.c:10:12: [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). int fd = open(name, O_RDONLY); data/rr-5.4.0/src/test/mmap_self_maps_shared.c:18:21: [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). FILE* maps_file = fopen("/proc/self/maps", "r"); data/rr-5.4.0/src/test/mmap_shared.c:7:12: [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). int fd = mkstemp(filename); data/rr-5.4.0/src/test/mmap_shared_dev_zero.c:11:12: [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). int fd = open("/dev/zero", O_RDWR); data/rr-5.4.0/src/test/mmap_shared_grow.c:7:12: [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). int fd = mkstemp(filename); data/rr-5.4.0/src/test/mmap_shared_grow_under_map.c:7:12: [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). int fd = open("file", O_RDWR | O_CREAT | O_TRUNC, 0700); data/rr-5.4.0/src/test/mmap_shared_subpage.c:7:12: [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). int fd = mkstemp(filename); data/rr-5.4.0/src/test/mmap_shared_write.c:15:12: [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). int fd = open("temp", O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_shared_write_exec_race.c:19:12: [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). int fd = open("temp", O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_shared_write_fork.c:15:12: [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). int fd = open("temp", O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_short_file.c:15:12: [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). int fd = open(DUMMY_FILE, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_tmpfs.c:9:12: [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). int fd = open(TEST_FILENAME, O_CREAT | O_EXCL | O_RDWR, 0700); data/rr-5.4.0/src/test/mmap_tmpfs.c:15: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(TEST_FILENAME, O_RDONLY); data/rr-5.4.0/src/test/mmap_write.c:10:12: [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). int fd = open(path, O_TRUNC | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_write.c:22:12: [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). int fd = open(DUMMY_FILE, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mmap_write_complex.c:6:12: [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). int fd = open("output", O_RDWR | O_CREAT, 0777); data/rr-5.4.0/src/test/mmap_write_complex.c:9:13: [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). int fd3 = open("output", O_RDWR, 0777); data/rr-5.4.0/src/test/mmap_write_complex.c:11:13: [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). int fd5 = open("output", O_RDONLY, 0777); data/rr-5.4.0/src/test/mmap_write_complex.c:30:9: [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). fd4 = open("output", O_RDWR, 0777); data/rr-5.4.0/src/test/mmap_write_private.c:6:12: [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). int fd = open("output", O_RDWR | O_CREAT, 0777); data/rr-5.4.0/src/test/mmap_write_private.c:18:9: [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). fd2 = open("output", O_RDWR, 0777); data/rr-5.4.0/src/test/mmap_write_private.c:26:9: [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). fd3 = open("output", O_RDWR, 0777); data/rr-5.4.0/src/test/mmap_zero_size_fd.c:8:12: [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). int fd = open(name, O_CREAT | O_RDWR | O_EXCL, 0600); data/rr-5.4.0/src/test/mount_ns_exec.c:19: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). int src_fd = open("/proc/self/exe", O_RDONLY); data/rr-5.4.0/src/test/mount_ns_exec.c:21: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). int dst_fd = open("mountpoint/the_copy", O_WRONLY | O_CREAT, 0700); data/rr-5.4.0/src/test/mount_ns_exec2.c:9:18: [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). int selffd = open("/proc/self/exe", O_RDONLY); data/rr-5.4.0/src/test/mount_ns_exec2.c:23: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 exe_buf[PATH_MAX+1]; data/rr-5.4.0/src/test/mount_ns_exec2.c:34:23: [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). int mountpoint_fd = open("mountpoint", O_PATH); data/rr-5.4.0/src/test/mount_ns_exec2.c:42: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). int src_fd = open("/proc/self/exe", O_RDONLY); data/rr-5.4.0/src/test/mount_ns_exec2.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 exe_path[PATH_MAX]; data/rr-5.4.0/src/test/mprotect_heterogenous.c:9:12: [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). int fd = open(TEST_FILE, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mq.c:12: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] = { 0 }; /* 'C' fills in the rest of the array with 0s. */ data/rr-5.4.0/src/test/mq.c:20: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 mq_name[100]; data/rr-5.4.0/src/test/mremap.c:19:12: [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). int fd = open(path, O_TRUNC | O_RDWR, 0600); data/rr-5.4.0/src/test/mremap.c:32:12: [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). int fd = open(file_name, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mremap_after_coalesce.c:12: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("/bin/ls", O_RDONLY); data/rr-5.4.0/src/test/mremap_after_coalesce.c:30: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("/bin/ls", O_RDONLY); data/rr-5.4.0/src/test/mremap_after_coalesce.c:42: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("/bin/ls", O_RDONLY); data/rr-5.4.0/src/test/mremap_grow.c:6:12: [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). int fd = open("temp", O_RDWR | O_CREAT, 0700); data/rr-5.4.0/src/test/mremap_grow.c:8: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[page_size * 2]; data/rr-5.4.0/src/test/mremap_grow_shared.c:6:12: [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). int fd = open(argv[0], O_RDONLY); data/rr-5.4.0/src/test/mremap_grow_shared.c:8: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[page_size * 2]; data/rr-5.4.0/src/test/mremap_non_page_size.c:19:12: [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). int fd = open(path, O_TRUNC | O_RDWR, 0600); data/rr-5.4.0/src/test/mremap_non_page_size.c:30:12: [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). int fd = open(file_name, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/mremap_overwrite.c:7:12: [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). int fd = open("file", O_RDWR | O_CREAT | O_TRUNC, 0700); data/rr-5.4.0/src/test/mremap_private_grow_under_map.c:7:12: [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). int fd = open("file", O_RDWR | O_CREAT | O_TRUNC, 0700); data/rr-5.4.0/src/test/msg_trunc.c:7: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 out[10]; data/rr-5.4.0/src/test/msync.c:9:12: [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). int fd = open(FILENAME, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/munmap_discontinuous.c:9:12: [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). int fd = open(TEST_FILE, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/netfilter.c:22:3: [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(info.name, "nat"); data/rr-5.4.0/src/test/netfilter.c:37:3: [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(entries->name, "nat"); data/rr-5.4.0/src/test/netfilter.c:48: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(target.u.user.name, target_name, strlen(target_name) - 1); data/rr-5.4.0/src/test/netfilter.c:64:3: [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(repl.name, "nat"); data/rr-5.4.0/src/test/netfilter.c:76: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(final, &repl, sizeof(struct ipt_replace)); data/rr-5.4.0/src/test/netfilter.c:83: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(dest_ptr, &entry, sizeof(struct ipt_entry)); data/rr-5.4.0/src/test/netfilter.c:85: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(dest_ptr, &target, sizeof(struct xt_entry_target)); data/rr-5.4.0/src/test/netfilter.c:92: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(dest_ptr, src_ptr, cur_entry->next_offset); data/rr-5.4.0/src/test/nscd.c:11:3: [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(addr.sun_path, "/var/run/nscd/socket"); data/rr-5.4.0/src/test/nsutils.h:18: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 path[100]; data/rr-5.4.0/src/test/nsutils.h:21:12: [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). int fd = open(path, mode); data/rr-5.4.0/src/test/nsutils.h:61: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 uidmap[100]; data/rr-5.4.0/src/test/nsutils.h:75: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 gidmap[100]; data/rr-5.4.0/src/test/packet_mmap_disable.c:8: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[1024]; data/rr-5.4.0/src/test/patch_page_end.c:58: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(d, code, sizeof(code)); data/rr-5.4.0/src/test/pivot_root.c:22:12: [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). int fd = open("old_root/old_root.txt", O_WRONLY | O_CREAT, 0600); data/rr-5.4.0/src/test/pivot_root.c:26: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("old_root/new_root/new_root.txt", O_WRONLY | O_CREAT, 0600); data/rr-5.4.0/src/test/prctl.c:6: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 setname[16] = "prctl-test"; data/rr-5.4.0/src/test/prctl.c:7: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 getname[16]; data/rr-5.4.0/src/test/prctl_name.c:16: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 prname[PRNAME_NUM_BYTES] = ""; data/rr-5.4.0/src/test/prctl_name.c:53:1: [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 initial_name[PRNAME_NUM_BYTES] = ""; data/rr-5.4.0/src/test/prctl_short_name.c:12: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 prname[PRNAME_NUM_BYTES] = ""; data/rr-5.4.0/src/test/prctl_short_name.c:16:3: [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(p + page_size - 5, "name"); data/rr-5.4.0/src/test/privileged_net_ioctl.c:12: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(*cur_buf_pos, data, size); data/rr-5.4.0/src/test/privileged_net_ioctl.c:115: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(&req.ifr_name, iface0_name, strlen(iface0_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:126:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[IFNAMSIZ]; data/rr-5.4.0/src/test/privileged_net_ioctl.c:135: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(&req.ifr_name, iface0_name, strlen(iface0_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:139: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(&req.ifr_name, bridge_name, strlen(bridge_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:149: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(&req.ifr_name, iface1_name, strlen(iface1_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:151: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(&((struct sockaddr_in*)&req.ifr_addr)->sin_addr, &host, data/rr-5.4.0/src/test/privileged_net_ioctl.c:154: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(&((struct sockaddr_in*)&req.ifr_netmask)->sin_addr, &netmask, data/rr-5.4.0/src/test/privileged_net_ioctl.c:171: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(&((struct sockaddr_in*)&rm.rt_gateway)->sin_addr, &gateway, data/rr-5.4.0/src/test/privileged_net_ioctl.c:182: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(&req.ifr_name, iface0_name, strlen(iface0_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:186: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(&req.ifr_name, bridge_name, strlen(bridge_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:192:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[IFNAMSIZ]; data/rr-5.4.0/src/test/proc_fds.c:24:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). fd = atoi(ent->d_name); data/rr-5.4.0/src/test/proc_fds.c:62: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/rr-5.4.0/src/test/proc_mem.c:12: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[1024]; data/rr-5.4.0/src/test/proc_mem.c:14: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). int dir_fd = open("/proc", O_PATH); data/rr-5.4.0/src/test/proc_mem.c:16: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, "%d/mem", child); data/rr-5.4.0/src/test/proc_mem.c:23: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[1024]; data/rr-5.4.0/src/test/proc_mem.c:24: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, "/proc/%d/mem", child); data/rr-5.4.0/src/test/proc_mem.c:25:10: [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). return open(buf, O_RDWR); data/rr-5.4.0/src/test/proc_mem.c:52: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(CMSG_DATA(cmsg), &fd, sizeof(fd)); data/rr-5.4.0/src/test/prw.c:6:12: [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). int fd = open("prw.txt", O_CREAT | O_RDWR, 0600); data/rr-5.4.0/src/test/prw.c:8: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[sizeof(content)]; data/rr-5.4.0/src/test/ptrace_breakpoint.c:24: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[1024]; data/rr-5.4.0/src/test/ptrace_breakpoint.c:25: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 saved_bytes[sizeof(breakpoint_instruction)]; data/rr-5.4.0/src/test/ptrace_breakpoint.c:37: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, "/proc/%d/mem", child); data/rr-5.4.0/src/test/ptrace_breakpoint.c:38:12: [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). mem_fd = open(buf, O_RDWR); data/rr-5.4.0/src/test/ptrace_exec.c:25: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[4096]; data/rr-5.4.0/src/test/ptrace_exec.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, "/proc/%d/cmdline", pid); data/rr-5.4.0/src/test/ptrace_exec.c:31: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(buf, O_RDONLY); data/rr-5.4.0/src/test/ptrace_remote_unmap.c:98:1: [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 exe_path[200]; data/rr-5.4.0/src/test/ptrace_remote_unmap.c:157:20: [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). FILE* own_maps = fopen("/proc/self/maps", "r"); data/rr-5.4.0/src/test/ptrace_remote_unmap.c:162: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 path[200]; data/rr-5.4.0/src/test/ptrace_remote_unmap.c:164:21: [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). FILE* maps_file = fopen(path, "r"); data/rr-5.4.0/src/test/ptrace_remote_unmap.c:172:15: [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). maps_file = fopen(path, "r"); data/rr-5.4.0/src/test/quotactl.c:5: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 home_device[1001]; data/rr-5.4.0/src/test/quotactl.c:11: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 mount_line[2000]; data/rr-5.4.0/src/test/quotactl.c:19:7: [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). f = fopen("/proc/self/mountinfo", "rt"); data/rr-5.4.0/src/test/read_big_struct.c:13: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 bytes[8192]; data/rr-5.4.0/src/test/read_large.c:16: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[BUF_SIZE]; data/rr-5.4.0/src/test/read_large.c:17: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 buf2[BUF_SIZE]; data/rr-5.4.0/src/test/read_large.c:25:10: [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(file_name, O_WRONLY | O_CREAT | O_EXCL, 0600); data/rr-5.4.0/src/test/read_large.c:34:10: [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(file_name, O_RDONLY); data/rr-5.4.0/src/test/read_large.c:45:10: [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(file_name, O_WRONLY); data/rr-5.4.0/src/test/read_oversize.c:6:12: [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). int fd = open("tmp", O_CREAT | O_RDWR, 0700); data/rr-5.4.0/src/test/read_oversize.c:7: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[100]; data/rr-5.4.0/src/test/readlink.c:10:12: [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). int fd = mkstemp(path); data/rr-5.4.0/src/test/readlink.c:12: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 link[PATH_MAX]; data/rr-5.4.0/src/test/readlink.c:19: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(link, "rr-test-link-%d", count); data/rr-5.4.0/src/test/readv.c:5: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 data[10] = "0123456789"; data/rr-5.4.0/src/test/readv.c:9:12: [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). int fd = open(name, O_CREAT | O_RDWR | O_EXCL, 0600); data/rr-5.4.0/src/test/readv.c:11: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 ch[7]; data/rr-5.4.0/src/test/readv.c:14: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 ch[10]; data/rr-5.4.0/src/test/recvfrom.c:16: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 out[100]; data/rr-5.4.0/src/test/rename.c:9:12: [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). int fd = open(file_path, O_WRONLY | O_CREAT, 0700); data/rr-5.4.0/src/test/reverse_continue_breakpoint.c:14:12: [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). int fd = open("/dev/null", O_WRONLY); data/rr-5.4.0/src/test/save_data_fd.c:8:12: [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). int fd = open(DEV_RANDOM, O_RDONLY); data/rr-5.4.0/src/test/save_data_fd.c:9: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/rr-5.4.0/src/test/scm_rights.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("/dev/null", O_WRONLY); data/rr-5.4.0/src/test/scm_rights.c:95: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/zero", O_RDONLY); data/rr-5.4.0/src/test/scm_rights.c:108: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(CMSG_DATA(cmsg), &fd, sizeof(fd)); data/rr-5.4.0/src/test/scratch_read.c:8:12: [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). int fd = open("tempfile", O_RDWR | O_CREAT | O_TRUNC, 0700); data/rr-5.4.0/src/test/search.c:8:1: [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[1024] = { 99, 1, 2, 2, 3, 0xff, 0xfa, 0xde, 0xbc }; data/rr-5.4.0/src/test/search.c:36: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(p + page_size, buf, 12); data/rr-5.4.0/src/test/search.c:37: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(p + page_size * 2, buf, 12); data/rr-5.4.0/src/test/seccomp.c:152:3: [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). open("/dev/null", O_RDONLY); data/rr-5.4.0/src/test/seccomp_desched.c:61: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 chs[3] = { 9, 9, 9 }; data/rr-5.4.0/src/test/seccomp_sigsys_args.c:53:15: [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). test_assert(open("/dev/null", O_RDONLY) >= 0); data/rr-5.4.0/src/test/seccomp_sigsys_sigtrap.c:50:15: [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). test_assert(open("/dev/null", O_RDONLY) >= 0); data/rr-5.4.0/src/test/seccomp_sigsys_syscallbuf.c:57:15: [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). test_assert(open("/dev/null", O_RDONLY) >= 0); data/rr-5.4.0/src/test/self_shebang.c:7: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 self[PATH_MAX]; data/rr-5.4.0/src/test/self_shebang.c:19: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). int dst_fd = open("shebang_test", O_WRONLY | O_CREAT, 0700); data/rr-5.4.0/src/test/self_shebang.c:20: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[PATH_MAX + 1024]; data/rr-5.4.0/src/test/send_block.c:12: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[BUF_SIZE]; data/rr-5.4.0/src/test/send_block.c:21: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[BUF_SIZE]; data/rr-5.4.0/src/test/sendfile.c:13: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[TOKEN_SIZE]; data/rr-5.4.0/src/test/sendfile.c:28:12: [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). filefd = open(token_file, O_RDWR | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/sendfile.c:29: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). filefd_out = open(token_file, O_RDWR | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/shared_exec.c:6:12: [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). int fd = open("output", O_RDWR | O_CREAT, 0777); data/rr-5.4.0/src/test/shared_map.c:6:12: [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). int fd = open("tmp.txt", O_RDWR | O_CREAT | O_EXCL, 0700); data/rr-5.4.0/src/test/shared_map.c:8: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[page_size]; data/rr-5.4.0/src/test/shared_map.c:19: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("tmp.txt", O_RDWR); data/rr-5.4.0/src/test/shared_persistent_file.c:8:12: [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). int fd = open("/bin/sh", O_RDONLY); data/rr-5.4.0/src/test/shared_write.c:6:12: [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). int fd = open("output", O_RDWR | O_CREAT, 0777); data/rr-5.4.0/src/test/sigaltstack.c:5: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 buf[128 * 1024]; data/rr-5.4.0/src/test/sighandler_bad_rsp_sigsegv.c:7: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 buf[128 * 1024]; data/rr-5.4.0/src/test/signal_frame.c:30: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("/bin/ls", O_RDONLY); data/rr-5.4.0/src/test/sioc.c:7: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[PATH_MAX]; data/rr-5.4.0/src/test/sioc.c:15: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[PATH_MAX]; data/rr-5.4.0/src/test/sioc.c:18: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(str, "%02x:%02x:%02x:%02x:%02x:%02x", data[0], data[1], data[2], data/rr-5.4.0/src/test/sioc.c:371: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[PATH_MAX]; data/rr-5.4.0/src/test/sioc.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 buf[1024]; data/rr-5.4.0/src/test/splice.c:12: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[TOKEN_SIZE]; data/rr-5.4.0/src/test/splice.c:28:12: [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). filefd = open(token_file, O_RDWR | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/stack_growth.c:10: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[2000000]; data/rr-5.4.0/src/test/stack_growth_after_syscallbuf.c:14:12: [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). int fd = open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/stack_growth_syscallbuf.c:8: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 ch[8]; data/rr-5.4.0/src/test/stack_growth_syscallbuf.c:18: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/zero", O_RDONLY); data/rr-5.4.0/src/test/stack_overflow_altstack.c:6: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 buf[SIGSTKSZ]; data/rr-5.4.0/src/test/stdout_cloexec.c:14:5: [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). open("/dev/null", O_WRONLY); data/rr-5.4.0/src/test/stdout_redirect.c:15:14: [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). int fd = open("/dev/null", O_WRONLY); data/rr-5.4.0/src/test/stray_time_slice_signal.c:7:12: [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). int fd = open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/sync.c:12: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(FILENAME, O_CREAT | O_RDWR, 0600); data/rr-5.4.0/src/test/sync_file_range.c:6:12: [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). int fd = open("dummy.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); data/rr-5.4.0/src/test/syscall_bp.c:49:15: [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). int memfd = open("/proc/self/mem", O_RDWR); data/rr-5.4.0/src/test/syscall_in_writable_mem.c:46:12: [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). int fd = open("dummy", O_RDWR | O_CREAT | O_EXCL, 0700); data/rr-5.4.0/src/test/syscallbuf_signal_blocking_read.c:6:12: [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). int fd = open("dummy.txt", O_RDWR | O_CREAT | O_EXCL, 0700); data/rr-5.4.0/src/test/syscallbuf_signal_reset.c:8:3: [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). open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/syscallbuf_signal_reset.c:17:12: [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). int fd = open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/syscallbuf_sigstop.c:6:12: [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). int fd = open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/syscallbuf_timeslice.c:9: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[10]; data/rr-5.4.0/src/test/syscallbuf_timeslice.c:14: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/zero", O_RDONLY); data/rr-5.4.0/src/test/syscallbuf_timeslice2.c:7: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[10]; data/rr-5.4.0/src/test/syscallbuf_timeslice2.c:11:10: [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/zero", O_RDONLY); data/rr-5.4.0/src/test/sysconf_onln.c:16:24: [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). test_assert(ncpus == atoi(argv[1]+sizeof(arg)-1) || ncpus == 1); data/rr-5.4.0/src/test/sysconf_onln.c:25:12: [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). int fd = open("/sys/devices/system/cpu/online", O_RDONLY); data/rr-5.4.0/src/test/sysconf_onln.c:28: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 result[1024]; data/rr-5.4.0/src/test/target_fork.c:23:18: [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). num_syscalls = atoi(argv[1]); data/rr-5.4.0/src/test/thread_open_race.c:11:14: [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). int fd = open(file_name, O_RDONLY); data/rr-5.4.0/src/test/thread_open_race.c:25:12: [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). int fd = open(file_name, O_RDWR | O_CREAT, 0700); data/rr-5.4.0/src/test/threaded_syscall_spam.c:44:13: [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). num_its = atoi(argv[1]); data/rr-5.4.0/src/test/truncate_temp.c:24: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(TEST_FILE, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/ttyname.c:13:12: [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). int fd = open(tty, O_RDWR); data/rr-5.4.0/src/test/tun.c:11:12: [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). int fd = open("/dev/net/tun", O_RDWR); data/rr-5.4.0/src/test/unexpected_exit.c:41:12: [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). int fd = open(argv[0], O_RDONLY); data/rr-5.4.0/src/test/unexpected_stack_growth.c:10: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[2000000]; data/rr-5.4.0/src/test/unshare.c:83: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). int uts_ns = open("/proc/self/ns/uts", O_RDONLY); data/rr-5.4.0/src/test/unshare.c:103: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[1000]; data/rr-5.4.0/src/test/unshare.c:111: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[1000]; data/rr-5.4.0/src/test/unshare.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 buf[100]; data/rr-5.4.0/src/test/unshare.c:130: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("/proc/self/uid_map", O_WRONLY | O_CREAT, 0600); data/rr-5.4.0/src/test/unshare.c:132: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, "7 %d 1\n", uid); data/rr-5.4.0/src/test/unshare.c:139: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("/proc/self/setgroups", O_WRONLY | O_CREAT, 0600); data/rr-5.4.0/src/test/unshare.c:142: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(buf, "deny"); data/rr-5.4.0/src/test/unshare.c:147: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("/proc/self/gid_map", O_WRONLY | O_CREAT, 0600); data/rr-5.4.0/src/test/unshare.c:149: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, "8 %d 1\n", gid); data/rr-5.4.0/src/test/util.h:152: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[1024]; data/rr-5.4.0/src/test/util.h:271: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(cp - sizeof(GUARD_VALUE), &GUARD_VALUE, sizeof(GUARD_VALUE)); data/rr-5.4.0/src/test/util.h:311: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 flags[32]; data/rr-5.4.0/src/test/util.h:318: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 line[PATH_MAX * 2]; data/rr-5.4.0/src/test/utimes.c:10:12: [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). int fd = mkstemp(path); data/rr-5.4.0/src/test/vfork.c:18:21: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. if (0 == (child = vfork())) { data/rr-5.4.0/src/test/vfork_flush.c:15:21: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. if (0 == (child = vfork())) { data/rr-5.4.0/src/test/vfork_read_clone_stress.c:15: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("tempfile", O_RDWR | O_CREAT | O_TRUNC, 0700); data/rr-5.4.0/src/test/vfork_read_clone_stress.c:27:5: [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). open("/dev/null", O_RDONLY); data/rr-5.4.0/src/test/vfork_read_clone_stress.c:28:10: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. if (!vfork()) { data/rr-5.4.0/src/test/vfork_shared.c:12:21: [2] (race) vfork: On some old systems, vfork() permits race conditions, and it's very difficult to use correctly (CWE-362). Use fork() instead. if (0 == (child = vfork())) { data/rr-5.4.0/src/test/video_capture.c:21:12: [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). int fd = open("/dev/video0", O_RDWR); data/rr-5.4.0/src/test/video_capture.c:117: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 cs[4]; data/rr-5.4.0/src/test/vsyscall.c:45:21: [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). FILE* maps_file = fopen("/proc/self/maps", "r"); data/rr-5.4.0/src/test/watchpoint_syscall.c:11:12: [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). int fd = open("/dev/zero", O_RDONLY); data/rr-5.4.0/src/test/write_race.c:15:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1000]; data/rr-5.4.0/src/test/write_race.c:16:9: [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, "Child %d writing line %d\n", i, j); data/rr-5.4.0/src/test/writev.c:5: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 data[10] = "0123456789"; data/rr-5.4.0/src/test/writev.c:9:12: [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). int fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0600); data/rr-5.4.0/src/test/writev.c:11: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 ch[50]; data/rr-5.4.0/src/test/x86/cross_arch.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(low_buffer, token, sizeof(token)); data/rr-5.4.0/src/test/x86/fault_in_code_page.c:28: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(code_page, fn_insns, sizeof(fn_insns)); data/rr-5.4.0/src/test/x86/patch_40_80_f6_81.c:34: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(p, code, sizeof(code)); data/rr-5.4.0/src/test/x86/ptrace_exec32.c:33:28: [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). return argc <= 1 ? 0 : atoi(argv[1]); data/rr-5.4.0/src/test/x86/sigreturn.c:128: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 st[ST_SIZE]; data/rr-5.4.0/src/test/x86/sigreturn.c:163: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 st[ST_SIZE]; data/rr-5.4.0/src/test/x86/string_instructions.c:16:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[9]; data/rr-5.4.0/src/test/x86/string_instructions.c:57: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(dest, &a, unit); data/rr-5.4.0/src/test/x86/string_instructions.c:87: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(dest, src, unit); data/rr-5.4.0/src/test/x86/string_instructions.c:260: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[SIZE - unit], &pattern2, unit); data/rr-5.4.0/src/test/x86/string_instructions.c:282: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[0], &pattern, unit); data/rr-5.4.0/src/test/x86/string_instructions_async_signals_shared.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(mapping, string_code, sizeof(string_code)); data/rr-5.4.0/src/test/x86/string_instructions_watch.c:9:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[9]; data/rr-5.4.0/src/test/x86/string_instructions_watch.c:50: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(dest, &a, unit); data/rr-5.4.0/src/test/x86/sysfs.c:17:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/rr-5.4.0/src/test/xattr.c:33: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(path_name, O_RDWR | O_CREAT, 0700); data/rr-5.4.0/src/test/zero_length_read.c:6: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[1024]; data/rr-5.4.0/src/util.cc:87: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(result.data() + result.size() - sizeof(pair), pair, sizeof(pair)); data/rr-5.4.0/src/util.cc:249: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 filename[PATH_MAX]; data/rr-5.4.0/src/util.cc:276: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 cur_dump[PATH_MAX]; data/rr-5.4.0/src/util.cc:277: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 rec_dump[PATH_MAX]; data/rr-5.4.0/src/util.cc: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 filename[PATH_MAX]; data/rr-5.4.0/src/util.cc:417: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 line[1024]; data/rr-5.4.0/src/util.cc:1143: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 elf_header[EI_CLASS + 1]; data/rr-5.4.0/src/util.cc:1144:16: [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 const char magic[4] = { ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3 }; data/rr-5.4.0/src/util.cc:1180: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[PATH_MAX]; data/rr-5.4.0/src/util.cc:1234: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[1000]; data/rr-5.4.0/src/util.cc:1235: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, "/proc/%d/status", tid); data/rr-5.4.0/src/util.cc:1236:13: [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). FILE* f = fopen(buf, "r"); data/rr-5.4.0/src/util.cc:1312: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[32 * 1024]; data/rr-5.4.0/src/util.cc:1439:17: [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_t pid = atoi(test_monitor_pid); data/rr-5.4.0/src/util.cc:1529: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[PATH_MAX]; data/rr-5.4.0/src/util.cc:1533: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). result.fd = mkstemp(buf); data/rr-5.4.0/src/util.cc:1558:7: [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). open(name.c_str(), O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, 0700); data/rr-5.4.0/src/util.cc:1988: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 buf[8]; data/rr-5.4.0/src/util.cc:1989:7: [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, "\\u%04x", c); data/rr-5.4.0/src/util.cc:2054: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[1000]; data/rr-5.4.0/src/util.cc:2055: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, "/proc/%d/fd", tid); data/rr-5.4.0/src/util.cc:2059:19: [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). ret.push_back(atoi(dir->d_name)); data/rr-5.4.0/third-party/blake2/blake2-impl.h:37: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(&w, src, sizeof w); data/rr-5.4.0/third-party/blake2/blake2-impl.h:52: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(&w, src, sizeof w); data/rr-5.4.0/third-party/blake2/blake2-impl.h:71: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(&w, src, sizeof w); data/rr-5.4.0/third-party/blake2/blake2-impl.h:83:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, &w, sizeof w); data/rr-5.4.0/third-party/blake2/blake2-impl.h:94:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, &w, sizeof w); data/rr-5.4.0/third-party/blake2/blake2-impl.h:107:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, &w, sizeof w); data/rr-5.4.0/third-party/blake2/neon/blake2b-neon.c:148: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( block, key, keylen ); data/rr-5.4.0/third-party/blake2/neon/blake2b-neon.c:473: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( S->buf + left, in, fill ); /* Fill buffer */ data/rr-5.4.0/third-party/blake2/neon/blake2b-neon.c:484: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( S->buf + S->buflen, in, inlen ); data/rr-5.4.0/third-party/blake2/neon/blake2b-neon.c:509: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( out, buffer, S->outlen ); data/rr-5.4.0/third-party/blake2/neon/blake2b.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( block, key, keylen ); data/rr-5.4.0/third-party/blake2/neon/blake2b.c:194: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( S->buf + left, in, fill ); /* Fill buffer */ data/rr-5.4.0/third-party/blake2/neon/blake2b.c:205: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( S->buf + S->buflen, in, inlen ); data/rr-5.4.0/third-party/blake2/neon/blake2b.c:230: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( out, buffer, S->outlen ); data/rr-5.4.0/third-party/blake2/sse/blake2b.c:144: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( block, key, keylen ); data/rr-5.4.0/third-party/blake2/sse/blake2b.c:231: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( S->buf + left, in, fill ); /* Fill buffer */ data/rr-5.4.0/third-party/blake2/sse/blake2b.c:242: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( S->buf + S->buflen, in, inlen ); data/rr-5.4.0/third-party/blake2/sse/blake2b.c:262: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( out, &S->h[0], S->outlen ); data/rr-5.4.0/third-party/brotli/common/platform.h:293: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(&t, p, sizeof t); data/rr-5.4.0/third-party/brotli/common/platform.h:298: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(&t, p, sizeof t); data/rr-5.4.0/third-party/brotli/common/platform.h:303: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(&t, p, sizeof t); data/rr-5.4.0/third-party/brotli/common/platform.h:307: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(p, &v, sizeof v); data/rr-5.4.0/third-party/brotli/common/platform.h:368: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(&v, p, sizeof(uint64_t)); data/rr-5.4.0/third-party/brotli/common/platform.h:373: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(p, &v, sizeof(uint64_t)); data/rr-5.4.0/third-party/brotli/common/transform.c:14: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. static const char kPrefixSuffix[217] = data/rr-5.4.0/third-party/brotli/dec/bit_reader.h:300: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, br->next_in, num); data/rr-5.4.0/third-party/brotli/dec/decode.c:174: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(buffer, src, 16); data/rr-5.4.0/third-party/brotli/dec/decode.c:175:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, buffer, 16); data/rr-5.4.0/third-party/brotli/dec/decode.c:925: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(&pattern, &b0123, 4); data/rr-5.4.0/third-party/brotli/dec/decode.c:1274: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(*next_out, start, num_written); data/rr-5.4.0/third-party/brotli/dec/decode.c:1304: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(s->ringbuffer, s->ringbuffer_end, (size_t)s->pos); data/rr-5.4.0/third-party/brotli/dec/decode.c:1334: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(s->ringbuffer, old_ringbuffer, (size_t)s->pos); data/rr-5.4.0/third-party/brotli/dec/decode.c:1830:11: [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(&s->ringbuffer[pos], word, (size_t)len); data/rr-5.4.0/third-party/brotli/dec/decode.c:1883: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(copy_dst + 16, copy_src + 16, (size_t)(i - 16)); data/rr-5.4.0/third-party/brotli/dec/huffman.c:225: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(&table[table_size], &table[0], data/rr-5.4.0/third-party/brotli/dec/huffman.c:330: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(&table[table_size], &table[0], data/rr-5.4.0/third-party/brotli/dec/transform.h:49: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. static const char kPrefixSuffix[208] = data/rr-5.4.0/third-party/brotli/enc/backward_references_hq.c:791: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(orig_dist_cache, dist_cache, 4 * sizeof(dist_cache[0])); data/rr-5.4.0/third-party/brotli/enc/backward_references_hq.c:810: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(dist_cache, orig_dist_cache, 4 * sizeof(dist_cache[0])); data/rr-5.4.0/third-party/brotli/enc/block_splitter.c:63: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(literals + pos, data + from_pos, head_size); data/rr-5.4.0/third-party/brotli/enc/block_splitter.c:69: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(literals + pos, data + from_pos, insert_len); data/rr-5.4.0/third-party/brotli/enc/brotli_bit_stream.c:1308: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(&storage[*storage_ix >> 3], &input[masked_pos], len1); data/rr-5.4.0/third-party/brotli/enc/brotli_bit_stream.c:1313: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(&storage[*storage_ix >> 3], &input[masked_pos], len); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:142: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(cmd_depth, depth, 24); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:143: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(cmd_depth + 24, depth + 40, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:144: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(cmd_depth + 32, depth + 24, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:145: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(cmd_depth + 40, depth + 48, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:146: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(cmd_depth + 48, depth + 32, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:147: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(cmd_depth + 56, depth + 56, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:149: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(bits, cmd_bits, 48); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:150: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(bits + 24, cmd_bits + 32, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:151: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(bits + 32, cmd_bits + 48, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:152: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(bits + 40, cmd_bits + 24, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:153: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(bits + 48, cmd_bits + 40, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:154: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(bits + 56, cmd_bits + 56, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:160: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(cmd_depth, depth, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:161: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(cmd_depth + 64, depth + 8, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:162: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(cmd_depth + 128, depth + 16, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:163: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(cmd_depth + 192, depth + 24, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:164: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(cmd_depth + 384, depth + 32, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:411: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(&storage[*storage_ix >> 3], begin, len); data/rr-5.4.0/third-party/brotli/enc/compress_fragment.c:487: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(cmd_histo, kCmdHistoSeed, sizeof(kCmdHistoSeed)); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:84: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(cmd_depth, depth + 24, 24); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:85: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(cmd_depth + 24, depth, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:86: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(cmd_depth + 32, depth + 48, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:87: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(cmd_depth + 40, depth + 8, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:88: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(cmd_depth + 48, depth + 56, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:89: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(cmd_depth + 56, depth + 16, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:91: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(bits, cmd_bits + 24, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:92: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(bits + 8, cmd_bits + 40, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:93: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(bits + 16, cmd_bits + 56, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:94: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(bits + 24, cmd_bits, 48); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:95: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(bits + 48, cmd_bits + 32, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:96: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(bits + 56, cmd_bits + 48, 16); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:102: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(cmd_depth, depth + 24, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:103: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(cmd_depth + 64, depth + 32, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:104: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(cmd_depth + 128, depth + 40, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:105: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(cmd_depth + 192, depth + 48, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:106: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(cmd_depth + 384, depth + 56, 8); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:333: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(*literals, next_emit, (size_t)insert); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:450: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(*literals, next_emit, insert); data/rr-5.4.0/third-party/brotli/enc/compress_fragment_two_pass.c:552: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(&storage[*storage_ix >> 3], input, input_size); data/rr-5.4.0/third-party/brotli/enc/encode.c:41:30: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define COPY_ARRAY(dst, src) memcpy(dst, src, sizeof(src)); data/rr-5.4.0/third-party/brotli/enc/encode.c:570: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(dist_cache, saved_dist_cache, 4 * sizeof(dist_cache[0])); data/rr-5.4.0/third-party/brotli/enc/encode.c:639: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(dist_cache, saved_dist_cache, 4 * sizeof(dist_cache[0])); data/rr-5.4.0/third-party/brotli/enc/encode.c:1014: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(new_commands, s->commands_, sizeof(Command) * s->num_commands_); data/rr-5.4.0/third-party/brotli/enc/encode.c:1260:11: [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(new_commands, commands, sizeof(Command) * num_commands); data/rr-5.4.0/third-party/brotli/enc/encode.c:1298: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(dist_cache, saved_dist_cache, 4 * sizeof(dist_cache[0])); data/rr-5.4.0/third-party/brotli/enc/encode.c:1342: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(dist_cache, saved_dist_cache, 4 * sizeof(dist_cache[0])); data/rr-5.4.0/third-party/brotli/enc/encode.c:1361: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(saved_dist_cache, dist_cache, 4 * sizeof(dist_cache[0])); data/rr-5.4.0/third-party/brotli/enc/encode.c:1367: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(encoded_buffer, storage, out_size); data/rr-5.4.0/third-party/brotli/enc/encode.c:1422: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(&output[result], &input[offset], chunk_size); data/rr-5.4.0/third-party/brotli/enc/encode.c:1536: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(*next_out, s->next_out_, copy_output_size); data/rr-5.4.0/third-party/brotli/enc/encode.c:1718: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(*next_out, *next_in, copy); data/rr-5.4.0/third-party/brotli/enc/encode.c:1728: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(s->next_out_, *next_in, copy); data/rr-5.4.0/third-party/brotli/enc/memory.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(m->pointers + PERM_ALLOCATED_OFFSET + m->perm_allocated, data/rr-5.4.0/third-party/brotli/enc/memory.h:76: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(new_array, A, C * sizeof(T)); \ data/rr-5.4.0/third-party/brotli/enc/port.h:96: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(&t, p, sizeof t); data/rr-5.4.0/third-party/brotli/enc/port.h: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(p, &v, sizeof v); data/rr-5.4.0/third-party/brotli/enc/port.h:111: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(&t, p, sizeof t); data/rr-5.4.0/third-party/brotli/enc/port.h:117: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(&t, p, sizeof t); data/rr-5.4.0/third-party/brotli/enc/port.h:122: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(p, &v, sizeof v); data/rr-5.4.0/third-party/brotli/enc/port.h:126: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(p, &v, sizeof v); data/rr-5.4.0/third-party/brotli/enc/port.h:153: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(new_array, A, C * sizeof(T)); \ data/rr-5.4.0/third-party/brotli/enc/ringbuffer.h:80: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(new_data, rb->data_, data/rr-5.4.0/third-party/brotli/enc/ringbuffer.h:99: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(&rb->buffer_[p], bytes, data/rr-5.4.0/third-party/brotli/enc/ringbuffer.h:117: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(rb->buffer_, bytes, n); data/rr-5.4.0/third-party/brotli/enc/ringbuffer.h:136: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(&rb->buffer_[masked_pos], bytes, n); data/rr-5.4.0/third-party/brotli/enc/ringbuffer.h:140: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(&rb->buffer_[masked_pos], bytes, data/rr-5.4.0/third-party/brotli/enc/ringbuffer.h:143: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(&rb->buffer_[0], bytes + (rb->size_ - masked_pos), data/rr-5.4.0/src/AddressSpace.cc:114:17: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. int nparsed = sscanf(line, "%" SCNx64 "-%" SCNx64 " %31s %" SCNx64 data/rr-5.4.0/src/AddressSpace.cc:122: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). int last_char = strlen(line) - 1; data/rr-5.4.0/src/AutoRemoteSyscalls.h:53:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). init((const uint8_t*)str, strlen(str) + 1 /*null byte*/); data/rr-5.4.0/src/CompressedReader.cc:106:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool CompressedReader::read(void* data, size_t size) { data/rr-5.4.0/src/CompressedReader.h:31:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bool read(void* data, size_t size); data/rr-5.4.0/src/CompressedReader.h:61:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(&value, sizeof(value)); data/rr-5.4.0/src/CompressedReader.h:69:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(&ch, 1); data/rr-5.4.0/src/Dwarf.cc:429:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto h = DwarfSpan(*debug_info).read<Dwarf4CompilationUnitHeader<D>>(ok); data/rr-5.4.0/src/Dwarf.cc:445:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto h = span.read<H>(ok); data/rr-5.4.0/src/Dwarf.cc:494:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto h = DwarfSpan(span).read<Dwarf2LineNumberTableHeader<D>>(ok); data/rr-5.4.0/src/Dwarf.cc:720:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto h = span.read<H>(ok); data/rr-5.4.0/src/Dwarf.h:82:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template <typename T> const T* read(bool *ok) { data/rr-5.4.0/src/Dwarf.h:92:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const T* r = read<T>(ok); data/rr-5.4.0/src/ElfReader.cc:67:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). elfheader = r.read<typename Arch::ElfEhdr>(0); data/rr-5.4.0/src/ElfReader.cc:79:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r.read<typename Arch::ElfShdr>(elfheader->e_shoff, elfheader->e_shnum); data/rr-5.4.0/src/ElfReader.cc:87:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const char* section_names_ptr = r.read<char>(section_names_section.sh_offset, data/rr-5.4.0/src/ElfReader.cc:173:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto symbol_list = r.read<typename Arch::ElfSym>( data/rr-5.4.0/src/ElfReader.cc:179:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto strtab_ptr = r.read<char>(strings->sh_offset, strings->sh_size); data/rr-5.4.0/src/ElfReader.cc:233:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto dyn_list = r.read<typename Arch::ElfDyn>( data/rr-5.4.0/src/ElfReader.cc:239:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto strtab = r.read<char>(dynstr->sh_offset, dynstr->sh_size); data/rr-5.4.0/src/ElfReader.cc:285:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const char* file_name = r.read<char>(debuglink->sh_offset, crc_offset); data/rr-5.4.0/src/ElfReader.cc:312:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const char* file_name = r.read<char>(debuglink->sh_offset, build_id_offset); data/rr-5.4.0/src/ElfReader.cc:336:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto nhdr = r.read<typename Arch::ElfNhdr>(offset); data/rr-5.4.0/src/ElfReader.cc:357:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const uint8_t* id = r.read<uint8_t>(offset, nhdr->n_descsz); data/rr-5.4.0/src/ElfReader.cc:475:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = ::read(debug_fd.get(), buf, sizeof(buf)); data/rr-5.4.0/src/ElfReader.h:86:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). template <typename T> const T* read(size_t offset, size_t count = 1) { data/rr-5.4.0/src/ElfReader.h:90:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). auto r = read<T>(offset); data/rr-5.4.0/src/FileMonitor.cc:22:57: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). syscallno == Arch::readv || syscallno == Arch::read; data/rr-5.4.0/src/FileMonitor.cc:49:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). case Arch::read: data/rr-5.4.0/src/GdbConnection.cc:110:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(sock_fd, buf, sizeof(buf)); data/rr-5.4.0/src/GdbConnection.cc:172:51: [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 write_packet_bytes((const uint8_t*)data, strlen(data)); data/rr-5.4.0/src/GdbConnection.cc:177: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). ssize_t pfx_num_chars = strlen(pfx); data/rr-5.4.0/src/GdbConnection.cc:218: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). ssize_t pfx_num_chars = strlen(prefix); data/rr-5.4.0/src/GdbConnection.cc:242: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). ssize_t enc_len = strlen(encoded); data/rr-5.4.0/src/GdbConnection.cc:414:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = getc(f); data/rr-5.4.0/src/GdbConnection.cc:575: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). reg->size = strlen(str) / 2; data/rr-5.4.0/src/GdbConnection.cc:941:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(filename)) { data/rr-5.4.0/src/GdbServer.cc:1655:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(params.exe_image, t->vm()->exe_image().c_str(), data/rr-5.4.0/src/GdbServer.cc:1657:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(params.host, flags.dbg_host.c_str(), sizeof(params.host) - 1); data/rr-5.4.0/src/GdbServer.cc:1740:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(params_pipe_fd, ¶ms, sizeof(params)); data/rr-5.4.0/src/Monkeypatcher.cc:116:58: [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_and_record_mem(t, dest.cast<char>(), lib_name, strlen(soname_padded)); data/rr-5.4.0/src/PackCommand.cc:132:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t r = read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/PackCommand.cc:268:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t r = read(in_fd, buf, sizeof(buf)); data/rr-5.4.0/src/PerfCounters.cc:175:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t nread = read(fd, &val, sizeof(val)); data/rr-5.4.0/src/RecordSession.cc:2132:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t size = read(fd, buf, sizeof(buf) - 1); data/rr-5.4.0/src/Session.cc:259:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t len = read(spawned_task_error_fd_, buf, sizeof(buf)); data/rr-5.4.0/src/Session.cc:486:36: [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). char* name_start = name_buffer + strlen(Session::rr_mapping_prefix()); data/rr-5.4.0/src/Session.cc:510:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, m.map.fsname().c_str(), sizeof(name) - 1); data/rr-5.4.0/src/Session.cc:539:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, m.map.fsname().c_str(), sizeof(name)); data/rr-5.4.0/src/SourcesCommand.cc:310: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). base.resize(base.size() - strlen(suffix)); data/rr-5.4.0/src/StdioMonitor.cc:17: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). ssize_t len = strlen(buf); data/rr-5.4.0/src/Task.cc:2469:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytes = read(info, buf, sizeof(buf) - 1); data/rr-5.4.0/src/Task.cc:2474:22: [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 field_len = strlen(field); data/rr-5.4.0/src/Task.cc:2542:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(prname, state.prname.c_str(), sizeof(prname)); data/rr-5.4.0/src/Task.cc:3104: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). write_all(err_fd, buf2, strlen(buf2)); data/rr-5.4.0/src/TraceStream.cc:169:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!reader.read(buffer, maxBytes)) { data/rr-5.4.0/src/TraceStream.cc:1178:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). reader(RAW_DATA).read((char*)d.data.data(), rec.size); data/rr-5.4.0/src/TraceStream.cc:1445:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(version_fd, &ch, 1); data/rr-5.4.0/src/audit/stap-note-iter.c:222:38: [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). desc = out_note->provider_name + strlen(out_note->provider_name) + 1; data/rr-5.4.0/src/audit/stap-note-iter.c:224:35: [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). desc = out_note->probe_name + strlen(out_note->probe_name) + 1; data/rr-5.4.0/src/chaos-test/pipe_wakeup.c:10:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ret = read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/ftrace.cc:59:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(control_fd, &ch, 1) != 1) { data/rr-5.4.0/src/ftrace/ftrace_helper.c:126:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(in_fd, buf, sizeof(buf)); data/rr-5.4.0/src/ftrace/ftrace_helper.c:141:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/ftrace/ftrace_helper.c:164:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). check((ssize_t)strlen(bare_name) + 1 == data/rr-5.4.0/src/ftrace/ftrace_helper.c:165:36: [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(final_fd, bare_name, strlen(bare_name) + 1)); data/rr-5.4.0/src/ftrace/ftrace_helper.c:283: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). if (strlen(path) + 1 > sizeof(addr.sun_path)) { data/rr-5.4.0/src/ftrace/ftrace_helper.c:305:26: [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). ret = write(fd, value, strlen(value)); data/rr-5.4.0/src/ftrace/ftrace_helper.c:306:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). check((ssize_t)strlen(value) == ret); data/rr-5.4.0/src/ftrace/ftrace_helper.c:336:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ret = read(control_fd, control_buf, sizeof(control_buf)); data/rr-5.4.0/src/ftrace/ftrace_helper.c:405: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). if (buf_out_ptr + strlen(buf) >= buf_out + sizeof(buf_out)) { data/rr-5.4.0/src/preload/preload_interface.h:49:55: [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). static inline size_t rrstrlen(const char* s) { return strlen(s); } data/rr-5.4.0/src/preload/syscallbuf.c:3223:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). CASE(read); data/rr-5.4.0/src/record_syscall.cc:3380:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (syscallno == Arch::read && data/rr-5.4.0/src/record_syscall.cc:3870:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). case Arch::read: { data/rr-5.4.0/src/record_syscall.cc:6089:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). case Arch::read: data/rr-5.4.0/src/replay_syscall.cc:575:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(file, buf.data(), min(size, buf.size())); data/rr-5.4.0/src/replay_syscall.cc:1263:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). case Arch::read: { data/rr-5.4.0/src/test-monitor/test-monitor.cc:76:25: [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). ssize_t len = strlen(buf); data/rr-5.4.0/src/test-monitor/test-monitor.cc:157: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). for (ssize_t i = strlen(gdb_cmd) - 1; i >= 0; --i) { data/rr-5.4.0/src/test/64bit_child.c:13:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int ch = fgetc(f); data/rr-5.4.0/src/test/accept.c:41:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(addr.sun_path, "socket.unix", sizeof(addr.sun_path) - 1); data/rr-5.4.0/src/test/async_signal_syscalls2.c:51:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int n = read(ready_fds[0], buf, count); data/rr-5.4.0/src/test/async_signal_syscalls2.c:85:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/test/async_signal_syscalls_siginfo.c:23:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/rr-5.4.0/src/test/big_buffers.c:27:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, buf, BUF_SIZE); data/rr-5.4.0/src/test/block.c:25:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fd_set* read; data/rr-5.4.0/src/test/block.c:59:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/block.c:196:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/block.c:210:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/block.c:247:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/block.c:269:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/block.c:290:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/block.c:332:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/block.c:342:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:352:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t this_read = read(sock, this_buf, num_sockbuf_bytes - nread); data/rr-5.4.0/src/test/block.c:393:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:400:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:410:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:418:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:426:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:434:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:467:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:474:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:484:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:519:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:526:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:534:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:542:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:550:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:558:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:566:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block.c:582:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block_clone_checkpoint.c:23:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(buf) == read(fd, buf, sizeof(buf))); data/rr-5.4.0/src/test/block_clone_interrupted.c:28:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(buf) == read(fd, buf, sizeof(buf))); data/rr-5.4.0/src/test/block_clone_syscallbuf_overflow.c:28:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(buf) == read(fd, buf, sizeof(buf))); data/rr-5.4.0/src/test/block_intr_sigchld.c:23:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/block_intr_sigchld.c:58:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rr-5.4.0/src/test/block_intr_sigchld.c:61:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sock, &c, sizeof(c))); data/rr-5.4.0/src/test/check_session_leaks.c:11:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, buf, size); data/rr-5.4.0/src/test/check_session_leaks.c:23:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], buf, 1); data/rr-5.4.0/src/test/checkpoint_dying_threads.c:18:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(wait_forever_fds[0], &ch, 1); data/rr-5.4.0/src/test/checkpoint_dying_threads.c:24:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(main_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/checkpoint_dying_threads.c:51:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(thread_to_main_fds[0], &ch, 1)); data/rr-5.4.0/src/test/clone.c:32:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &byte, 1)); data/rr-5.4.0/src/test/clone_file_range.c:53:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(FILE_SIZE == read(fd2, buf, BUF_SIZE)); data/rr-5.4.0/src/test/clone_interruption.c:54:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(thread_to_main_fds[0], &ch, 1)); data/rr-5.4.0/src/test/clone_interruption.c:62:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(thread_to_main_fds[0], &ch, 1)); data/rr-5.4.0/src/test/clone_untraced.c:20:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/daemon.c:30:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/daemon_read.c:21:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(buf) == read(fd, buf, sizeof(buf))); data/rr-5.4.0/src/test/daemon_read.c:51:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/desched_blocking_poll.c:21:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000); data/rr-5.4.0/src/test/desched_blocking_poll.c:29:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pfds[0].fd, &ch, 1)); data/rr-5.4.0/src/test/doublesegv.c:47:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(read(pipe_fds[0], &handler_sig, sizeof(int)) == sizeof(int)); data/rr-5.4.0/src/test/dup.c:18:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/dup.c:23:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/dup.c:28:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/dup.c:37:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/dup.c:43:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/early_error.c:64:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t nread = read(fd_pair[0], buf, sizeof(buf)-1); data/rr-5.4.0/src/test/eventfd.c:11:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(out) == read(fd, &out, sizeof(out))); data/rr-5.4.0/src/test/fanotify.c:36:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(*event) == read(fd, event, sizeof(*event))); data/rr-5.4.0/src/test/flock.c:113:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/futex_requeue.c:31:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/futex_requeue.c:35:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(250000); data/rr-5.4.0/src/test/futex_requeue.c:42:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(250000); data/rr-5.4.0/src/test/getcwd.c:29:34: [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). test_assert((unsigned char)cwd[strlen(cwd) + 1] == 0xFF); data/rr-5.4.0/src/test/grandchild_threads.c:19:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/grandchild_threads_main_running.c:25:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/grandchild_threads_parent_alive.c:19:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/grandchild_threads_thread_running.c:21:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/inotify.c:29:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(*event) == read(fd, event, sizeof(*event))); data/rr-5.4.0/src/test/intr_futex_wait_restart.c:63:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(readsock, &c, sizeof(c))); data/rr-5.4.0/src/test/intr_futex_wait_restart.c:89:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_futex_wait_restart.c:94:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/rr-5.4.0/src/test/intr_futex_wait_restart.c:99:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_ppoll.c:35:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/rr-5.4.0/src/test/intr_ptrace_decline.c:77:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(readsock, &c, sizeof(c))); data/rr-5.4.0/src/test/intr_ptrace_decline.c:100:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_read_no_restart.c:23:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(-1 == read(sockfds[1], &c, sizeof(c)) && EINTR == errno); data/rr-5.4.0/src/test/intr_read_no_restart.c:36:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sockfds[1], &c, sizeof(c))); data/rr-5.4.0/src/test/intr_read_no_restart.c:67:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(-1 == read(readsock, &c, sizeof(c)) && EINTR == errno); data/rr-5.4.0/src/test/intr_read_no_restart.c:92:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_read_no_restart.c:97:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/rr-5.4.0/src/test/intr_read_no_restart.c:104:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_read_restart.c:23:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sockfds[1], &c, sizeof(c))); data/rr-5.4.0/src/test/intr_read_restart.c:36:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(sockfds[1], &c, sizeof(c))); data/rr-5.4.0/src/test/intr_read_restart.c:66:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(readsock, &c, sizeof(c))); data/rr-5.4.0/src/test/intr_read_restart.c:93:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_read_restart.c:98:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/rr-5.4.0/src/test/intr_read_restart.c:105:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_read_restart.c:111:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_read_restart.c:117:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_sleep_no_restart.c:80:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/intr_sleep_no_restart.c:85:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/rr-5.4.0/src/test/io.c:9:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(garbage_fd, buf, sizeof(buf)); data/rr-5.4.0/src/test/keyctl.c:20:30: [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). strlen(data) + 1, KEY_SPEC_PROCESS_KEYRING); data/rr-5.4.0/src/test/keyctl.c:29:41: [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). test_assert(0 == memcmp(buffer, data, strlen(data) + 1)); data/rr-5.4.0/src/test/mremap_grow_shared.c:12:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert((ssize_t)sizeof(buf) == read(fd, buf, sizeof(buf))); data/rr-5.4.0/src/test/msg.c:105:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/msg.c:124:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/multiple_pending_signals.c:28:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(to_child[0], &ch, 1)); data/rr-5.4.0/src/test/multiple_pending_signals.c:61:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(from_child[0], &ch, 1)); data/rr-5.4.0/src/test/multiple_pending_signals_sequential.c:27:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(to_child[0], &ch, 1)); data/rr-5.4.0/src/test/multiple_pending_signals_sequential.c:69:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(from_child[0], &ch, 1)); data/rr-5.4.0/src/test/netfilter.c:47:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). target.u.user.target_size = strlen(target_name) - 1; data/rr-5.4.0/src/test/netfilter.c:48:43: [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(target.u.user.name, target_name, strlen(target_name) - 1); data/rr-5.4.0/src/test/nsutils.h:48:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(0 == read(child_block[0], &ch, 1)); data/rr-5.4.0/src/test/orphan_process.c:16:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int n = read(pipe_fds[0], &buf, 1); data/rr-5.4.0/src/test/perf_event.c:16:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(counter_fd, &nr_desched, sizeof(nr_desched))); data/rr-5.4.0/src/test/pidfd.c:17:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/poll_sig_race.c:23:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(250000); data/rr-5.4.0/src/test/poll_sig_race.c:38:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pfd.fd, &c, 1)); data/rr-5.4.0/src/test/ppoll.c:47:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/rr-5.4.0/src/test/prctl_deathsig.c:39:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(grandchild_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/prctl_deathsig.c:52:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(grandchild_to_main_fds[0], &ch, 1)); data/rr-5.4.0/src/test/prctl_name.c:66:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(initial_name, basename, sizeof(initial_name) - 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:64: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). RTA_ALIGN(strlen(interface_kind)) + RTA_ALIGN(strlen(iface1_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:64:55: [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). RTA_ALIGN(strlen(interface_kind)) + RTA_ALIGN(strlen(iface1_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:68:33: [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). RTA_ALIGN(strlen(iface0_name) + 1) + total_encoded_size; data/rr-5.4.0/src/test/privileged_net_ioctl.c:85:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(iface0_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:89:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(interface_kind)); data/rr-5.4.0/src/test/privileged_net_ioctl.c:94:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(iface1_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:115:40: [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(&req.ifr_name, iface0_name, strlen(iface0_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:127:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, bridge_name, sizeof(buf)); data/rr-5.4.0/src/test/privileged_net_ioctl.c:135:40: [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(&req.ifr_name, iface0_name, strlen(iface0_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:139:40: [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(&req.ifr_name, bridge_name, strlen(bridge_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:149:40: [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(&req.ifr_name, iface1_name, strlen(iface1_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:182:40: [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(&req.ifr_name, iface0_name, strlen(iface0_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:186:40: [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(&req.ifr_name, bridge_name, strlen(bridge_name) + 1); data/rr-5.4.0/src/test/privileged_net_ioctl.c:193:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, bridge_name, sizeof(buf)); data/rr-5.4.0/src/test/proc_mem.c:87:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/pthread_rwlocks.c:31:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_attach_thread_running.c:9:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_breakpoint.c:32:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/ptrace_change_patched_syscall.c:20:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_change_patched_syscall.c:22:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_change_patched_syscall.c:26:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(child_to_parent_fds[1], &ch, 1)); data/rr-5.4.0/src/test/ptrace_change_patched_syscall.c:31:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(child_to_parent_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_change_patched_syscall.c:63:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(child_to_parent_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_exec.c:12:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, buf, size); data/rr-5.4.0/src/test/ptrace_exec.c:39: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). i += strlen(buf + i) + 1; data/rr-5.4.0/src/test/ptrace_kill_grandtracee.c:20:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_seize.c:21:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_seize.c:31:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(child_to_parent_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_sigchld_blocked.c:16:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_signals.c:28:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/ptrace_sysemu.c:64:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_sysemu.c:80:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/ptrace_trace_clone.c:27:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_trace_exit.c:17:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_traceme.c:20:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_traceme.c:23:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptrace_traceme.c:29:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(child_to_parent_fds[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death.c:20:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(ready_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death.c:50:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(status_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death_multithread.c:22:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(tid) == read(tid_pipe[0], &tid, sizeof(tid))); data/rr-5.4.0/src/test/ptracer_death_multithread.c:29:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(thread_wait_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death_multithread.c:45:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(ready_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death_multithread.c:110:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(status_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death_multithread_peer.c:25:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(tid) == read(tid_pipe[0], &tid, sizeof(tid))); data/rr-5.4.0/src/test/ptracer_death_multithread_peer.c:32:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(thread_wait_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death_multithread_peer.c:51:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(ready_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/ptracer_death_multithread_peer.c:115:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(status_pipe[0], &ch, 1)); data/rr-5.4.0/src/test/quotactl.c:24:11: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. ret = sscanf(mount_line, "%*d %*d %d:%d %*s %*s %*s %*s - %*s %1000s %*s", data/rr-5.4.0/src/test/quotactl.c:28:7: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. sscanf(mount_line, "%*d %*d %d:%d %*s %*s %*s - %*s %1000s %*s", &maj, data/rr-5.4.0/src/test/read_large.c:37:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(read(fd, buf2, sizeof(buf2)) == sizeof(buf2)); data/rr-5.4.0/src/test/read_large.c:40:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(read(fd, buf2, sizeof(buf2)) == EXTRA); data/rr-5.4.0/src/test/read_large.c:41:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(read(fd, buf2, sizeof(buf2)) == 0); data/rr-5.4.0/src/test/read_nothing.c:16:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(-1 == read(pipe_fds[0], buf, SIZE)); data/rr-5.4.0/src/test/readlink.c:31: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). test_assert((ssize_t)strlen(path) == readlink(link, buf2, BUF2_SIZE)); data/rr-5.4.0/src/test/readlink.c:32:39: [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). test_assert(0 == memcmp(path, buf2, strlen(path))); data/rr-5.4.0/src/test/reverse_continue_multiprocess.c:29:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(parent_to_child[0], &ch, 1) && ch == 'y'); data/rr-5.4.0/src/test/reverse_continue_multiprocess.c:38:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(child_to_parent[0], &ch, 1) && ch == 'x'); data/rr-5.4.0/src/test/reverse_step_long.c:33:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(STDIN_FILENO, &ch, 1); data/rr-5.4.0/src/test/reverse_step_threads_break.c:34:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(main_to_thread_fds[0], &ch, 1)); data/rr-5.4.0/src/test/robust_futex.c:52:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/save_data_fd.c:14:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/test/scm_rights.c:61:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, &zero, sizeof(zero)); data/rr-5.4.0/src/test/scm_rights.c:94:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/scratch_read.c:21:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, buf, scratch_size); data/rr-5.4.0/src/test/seccomp.c:123:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &buf, 1)); data/rr-5.4.0/src/test/seccomp.c:172:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/seccomp.c:174:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/seccomp_signals.c:53:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/seccomp_tsync.c:29:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &buf, 1)); data/rr-5.4.0/src/test/sendfile.c:15:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/test/set_tid_address.c:11:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/set_tid_address.c:46:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/sigchld_interrupt_signal.c:13:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rr-5.4.0/src/test/sighandler_fork.c:18:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rr-5.4.0/src/test/sighandler_fork.c:22:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/rr-5.4.0/src/test/sighandler_mask.c:14:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &ch, 1)); data/rr-5.4.0/src/test/signalfd.c:18:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(sizeof(si) == read(fd, &si, sizeof(si))); data/rr-5.4.0/src/test/sigprocmask_in_syscallbuf_sighandler.c:35:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &buf, 1)); data/rr-5.4.0/src/test/sigprocmask_in_syscallbuf_sighandler.c:37:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &buf, 1)); data/rr-5.4.0/src/test/sigprocmask_syscallbuf.c:26:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(pipe_fds[0], &buf, 1)); data/rr-5.4.0/src/test/sock_names_opts.c:20:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(clientfd, &c, 1)); data/rr-5.4.0/src/test/sock_names_opts.c:42:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(addr.sun_path, "socket.unix", sizeof(addr.sun_path) - 1); data/rr-5.4.0/src/test/spinlock_priorities.c:16:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(high_to_low[0], &ch, 1)); data/rr-5.4.0/src/test/spinlock_priorities.c:32:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(low_to_high[0], &ch, 1)); data/rr-5.4.0/src/test/splice.c:14:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/test/stack_growth_after_syscallbuf.c:24:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/stack_growth_after_syscallbuf.c:25:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/stack_growth_syscallbuf.c:13:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(8 == read(fd, ch, 8)); data/rr-5.4.0/src/test/switch_read.c:22:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(readsock, &c, sizeof(c))); data/rr-5.4.0/src/test/switch_read.c:49:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(500000); data/rr-5.4.0/src/test/syscall_in_writable_mem.c:20: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(p); data/rr-5.4.0/src/test/syscallbuf_signal_blocking_read.c:15:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, buf, 100 * 1024 * 1024); data/rr-5.4.0/src/test/syscallbuf_signal_reset.c:21:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, &ch, 1); data/rr-5.4.0/src/test/syscallbuf_sigstop.c:12:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, &ch, 1)); data/rr-5.4.0/src/test/syscallbuf_timeslice.c:16:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/test/syscallbuf_timeslice2.c:12:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, buf, sizeof(buf)); data/rr-5.4.0/src/test/sysconf_onln.c:29:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t nread = read(fd, &result, sizeof(result)); data/rr-5.4.0/src/test/sysconf_onln.c:31:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nread = read(fd, &result, sizeof(result)); data/rr-5.4.0/src/test/timerfd.c:24:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/rr-5.4.0/src/test/timerfd.c:32:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, &num_expirations, sizeof(num_expirations)); data/rr-5.4.0/src/test/unexpected_exit.c:53:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(child_to_parent[0], &cc, 1); data/rr-5.4.0/src/test/unexpected_exit_execve.c:57:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(child_to_parent[0], &cc, 1); data/rr-5.4.0/src/test/unexpected_exit_execve_twice.c:57:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(child_to_parent[0], &cc, 1); data/rr-5.4.0/src/test/unexpected_exit_pid_ns.c:41:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(child_to_parent[0], &cc, 1); data/rr-5.4.0/src/test/unexpected_exit_pid_ns.c:64:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(child_to_parent[0], &cc, 1); data/rr-5.4.0/src/test/unshare.c:104:38: [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). test_assert(0 == sethostname(name, strlen(name))); data/rr-5.4.0/src/test/unshare.c:112:40: [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). test_assert(0 == setdomainname(name, strlen(name))); data/rr-5.4.0/src/test/unshare.c:133: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). test_assert((ssize_t)strlen(buf) == write(fd, buf, strlen(buf))); data/rr-5.4.0/src/test/unshare.c:133:54: [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). test_assert((ssize_t)strlen(buf) == write(fd, buf, strlen(buf))); data/rr-5.4.0/src/test/unshare.c:143:26: [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). test_assert((ssize_t)strlen(buf) == write(fd, buf, strlen(buf))); data/rr-5.4.0/src/test/unshare.c:143: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). test_assert((ssize_t)strlen(buf) == write(fd, buf, strlen(buf))); data/rr-5.4.0/src/test/unshare.c:150: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). test_assert((ssize_t)strlen(buf) == write(fd, buf, strlen(buf))); data/rr-5.4.0/src/test/unshare.c:150:54: [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). test_assert((ssize_t)strlen(buf) == write(fd, buf, strlen(buf))); data/rr-5.4.0/src/test/util.h:325:19: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. int nparsed = sscanf( data/rr-5.4.0/src/test/util.h:334: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). int last_char = strlen(line) - 1; data/rr-5.4.0/src/test/vfork_read_clone_stress.c:34:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd, (void*)buf, scratch_size); data/rr-5.4.0/src/test/wait.c:14:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100); data/rr-5.4.0/src/test/wait.c:24:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100); data/rr-5.4.0/src/test/wait.c:34:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100); data/rr-5.4.0/src/test/watchpoint_syscall.c:22:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). test_assert(1 == read(fd, p, 1)); data/rr-5.4.0/src/test/write_race.c:17: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). write(1, buf, strlen(buf)); data/rr-5.4.0/src/test/x86/ptrace_debug_regs.c:22:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipe_fds[0], &ch, 1); data/rr-5.4.0/src/test/xattr.c:19: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). buf += strlen(buf) + 1; data/rr-5.4.0/src/test/zero_length_read.c:10:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t count = read(STDIN_FILENO, &buf[0], 0); data/rr-5.4.0/src/util.cc:1145:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, elf_header, sizeof(elf_header)) != sizeof(elf_header) || data/rr-5.4.0/src/util.cc:1317:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t bytes_read = read(src_fd, buf, sizeof(buf)); data/rr-5.4.0/src/util.cc:1579:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, o, out_len); ANALYSIS SUMMARY: Hits = 1251 Lines analyzed = 133820 in approximately 5.31 seconds (25197 lines/second) Physical Source Lines of Code (SLOC) = 101184 Hits@level = [0] 254 [1] 325 [2] 784 [3] 49 [4] 77 [5] 16 Hits@level+ = [0+] 1505 [1+] 1251 [2+] 926 [3+] 142 [4+] 93 [5+] 16 Hits/KSLOC@level+ = [0+] 14.8739 [1+] 12.3636 [2+] 9.15164 [3+] 1.40338 [4+] 0.919118 [5+] 0.158128 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.