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/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c Examining data/freebsd-libs-10.3~svn296373/lib/libcam/scsi_cmdparse.c Examining data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h Examining data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c Examining data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.h Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/_libdwarf.h Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf.h Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_abbrev.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_attr.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_attrval.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_cu.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_dealloc.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_die.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_dump.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_errmsg.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_errno.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_finish.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_form.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_func.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_init.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_loc.c Examining data/freebsd-libs-10.3~svn296373/lib/libdwarf/libdwarf.h Examining data/freebsd-libs-10.3~svn296373/lib/libelf/_libelf.h Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_begin.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_cntl.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_data.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_end.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_errmsg.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_errno.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_fill.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_flag.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_getarhdr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_getarsym.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_getbase.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_getident.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_hash.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_kind.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_memory.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_next.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_phnum.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_rand.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_rawfile.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_scn.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_shnum.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_shstrndx.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_strptr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_update.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/elf_version.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf.h Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_cap.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_checksum.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_dyn.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_ehdr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_fsize.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_getclass.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_move.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_phdr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_rel.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_rela.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_shdr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_sym.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_syminfo.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_symshndx.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_xlate.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf.h Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_align.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_allocate.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_ar.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_ar_util.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_checksum.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_data.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_ehdr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_extended.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_phdr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_shdr.c Examining data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_xlate.c Examining data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_ctl.c Examining data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_getxml.c Examining data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_stats.c Examining data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_util.c Examining data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_xml2tree.c Examining data/freebsd-libs-10.3~svn296373/lib/libgeom/libgeom.h Examining data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_addr.c Examining data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_ntoa.c Examining data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c Examining data/freebsd-libs-10.3~svn296373/lib/libjail/jail.h Examining data/freebsd-libs-10.3~svn296373/lib/libjail/jail_getid.c Examining data/freebsd-libs-10.3~svn296373/lib/libkiconv/kiconv_sysctl.c Examining data/freebsd-libs-10.3~svn296373/lib/libkiconv/quirks.c Examining data/freebsd-libs-10.3~svn296373/lib/libkiconv/quirks.h Examining data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_iconv.c Examining data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_sysctl.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_amd64.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_arm.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_cptime.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_file.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_getloadavg.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_getswapinfo.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_i386.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_minidump_amd64.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_minidump_arm.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_minidump_i386.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_minidump_mips.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_mips.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_pcpu.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_powerpc64.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_private.h Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_sparc.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_sparc64.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_vnet.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_proc.c Examining data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.h Examining data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat.c Examining data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat_all.c Examining data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat_internal.h Examining data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat.h Examining data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat_malloc.c Examining data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat_uma.c Examining data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c Examining data/freebsd-libs-10.3~svn296373/lib/libnetgraph/internal.h Examining data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c Examining data/freebsd-libs-10.3~svn296373/lib/libnetgraph/sock.c Examining data/freebsd-libs-10.3~svn296373/lib/libnetgraph/netgraph.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb01.c Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_desc.c Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_io.c Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20.c Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_desc.c Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_int.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb_global_linux.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/usb.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_desc.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb.h Examining data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10.c Examining data/freebsd-libs-10.3~svn296373/lib/libusbhid/data.c Examining data/freebsd-libs-10.3~svn296373/lib/libusbhid/descr.c Examining data/freebsd-libs-10.3~svn296373/lib/libusbhid/descr_compat.c Examining data/freebsd-libs-10.3~svn296373/lib/libusbhid/parse.c Examining data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c Examining data/freebsd-libs-10.3~svn296373/lib/libusbhid/usbhid.h Examining data/freebsd-libs-10.3~svn296373/lib/libusbhid/usbvar.h Examining data/freebsd-libs-10.3~svn296373/lib/libutil/_secure_path.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/auth.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/expand_number.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/flopen.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/hexdump.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/humanize_number.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getallproc.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getfile.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getproc.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getvmmap.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getvmobject.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/kld.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_auth.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.h Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_crypt.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_ok.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_times.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_tty.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/property.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/pty.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/stub.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/tests/flopen_test.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/tests/grp_test.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/tests/humanize_number_test.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/tests/pidfile_test.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/tests/trimdomain-nodomain_test.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/tests/trimdomain_test.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/trimdomain.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c Examining data/freebsd-libs-10.3~svn296373/lib/libutil/libutil.h Examining data/freebsd-libs-10.3~svn296373/lib/libutil/fparseln.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_all.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_da.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_pmp.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/cam.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/cam_periph.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/cam_queue.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/cam_sim.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_cmd_table.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_error.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_ioctl.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_ha.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_scsi_all.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_ser_table.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc_local.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/ctl/scsi_ctl.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_safte.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_low.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_pass.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_pt.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sg.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_targ_bh.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_target.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c Examining data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c Examining data/freebsd-libs-10.3~svn296373/sys/kern/subr_sbuf.c Examining data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias.h Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_cuseeme.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_db.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_dummy.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_irc.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_local.h Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_mod.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_mod.h Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_nbt.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_pptp.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.h Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_skinny.c Parsing failed to find end of parameter list; semicolon terminated it in (stderr, "PacketAlias/Skinny: received a" " packet,StartMediaTx Message before" " packet,OpnRcvChnAckMsg\n" #endif return; } #ifdef LIBALIAS_DEBUG fprintf(stderr, Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c Examining data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_util.c Examining data/freebsd-libs-10.3~svn296373/sys/netipx/ipx.h Examining data/freebsd-libs-10.3~svn296373/sys/sys/sbuf.h FINAL RESULTS: data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:323:6: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (chmod(tempname, 0644) != 0) data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:481:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dev_path, "/dev/%s%d", ccb.cgdl.periph_name, data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h:154: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, (2), (3)))); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h:159: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, (3), (4)))); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h:172: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, (2), (3)))); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_addr.c:192:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. (void)sscanf(bp, fmt, hp); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_addr.c:197:8: [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. (void)sscanf(buf, fmt, hp); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:175: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(valarg, jp[i].jp_value); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:180: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(valarg, value); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:821: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(values[i], valbuf); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:829:4: [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(tvalue, values[i]); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:880:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", name); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:901: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, nname); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:903:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(desc.s, sizeof(desc.s), SJPARAM ".%s", name); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:1041:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(nname, "%.*s.no%s", (int)(p - name), name, p + 1); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:1043:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(nname, "no%s", name); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:1065:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(nname, "%.*s.%s", (int)(p - name), name, p + 3); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:1067: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(nname, name + 2); data/freebsd-libs-10.3~svn296373/lib/libjail/jail_getid.c:60:2: [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(jiov[1].iov_base, name); data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_sysctl.c:61:2: [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(din.ia_from, from); data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_sysctl.c:62:2: [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(din.ia_to, to); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:101:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr, fmt, ap); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:104: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. (void)vsnprintf(kd->errbuf, data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:119:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)vfprintf(stderr, fmt, ap); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:124: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. (void)vsnprintf(cp, sizeof(kd->errbuf), fmt, ap); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:128:2: [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(ascii->data, args); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/netgraph.h:52:74: [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. int NgNameNode(int, const char *, const char *, ...) __attribute((format(printf, (3), (4)))); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/netgraph.h:54:78: [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. int NgSendAsciiMsg(int, const char *, const char *, ...) __attribute((format(printf, (3), (4)))); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/sock.c:193:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(ngn.name, sizeof(ngn.name), fmt, args); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:215:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(pdev->usb_desc, sizeof(pdev->usb_desc), data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c:190:4: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(b, data/freebsd-libs-10.3~svn296373/lib/libutil/_secure_path.c:72:2: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. syslog(LOG_ERR, msg, "_secure_path", path, uid); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:63: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(group_dir, _PATH_ETC); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:69: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(group_dir, dir); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:74:4: [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(group_file, _PATH_GROUP); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:85: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(group_file, group); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:431:14: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. line_size = snprintf(NULL, 0, group_line_format, gr->gr_name, data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:443:7: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. p += sprintf(p, group_line_format, gr->gr_name, gr->gr_passwd, data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c:73:6: [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). p = strcpy(internal_string, str); data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c:76:20: [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). internal_string = strcpy(p, str); data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c:286:6: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. syslog(LOG_ERR, msg, "login_getclass", name); data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:107:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name_cur, "%s-cur", lr->what); data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:108:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(name_max, "%s-max", lr->what); data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:164:10: [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). p = strcpy(np, var); data/freebsd-libs-10.3~svn296373/lib/libutil/pty.c:81: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, slavename); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:101: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(passwd_dir, _PATH_ETC); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:107: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(passwd_dir, dir); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:112:4: [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(masterpasswd, _PATH_MASTERPASSWD); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:123: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(masterpasswd, master); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:261:4: [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(_PATH_PWD_MKDB, "pwd_mkdb", "-p", data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:264:4: [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(_PATH_PWD_MKDB, "pwd_mkdb", "-p", data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:318: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(editor, basename(editor), tempname, (char *)NULL); data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:85:2: [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(buf, fs->fs_mntops); data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:75:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)snprintf(lcktmpname, sizeof(lcktmpname), _PATH_UUCPLOCK LOCKTMP, data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:77:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)snprintf(lckname, sizeof(lckname), _PATH_UUCPLOCK LOCKFMT, data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:134:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(lckname, sizeof(lckname), _PATH_UUCPLOCK LOCKFMT, tty_name); data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:154:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)snprintf(tbuf, sizeof(tbuf), _PATH_UUCPLOCK LOCKFMT, tty_name); data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:195:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void)snprintf(errbuf, sizeof(errbuf), fmt, strerror(errno)); data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:661:6: [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(ccb->cgdl.periph_name, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:3689:2: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:847:23: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. msg->port.name_len = sprintf(&msg->port.data[i], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:108:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf("cbb(%s:%d): " fmt, __FUNCTION__, __LINE__, ##args) data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc.c:636:2: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:206:22: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. #define SAMINOR(ctl, access) \ data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:207:17: [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. ((ctl << 4) | (access & 0x3)) data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:381:1: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(const char *fmt, ...) data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:387:11: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. retval = vprintf(fmt, ap); data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:394:1: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(const char *fmt, va_list ap) data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:488:1: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(char *buf, const char *cfmt, ...) data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:504:1: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf(char *buf, const char *cfmt, va_list ap) data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:517:1: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(char *str, size_t size, const char *format, ...) data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:523:11: [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. retval = vsnprintf(str, size, format, ap); data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:532:1: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(char *str, size_t size, const char *format, va_list ap) data/freebsd-libs-10.3~svn296373/sys/kern/subr_sbuf.c:589: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(&s->s_buf[s->s_len], SBUF_FREESPACE(s) + 1, data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_db.c:470:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(str, LIBALIAS_BUF_SIZE, format, ap); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_db.c:480:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stream, format, ap); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:577:2: [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(buffer, cmd); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:655:4: [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(str_port, token); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:678:10: [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. n = sscanf(token, "%s %s", s, str_server_port); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:761:10: [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. n = sscanf(token, "%s %d", s, &nbits); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.c:2682:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, LIBALIAS_BUF_SIZE, format, ap); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.c:2694:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stream, format, ap); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_skinny.c:424:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/freebsd-libs-10.3~svn296373/sys/sys/sbuf.h:83:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute((format(printf, (2), (3)))); data/freebsd-libs-10.3~svn296373/sys/sys/sbuf.h:85:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute((format(printf, (2), (0)))); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10.c:116:10: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. debug = getenv("LIBUSB_DEBUG"); data/freebsd-libs-10.3~svn296373/lib/libutil/login_crypt.c:42:6: [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("CRYPT_DEBUG") != NULL) data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:294: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. if ((editor = getenv("EDITOR")) == NULL) data/freebsd-libs-10.3~svn296373/lib/libutil/stub.c:43:6: [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("CRYPT_DEBUG") != NULL) data/freebsd-libs-10.3~svn296373/lib/libutil/tests/humanize_number_test.c:408:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "nEh?vl:")) != -1) { data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:51: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 cam_errbuf[CAM_ERRBUF_SIZE]; data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:226: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). *unit = atoi(&tmpstr[strlen(tmpstr) - unit_offset]); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:252:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dev_name[DEV_IDLEN + 1]; data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:277: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). if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:321:2: [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(match_pat->periph_name, "pass"); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:368: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 dev_path[256]; data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:376: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(dev_path, "/dev/pass%d", pass_unit); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:415:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dev_path[256]; data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:423: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). if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:443: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 tmpstr[256]; data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:537: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). if ((fd = open(path, flags)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:614:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&ccb.cgd.inq_data, &device->inq_data, data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:617:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&ccb.cgd.serial_num, &device->serial_num, device->serial_num_len); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:727:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(device, newdev, sizeof(struct cam_device)); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:752:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(src, dst, sizeof(struct cam_device)); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_path[MAXPATHLEN];/* data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h:93:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char given_dev_name[DEV_IDLEN+1];/* data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h:101:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_name[DEV_IDLEN+1];/* data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.h:110:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sim_name[SIM_IDLEN+1]; /* Controller name, e.g. 'ahc' */ data/freebsd-libs-10.3~svn296373/lib/libcam/scsi_cmdparse.c:118:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char field_name[80]; data/freebsd-libs-10.3~svn296373/lib/libcam/scsi_cmdparse.c:259:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(databuf, dest, width); data/freebsd-libs-10.3~svn296373/lib/libcam/scsi_cmdparse.c:551:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char field_name[80]; data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:66: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 devstat_errbuf[DEVSTAT_ERRBUF_SIZE]; data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:637:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(*dev_select, old_dev_select, data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:670: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 tmpstr[80]; data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:1026:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tstr[5]; data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:1641:2: [2] (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, &gen, sizeof(gen)); data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:1661: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(rv + wp, &ds, sizeof(ds)); data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.h:123:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device_name[DEVSTAT_NAME_LEN]; data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_attrval.c:58:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(av, avref, sizeof(struct _Dwarf_AttrValue)); data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_init.c:33: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 *debug_snames[DWARF_DEBUG_SNAMES] = { data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_init.c:650: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(&dbg->dbg_s[i].s_shdr, &shdr, sizeof(shdr)); data/freebsd-libs-10.3~svn296373/lib/libdwarf/libdwarf.h:104:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char err_msg[1024]; /* Formatted error message. */ data/freebsd-libs-10.3~svn296373/lib/libelf/_libelf.h:51:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char libelf_msg[LIBELF_MSG_SIZE]; data/freebsd-libs-10.3~svn296373/lib/libelf/elf_update.c:640: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. (void) memcpy(nf + rc, data/freebsd-libs-10.3~svn296373/lib/libelf/gelf_ehdr.c:68:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(d->e_ident, eh32->e_ident, sizeof(eh32->e_ident)); data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_ctl.c:211: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). fd = open(_PATH_DEV PATH_GEOM_CTL, O_RDONLY); data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_stats.c:88: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). statsfd = open(_PATH_DEV DEVSTAT_DEVICE_NAME, O_RDONLY); data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_stats.c:134:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sp->ptr, statp, pagesize * npages); data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_util.c:148:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXPATHLEN]; data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_util.c:184:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lident[DISK_IDENT_SIZE]; data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_util.c:220:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lident[DISK_IDENT_SIZE]; data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_util.c:286: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(devpath, dowrite ? O_RDWR : O_RDONLY); data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_util.c:314: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, dowrite ? O_RDWR : O_RDONLY); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_addr.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[50]; data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_ntoa.c:48: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. static char obuf[40]; data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_ntoa.c:57:2: [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(obuf, "%lx", (u_long)ntohl(net.long_e)); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_ntoa.c:63:4: [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(cp, ".0"); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_ntoa.c:67: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(cp, ".%x", *up++); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_ntoa.c:70:4: [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(cp, "%02x", *up++); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_ntoa.c:75: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(cp, ".%x", port); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:63: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 jail_errmsg[JAIL_ERRMSGLEN]; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:205:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MAXPATHLEN]; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:234: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(mib1 + 2, mib2, mlen2); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:730:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char valbuf[INET6_ADDRSTRLEN]; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:865:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[MAXPATHLEN]; data/freebsd-libs-10.3~svn296373/lib/libjail/jail_getid.c:81:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[MAXHOSTNAMELEN]; data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_iconv.c:116: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, xt.idx, idxsize); data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_iconv.c:118:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, xt.data, xt.size); data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_iconv.c:291:4: [2] (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, table, sizeof(table)); data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_sysctl.c:60:2: [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(din.ia_converter, "xlat16"); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:169: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). if ((kd->pmfd = open(mf, flag | O_CLOEXEC, 0)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:190: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). kd->vmfd = open(_PATH_DEVNULL, O_RDONLY | O_CLOEXEC); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:193: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). if ((kd->vmfd = open(_PATH_KMEM, flag | O_CLOEXEC)) < data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:206: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). if ((kd->nlfd = open(uf, O_RDONLY | O_CLOEXEC, 0)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:329:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(p, np, sizeof(struct nlist)); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:393:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char symname[1024]; /* XXX-BZ symbol name length limit? */ data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.h:62:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ksw_devname[32]; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_amd64.c:156:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char minihdr[8]; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_arm.c:133:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char minihdr[8]; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_i386.c:163:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char minihdr[8]; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_mips.c:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char minihdr[8]; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_private.h:45:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errbuf[_POSIX2_LINE_MAX]; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_proc.c:133:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char svname[KI_EMULNAMELEN]; data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat_internal.h:44:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mt_name[MEMTYPE_MAXNAME]; /* name of memory type. */ data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat_malloc.c:286:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MEMTYPE_MAXNAME]; data/freebsd-libs-10.3~svn296373/lib/libmemstat/memstat_uma.c:305:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[MEMTYPE_MAXNAME]; data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:268:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(bin, msg, sizeof(*msg) + arglen); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:327:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:210:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(msg->data, args, arglen); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:339:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(reply, msg, sizeof(*msg)); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/sock.c:64:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[NG_NODESIZ]; data/freebsd-libs-10.3~svn296373/lib/libusb/libusb01.c:336: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(ps->b.currextra, ptr, len); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10.c:118:16: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ctx->debug = atoi(debug); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_desc.c:193: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(pextra, pconf->extra.ptr, pconfd->extra_length); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_desc.c:233:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pextra, pinf->extra.ptr, pinf->extra.len); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_desc.c:250:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pextra, pend->extra.ptr, pend->extra.len); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20.h:193:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char quirkname[64 - 12]; data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_desc.c:140:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)(lub_endpoint + nendpoint), config_desc, pcdesc.len); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_desc.c:523:7: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(src_ptr, buf, src_len); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_int.h:236:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char usb_desc[96]; data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:138:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:148:6: [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). f = open(buf, O_RDWR); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:282: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). state.f = open("/dev/" USB_DEVICE_NAME, O_RDONLY); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:372:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:385:6: [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). g = open(buf, O_RDWR); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:389:6: [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). f = open(buf, O_RDWR); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:501:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, &cdesc, sizeof(cdesc)); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:662:2: [2] (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, udpp.udp_port_no, udpp.udp_port_level); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:919:6: [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). f = open("/dev/" USB_DEVICE_NAME, O_RDONLY); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb_global_linux.h:74: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 *)d)[(len) - 1] = 0; \ data/freebsd-libs-10.3~svn296373/lib/libusb/usb.h:230:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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 + 1]; data/freebsd-libs-10.3~svn296373/lib/libusb/usb.h:249:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dirname[PATH_MAX + 1]; data/freebsd-libs-10.3~svn296373/lib/libusbhid/descr.c:143:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. if (((unsigned char *)data)[ugd.ugd_actlen -1] != 0xC0) { data/freebsd-libs-10.3~svn296373/lib/libusbhid/descr.c:167:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(r->data, data, size); data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c:77:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[100], name[100], *p, *n; data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c:85:6: [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(hidname, "r"); data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c:161: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. static char b[10]; data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c:170:2: [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(b, "0x%04x", i); data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c:179: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. static char b[100]; data/freebsd-libs-10.3~svn296373/lib/libusbhid/usage.c:199:2: [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(b, "0x%04x", i); data/freebsd-libs-10.3~svn296373/lib/libutil/flopen.c:68: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). if ((fd = open(path, flags, mode)) == -1) data/freebsd-libs-10.3~svn296373/lib/libutil/fparseln.c:78: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 * data/freebsd-libs-10.3~svn296373/lib/libutil/fparseln.c:79:56: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. fparseln(FILE *fp, size_t *size, size_t *lineno, const char str[3], int flags) data/freebsd-libs-10.3~svn296373/lib/libutil/fparseln.c:81:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 dstr[3] = { '\\', '\\', '#' }; data/freebsd-libs-10.3~svn296373/lib/libutil/fparseln.c:161:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buf + len, ptr, s); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:48: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 group_dir[PATH_MAX]; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:49: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 group_file[PATH_MAX]; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:50: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 tempname[PATH_MAX]; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:128:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[8192]; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:167:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[8192], *end, *line, *p, *q, *r, t; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:333: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). if ((fd = open(group_dir, O_RDONLY|O_DIRECTORY)) == -1) data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getfile.c:67: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(kp, kf, kf->kf_structsize); data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getvmmap.c:67: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(kp, kv, kv->kve_structsize); data/freebsd-libs-10.3~svn296373/lib/libutil/kinfo_getvmobject.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(kp, kvo, kvo->kvo_structsize); data/freebsd-libs-10.3~svn296373/lib/libutil/libutil.h:142: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 *fparseln(FILE *_fp, size_t *_len, size_t *_lineno, data/freebsd-libs-10.3~svn296373/lib/libutil/libutil.h:143: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. const char _delim[3], int _flags); data/freebsd-libs-10.3~svn296373/lib/libutil/login_auth.c:99: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[BUFSIZ]; data/freebsd-libs-10.3~svn296373/lib/libutil/login_auth.c:101: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). if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0) data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c:199:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userpath[MAXPATHLEN]; data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c:242: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). else if ((r = open(login_dbarray[0], O_RDONLY | O_CLOEXEC)) >= 0) data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c:784: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 realauth[64]; data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:102:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_cur[40]; data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:103:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_max[40]; data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:263: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). curnum = atoi(l); data/freebsd-libs-10.3~svn296373/lib/libutil/login_times.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c:46:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pf_path[MAXPATHLEN + 1]; data/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c:73:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], *endptr; data/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c:76: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). fd = open(path, O_RDONLY | O_CLOEXEC); data/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c:176:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pidstr[16]; data/freebsd-libs-10.3~svn296373/lib/libutil/property.c:74: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 hold_n[PROPERTY_MAX_NAME + 1]; data/freebsd-libs-10.3~svn296373/lib/libutil/property.c:75: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 hold_v[PROPERTY_MAX_VALUE + 1]; data/freebsd-libs-10.3~svn296373/lib/libutil/property.c:76: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[BUFSIZ * 4]; data/freebsd-libs-10.3~svn296373/lib/libutil/pty.c:73: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). slave = open(slavename, O_RDWR); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:74: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 masterpasswd[PATH_MAX]; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:75: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 passwd_dir[PATH_MAX]; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:76: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 tempname[PATH_MAX]; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:213:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[8192]; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:431:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[8192], *end, *line, *p, *q, *r, t; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:615:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(npw, pw, sizeof(*npw)); data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fsname[MAXPATHLEN + 1]; /* mount point of filesystem */ data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:57:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char qfname[MAXPATHLEN + 1]; /* quota file if not using quotactl */ data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[BUFSIZ]; data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:72: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. static char initname, usrname[100], grpname[100]; data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:140: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). if ((qf->fd = open(qf->qfname, qf->accmode|O_CLOEXEC)) < 0 && data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:171: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). if ((qf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0)) < data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:538: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). if ((newqf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:51:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char trimmed[MAXHOSTNAMELEN]; data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:62:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lookup[MAXHOSTNAMELEN]; data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:102:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[NI_MAXHOST]; data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c: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(&lsin.sin_addr, &sin6->sin6_addr.s6_addr[12], data/freebsd-libs-10.3~svn296373/lib/libutil/tests/flopen_test.c:75: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). fd = open(fn, O_RDWR|O_CREAT, 0640); data/freebsd-libs-10.3~svn296373/lib/libutil/tests/flopen_test.c:133:7: [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() == 0) { data/freebsd-libs-10.3~svn296373/lib/libutil/trimdomain.c:58: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. static char domain[MAXHOSTNAMELEN]; data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:70:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lckname[sizeof(_PATH_UUCPLOCK) + MAXNAMLEN], data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:79: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). if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:92: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). if ((fd = open(lckname, O_RDONLY | O_CLOEXEC)) < 0) data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:132:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lckname[sizeof(_PATH_UUCPLOCK) + MAXNAMLEN]; data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:136: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). if ((fd = open(lckname, O_RDWR | O_CLOEXEC)) < 0) data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:152:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tbuf[sizeof(_PATH_UUCPLOCK) + MAXNAMLEN]; data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:161: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. static char errbuf[128]; data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:202:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:205:8: [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. len = sprintf (buf, "%10d\n", (int)pid); data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:213:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_all.c:219:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmd_str[(12 * 3) + 1]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_all.c:267:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char res_str[(11 * 3) + 1]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_all.c:279:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char product[48], revision[16], ata[12], sata[12]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_all.c:315:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char product[48], revision[16]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_all.c:327:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[9], product[17], revision[5], fw[5], in[7], ins[5]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_all.c:342:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[9], product[17], revision[5], fw[5]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_da.c:1094:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80], tmpstr2[80]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_da.c:1173:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char announce_buf[80], buf1[32]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_pmp.c:344:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80], tmpstr2[80]; data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:872:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:877:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:907:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&fake_device_id_hdr, data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:909:6: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ident_buf->wwn, data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1212:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1217:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1228:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&fake_device_id_hdr, data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1230:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(((uint8_t*)ident_buf) + 2, data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1670: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(cdai->buf, device->device_id, amt); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1681: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(cdai->buf, device->serial_num, amt); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1696:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(device->physpath, cdai->buf, cdai->bufsiz); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:1704:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cdai->buf, device->physpath, amt); data/freebsd-libs-10.3~svn296373/sys/cam/cam.c:290:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/cam.c:474:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/cam.c:487:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c:141:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccbb17, ccbb, CAM_0X17_DATA_LEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c:164:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccbb, ccbb17, CAM_0X17_DATA_LEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c:176:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&cpi->vuhba_flags[0], &cpi17->vuhba_flags[0], VUHBALEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c:182:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&cpi->sim_vid[0], &cpi17->sim_vid[0], SIM_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c:183:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&cpi->hba_vid[0], &cpi17->hba_vid[0], HBA_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c:184:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&cpi->dev_name[0], &cpi17->dev_name[0], DEV_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_compat.c:192:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&cpi->xport_specific, &cpi17->xport_specific, data/freebsd-libs-10.3~svn296373/sys/cam/cam_periph.c:125:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(periph_drivers, newdrivers, data/freebsd-libs-10.3~svn296373/sys/cam/cam_periph.c:557:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathbuf[32], *periph_name; data/freebsd-libs-10.3~svn296373/sys/cam/cam_periph.c:1036:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccb, addr, sizeof(union ccb)); data/freebsd-libs-10.3~svn296373/sys/cam/cam_periph.c:1225:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(saved_ccb, done_ccb, sizeof(*done_ccb)); data/freebsd-libs-10.3~svn296373/sys/cam/cam_periph.c:1497:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccb, orig_ccb, sizeof(*orig_ccb)); data/freebsd-libs-10.3~svn296373/sys/cam/cam_queue.c:140:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(queue->queue_array, new_array, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:474:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccb, inccb, sizeof(union ccb)); data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:504:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&ccb, inccb, sizeof(union ccb)); data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:1160:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(idd->identifier, buf, l); data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:1167:6: [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 + l * 2, "%02x", data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:1731:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&device->inq_data, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:1734:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&device->ident_data, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:2652:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(dev->serial_num, cgd->serial_num, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:3205:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:3335:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&(&slave_ccb->ccb_h)[1], &(&master_ccb->ccb_h)[1], data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:4013:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:4276: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(ccb->casync.async_arg_ptr, async_arg, size); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:702: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(&msg.scsi.sense_data, &io->scsiio.sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:731:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ctsio->sense_data, &msg_info->scsi.sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:793: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(&msg->lun.data[i], lun->lun_devid->data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:801: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(&msg->lun.data[i], &pr_key, sizeof(pr_key)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:852: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(&msg->port.data[i], port->lun_map, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:858: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(&msg->port.data[i], port->port_devid->data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:864: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(&msg->port.data[i], port->target_devid->data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:870: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(&msg->port.data[i], port->init_devid->data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:946:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(msg.mode.data, lun->mode_pages.index[i].page_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1035:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lun->ua_tpt_info, msg->ua.ua_info, 8); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1163: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(port->lun_map, &msg->port.data[i], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1177: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(port->port_devid->data, &msg->port.data[i], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1192: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(port->target_devid->data, &msg->port.data[i], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1207: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(port->init_devid->data, &msg->port.data[i], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1315:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lun->mode_pages.index[i].page_data, msg->mode.data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1387:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(io->scsiio.cdb, msg->scsi.cdb, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1500: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(&io->scsiio.sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1639:2: [2] (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->scsiio.sense_data, &src->scsi.sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:1650:2: [2] (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->scsi.sense_data, &src->scsiio.sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:2354:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(io->scsiio.cdb, entry->cdb, io->scsiio.cdb_len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:2820:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(err_desc, new_err_desc, sizeof(*new_err_desc)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3895:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.index, page_index_template, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3917:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_CURRENT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3920:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_CHANGEABLE], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3923:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_DEFAULT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3926:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_SAVED], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3944:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.format_page[CTL_PAGE_CURRENT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3947:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.format_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3950:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.format_page[CTL_PAGE_DEFAULT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3953:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.format_page[CTL_PAGE_SAVED], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:3999:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rigid_disk_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4002:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rigid_disk_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4050:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rigid_disk_page[CTL_PAGE_CURRENT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4053:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.rigid_disk_page[CTL_PAGE_SAVED], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4067:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4070:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.caching_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4073:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.caching_page[CTL_PAGE_SAVED], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4084:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4096: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(&lun->mode_pages.control_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4100: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(&lun->mode_pages.control_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4104: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(&lun->mode_pages.control_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4119: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(&lun->mode_pages.control_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4129: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(&lun->mode_pages.control_ext_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4133: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(&lun->mode_pages.control_ext_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4137: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(&lun->mode_pages.control_ext_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4141: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(&lun->mode_pages.control_ext_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4158: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(&lun->mode_pages.ie_page[CTL_PAGE_CURRENT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4161: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(&lun->mode_pages.ie_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4164: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(&lun->mode_pages.ie_page[CTL_PAGE_DEFAULT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4167: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(&lun->mode_pages.ie_page[CTL_PAGE_SAVED], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4176: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(&lun->mode_pages.lbp_page[CTL_PAGE_DEFAULT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4179: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(&lun->mode_pages.lbp_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4182: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(&lun->mode_pages.lbp_page[CTL_PAGE_SAVED], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4238: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(&lun->mode_pages.lbp_page[CTL_PAGE_CURRENT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4255:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.cddvd_page[CTL_PAGE_DEFAULT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4258:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.cddvd_page[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4261:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.cddvd_page[CTL_PAGE_SAVED], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4264:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->mode_pages.cddvd_page[CTL_PAGE_CURRENT], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4274: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(&lun->mode_pages.debugconf_subpage[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4278: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(&lun->mode_pages.debugconf_subpage[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4282: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(&lun->mode_pages.debugconf_subpage[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4286: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(&lun->mode_pages.debugconf_subpage[ data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4314:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&lun->log_pages.index, log_page_index_template, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:6628:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctsio->kern_data_ptr + data_used, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:6673:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctsio->kern_data_ptr + data_used, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:6897:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(header + 1, page_index->page_data, page_index->page_len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:7482:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&one->cdb_usage[1], entry->usage, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:7907:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(persis_io.pr.pr_info.sa_res_key, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:7977: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(persis_io.pr.pr_info.sa_res_key, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:8054:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(persis_io.pr.pr_info.sa_res_key, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:8091:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(persis_io.pr.pr_info.sa_res_key, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:8398:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(persis_io.pr.pr_info.sa_res_key, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:9333:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sense_ptr, &lun->pending_sense[initidx], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:9744: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(desc, lun->lun_devid->data, lun->lun_devid->len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:9753: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(desc, port->port_devid->data, port->port_devid->len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:9789: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(desc, port->target_devid->data, port->target_devid->len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:9876:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd->initiator_transportid, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:9885:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pdc->target_port_descriptors, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:11713: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(msg_info.scsi.cdb, ctsio->cdb, CTL_MAX_CDBLEN); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:12151:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char printbuf[128]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:12649: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 str[256]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:12650: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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:12748:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&msg.scsi.sense_data, &io->scsiio.sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:12853:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:12854:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:13183: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 str[256]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:13184: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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:13718: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(msg.ua.ua_info, lun->ua_tpt_info, 8); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend.c:202: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 *)args[i].kvalue)[0] != 0) { data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:154:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lunname[32]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:1352: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, io->scsiio.kern_data_ptr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2236:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char num_thread_str[16]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2237:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[32]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2255:2: [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(be_lun->lunname, "cblk%d", softc->num_luns); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:82:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lunname[32]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:500:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[32]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:511:2: [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(be_lun->lunname, "cram%d", softc->num_luns); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:77:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char port_name[32]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:401:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ctl_ptr, cam_ptr, len_to_copy); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:407:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(cam_ptr, ctl_ptr, len_to_copy); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:464:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&io->scsiio.sense_data, &ccb->csio.sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:590:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(csio->cdb_io.cdb_bytes, io->scsiio.cdb, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_ioctl.c:417:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(io, (void *)addr, sizeof(*io)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_ioctl.c:436:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)addr, io, sizeof(*io)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:536:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(io->scsiio.cdb, bhssc->bhssc_cdb, sizeof(bhssc->bhssc_cdb)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:1881:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ip->ip_bhs, cisp->bhs, sizeof(*ip->ip_bhs)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:2075:2: [2] (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->kern_args[0].kvalue, &port->targ_port, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:2832:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(bhstmr2->bhstmr_additional_reponse_information, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_ha.c:145:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ha_peer[128]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_ha.c:650:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_ha.c:785:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mtodo(mb, 0), &hdr, sizeof(hdr)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_ha.c:790: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(mtodo(mb, mb->m_len), (const char *)addr + off, copylen); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_ha.c:801: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(mtodo(mb, mb->m_len), (const char *)addr2 + off, copylen); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_scsi_all.c:88: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 unkstr[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_scsi_all.c:103:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_scsi_all.c:129:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_scsi_all.c:173:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_scsi_all.c:190:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c:659:2: [2] (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->sense_data, &list_copy.sense_data, list_copy.sense_len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c:745:2: [2] (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->sense_data, &list_copy.sense_data, list_copy.sense_len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c:1887: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(&cscd->codeset, idd, 4 + idd->length); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c:1903: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(&token->body[120], port->target_devid->data, targid_len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c:2253:2: [2] (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->sense_data, &list_copy.sense_data, list_copy.sense_len); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c:2259: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(&ptr[6], list_copy.res_token, sizeof(list_copy.res_token)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc.c:2324: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->rod_management_token_list[i * 96], data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc_local.c:230:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ext_ptr, kern_ptr, len_to_copy); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_tpc_local.c:236:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(kern_ptr, ext_ptr, len_to_copy); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c:735:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c:774:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c:838:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c:846:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c:855:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[128]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c:856:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_util.c:889:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/scsi_ctl.c:83:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char port_name[DEV_IDLEN]; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/scsi_ctl.c:1206:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(atio->cdb_io.cdb_bytes, io->scsiio.cdb, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3544: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 unkstr[64]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3565:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3800:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(data, &sense->sense_desc[ data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3815:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(data, &sks.sense_key_spec, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3891:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(descriptor, &sense->sense_desc[ data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3909:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&fru, &sense->sense_desc[ data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3926:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&stream_sense, &sense->sense_desc[ data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3985:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(data, &sense->sense_key_spec[0], data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:4392: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 tmpstr[40]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:4451: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 tmpstr[40]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:4977:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5055:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&csio->sense_data, &sense, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5138:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[512]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5185:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&ccb->csio.sense_data, &sense_data, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5325:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[16], product[48], revision[16], rstr[12]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5436:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[16], product[48], revision[16]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:6218:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(rdma_id, rdma->initiator_port_id, SCSI_TRN_RDMA_PORT_LEN); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:475:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80], tmpstr2[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:552:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:1052: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 announce_buf[120]; /* data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:1557:5: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(data, args->data, len); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:1590:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(th, addr, sizeof(*th)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:1793:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&data->entry, &te->entry, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:2483:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&ms10, cdb, 10); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:2525:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(params->mode_buf + sizeof(*header6), data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:2538:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&ms10, cdb, 10); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:3616:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(databuf + sizeof(struct scsi_read_dvd_struct_data_header), data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:1777:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80], tmpstr2[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:1967: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[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:2039:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:2073:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:2921:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(cdb, &cmd6, sizeof(struct scsi_rw_6)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:3096: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 announce_buf[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:3831:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(rcaplong, &softc->rcaplong, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc.c:606:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(cdb, ccb->csio.cdb_io.cdb_bytes, cdbl); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_safte.c:1012: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. static char cdb0[6] = { SEND_DIAGNOSTIC }; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:719:2: [2] (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->elm_map, src->elm_map, dst->nelms * sizeof(enc_element_t)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:725: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_elm->elm_private, src_elm->elm_private, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:851: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(devid->identifier, phy_addr, devid->length); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:900:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(device_pattern->data.devid_pat.id, devid, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2089:2: [2] (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[offset], &req->elm_stat, sizeof(struct ses_comstat)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2122:2: [2] (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, ses_cache->status_page, plength); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2630:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(elms->cstat, &enc->enc_cache.elm_map[i].encstat, 4); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2722:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cdb[6]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2723:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[32]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2724:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[9]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2725:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char product[17]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2726:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rev[5]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_enc_ses.c:2751: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[4], sstr->buf, sstr->bufsiz); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_low.c:4163:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cb->ccb_scsi_cmd, slp->sl_scp.scp_cmd, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_pass.c:145:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zone_name[12]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_pass.c:146:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char io_zone_name[12]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_pass.c:932:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(done_ccb, &io_req->ccb, sizeof(*done_ccb)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_pass.c:2209:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccb, inccb, sizeof(union ccb)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1146:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(sa_prot_table, new_table, min(table_ents * sizeof(*new_table), data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1222:2: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&softc->prot_info.cur_prot_state, &new_state, sizeof(new_state)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1743:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((caddr_t) &softc->last_io_sense, sep->io_sense, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1745:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((caddr_t) &softc->last_io_cdb, sep->io_cdb, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1748:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((caddr_t) &softc->last_ctl_sense, sep->ctl_sense, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1750:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((caddr_t) &softc->last_ctl_cdb, sep->ctl_cdb, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:2294:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80], tmpstr2[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:2341:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:3395:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((caddr_t) sense, (caddr_t) &softc->last_io_sense, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:3397:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(csio->cdb_io.cdb_bytes, softc->last_io_cdb, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:3402:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy((caddr_t) sense, (caddr_t) &softc->last_ctl_sense, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:3404:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(csio->cdb_io.cdb_bytes, softc->last_ctl_cdb, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:3649:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&mode_hdr[0], &mode_hdr[1], sizeof (sa_comp_t)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:3709:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ntcs, tcs, sizeof (sa_comp_t)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:3851:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(dp_page, prot_page, min(sizeof(*prot_page), data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:4127:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccomp, cpage, sizeof (sa_comp_t)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:4339:4: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(ccomp, cpage, sizeof (sa_comp_t)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:4381:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[80]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:5198:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[32]; \ data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sg.c:870:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(&csio->sense_data, hdr->sense_buffer, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:1334:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tlun, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:1336:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lp->luns[0].lundata, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:1338:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lp->luns[idx].lundata, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:1568: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(path->device->serial_num, data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:2495: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(cdai->buf, device->device_id, amt); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:2506: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(cdai->buf, device->serial_num, amt); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:2523:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(device->physpath, cdai->buf, cdai->bufsiz); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:2531:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cdai->buf, device->physpath, amt); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:2553:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(device->rcap_buf, cdai->buf, cdai->bufsiz); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:2561:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cdai->buf, device->rcap_buf, amt); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_xpt.c:2577: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(cdai->buf, device->ext_inq, amt); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c:258:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_str[64]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c:422:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[16], product[48], revision[16]; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c:423:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char comp_vendor[16]; data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:264:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bufr[PRINTF_BUFR_SIZE]; data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:625:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nbuf[MAXNBUF]; data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:944:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nbuf[MAXNBUF]; data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:1005:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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/freebsd-libs-10.3~svn296373/sys/kern/subr_sbuf.c:163:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newbuf, s->s_buf, s->s_size); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias.c:1646:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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], conf[] = "/etc/libalias.conf"; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias.c:1650: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). fd = fopen(conf, "r"); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_cuseeme.c:164:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char user_name [20]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_cuseeme.c:165:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reserved [4]; /* flags, version stuff, etc */ data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_cuseeme.c:171:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reserved [8]; /* Flags, pruning bitfield, packet data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_db.c:2218: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). if ((la->logDesc = fopen("/var/log/alias.log", "w"))) data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c:682:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char stemp[MAX_MESSAGE_SIZE + 1]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c:710:6: [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(stemp, "PORT %d,%d,%d,%d,%d,%d\r\n", data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c:714:6: [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(stemp, data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c:721: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(stemp, "EPRT |1|%d.%d.%d.%d|%d|\r\n", data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c:726: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(stemp, "229 Entering Extended Passive Mode (|||%d|)\r\n", data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_irc.c:435: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(sptr + copyat, newpacket, iCopy); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_mod.h:99:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[DLL_LEN]; /* Name of module. */ data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:295:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[40]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:314:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buffer, " \n"); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:343:3: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(p, p + slen, dlen); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:344: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, buffer, slen); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:407: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(ptr + OPTION_LEN_BYTES, ptr, ntohs(pip->ip_len) - 20); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:412: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(&option[2], (u_char *) & pip->ip_dst, 4); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:415: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(&option[6], (u_char *) & tc->th_sport, 2); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:417: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(ptr, option, 8); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:553:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[256]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:554:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_port[sizeof(buffer)]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:555:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_server_port[sizeof(buffer)]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:663: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 s[sizeof(buffer)]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:758:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[sizeof(buffer)]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.c:906:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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_ip[ip_size]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.c:981:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sm->ip_hdr, ip, ip_size); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.c:2653: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. static char buf[50]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_sctp.c:2679:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[LIBALIAS_BUF_SIZE]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_skinny.c:167:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char devName [16]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:247:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char newdata[2048], *port_data, *port_newdata, stemp[80]; data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:266:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newdata, data, pos); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:275: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(port_newdata, port_data, pos + 1); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:368:6: [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(stemp, "%d", ntohs(salias)); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:369:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(port_newdata, stemp, strlen(stemp)); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:377: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(stemp, "%d", ntohs(ealias)); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:378: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(port_newdata, stemp, strlen(stemp)); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:398:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(port_newdata, port_data, port_dlen); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:404:2: [2] (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, newdata, new_dlen); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:445: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(&msg_id, work, 2); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:447: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(&msg_len, work, 2); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:454:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&port, work, 2); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:464: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(work, &alias_port, 2); data/freebsd-libs-10.3~svn296373/sys/netipx/ipx.h:157:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sipx_zero[2]; data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:160:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(nonrewind_devs[i]); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:175:6: [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(tmpstr) < 2) { data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:200: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). if (!isdigit(tmpstr[strlen(tmpstr) - 1])) { data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:218: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). (unit_offset < (strlen(tmpstr))) data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:219: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). && (isdigit(tmpstr[strlen(tmpstr) - unit_offset])); unit_offset++); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:226: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). *unit = atoi(&tmpstr[strlen(tmpstr) - unit_offset]); data/freebsd-libs-10.3~svn296373/lib/libcam/camlib.c:232: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). tmpstr[strlen(tmpstr) - unit_offset] = '\0'; data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:286:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buflen = strlen(devstat_errbuf); data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:300: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). buflen = strlen(devstat_errbuf); data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:647:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*dev_select)[i].device_name, data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:1088: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). tempstr3 = &tempstr2[strlen(tempstr2) - 1]; data/freebsd-libs-10.3~svn296373/lib/libdevstat/devstat.c:1110:8: [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(match_table[j].match_str)) == 0) { data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_dump.c:841:11: [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). indx += strlen(name) + 1; data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_dump.c:854:11: [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). indx += strlen(name) + 1; data/freebsd-libs-10.3~svn296373/lib/libdwarf/dwarf_dump.c:867:11: [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). indx += strlen(name) + 1; data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_ar_util.c:119:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(r, buf, sz); data/freebsd-libs-10.3~svn296373/lib/libelf/libelf_ar_util.c:166:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy(s, q, len); data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_ctl.c:168:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ap->nlen = strlen(ap->name) + 1; data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_ctl.c:175:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ap->len = strlen(value) + 1; data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_getxml.c:59: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). return (reallocf(p, strlen(p) + 1)); data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_xml2tree.c:207:6: [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(p) == 0) { data/freebsd-libs-10.3~svn296373/lib/libgeom/geom_xml2tree.c:386: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). i = XML_Parse(parser, p, strlen(p), 1); data/freebsd-libs-10.3~svn296373/lib/libipx/ipx_addr.c:58:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(buf, name, sizeof(buf) - 1); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:332: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). fw = nval == 1 ? strlen(avalue) : strcspn(avalue, ","); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:453: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). if (valsize == strlen(values[i]) && data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:491: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). jiov[i].iov_len = strlen(jp[j].jp_name) + 1; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:513: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). jiov[i - 1].iov_len = strlen(nname) + 1; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:529: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). ? strlen(jp[j].jp_value) + 1 data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:581: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). jiov[ai].iov_len = strlen(jp[j].jp_name) + 1; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:598: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). jiov[ki].iov_len = strlen(jp_key->jp_name) + 1; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:602:8: [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(jp_key->jp_value) + 1 : jp_key->jp_valuelen; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:640: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). jiov[i].iov_len = strlen(jp[j].jp_name) + 1; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:818: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). valuelens[i] = strlen(valbuf) + 1; data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:882:47: [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 (sysctl(mib, 2, mib + 2, &miblen, desc.s, strlen(desc.s)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:900:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = alloca(strlen(nname) + 1); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:906: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). strlen(desc.s)) < 0) data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:1005:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (desclen == sizeof(SJPARAM) + strlen(name) + 2 && data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:1034:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nname = malloc(strlen(name) + 3); data/freebsd-libs-10.3~svn296373/lib/libjail/jail.c:1059:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nname = malloc(strlen(name) - 1); data/freebsd-libs-10.3~svn296373/lib/libjail/jail_getid.c:58: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). jiov[1].iov_len = strlen(name) + 1; data/freebsd-libs-10.3~svn296373/lib/libkiconv/kiconv_sysctl.c:55:47: [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 (drvp = drivers; *drvp != '\0'; drvp += strlen(drvp) + 1) data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_sysctl.c:57:6: [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(from) >= ICONV_CSNMAXLEN || strlen(to) >= ICONV_CSNMAXLEN) data/freebsd-libs-10.3~svn296373/lib/libkiconv/xlat16_sysctl.c:57: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). if (strlen(from) >= ICONV_CSNMAXLEN || strlen(to) >= ICONV_CSNMAXLEN) data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:125: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). n = strlen(cp); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:158:11: [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). else if (strlen(uf) >= MAXPATHLEN) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:210: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). if (strncmp(mf, _PATH_FWMEM, strlen(_PATH_FWMEM)) == 0) data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:305: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). len += sizeof(struct nlist) + strlen(prefix) + data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:306: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). 2 * (strlen(p->n_name) + 1); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:361: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). ccp = np->n_name + strlen(np->n_name) + 1; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:515:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cr = read(kd->vmfd, buf, len); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm.c:536:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cr = read(kd->pmfd, cp, cc); data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_amd64.c:266:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(kd->pmfd, &pdpe, sizeof pdpe) != sizeof pdpe) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_amd64.c:287:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(kd->pmfd, &pde, sizeof pde) != sizeof pde) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_amd64.c:324:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(kd->pmfd, &pte, sizeof pte) != sizeof pte) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_arm.c:248:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(kd->pmfd, &pte, sizeof(pte)) != sizeof (pte)) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_i386.c:320:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(kd->pmfd, &pte, sizeof pte) != sizeof pte) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_i386.c:416:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(kd->pmfd, &pte, sizeof pte) != sizeof pte) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_proc.c:699:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(p) + 1; data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_sparc.c:111:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(kd->pmfd, (char *)vm->segmap, sizeof(vm->segmap)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_sparc.c:122:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(kd->pmfd, (char *)vm->pmeg, sizeof(vm->pmeg)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libkvm/kvm_sparc64.c:100:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(kd->pmfd, buf, size) != (ssize_t)size) { data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:338: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). snprintf(buf + strlen(buf), data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:339: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). sizeof(buf) - strlen(buf), "%02x ", ptr[k]); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:341: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). snprintf(buf + strlen(buf), data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:342: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). sizeof(buf) - strlen(buf), " "); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:343: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). snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " "); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:343:45: [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). snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " "); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:349: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). snprintf(buf + strlen(buf), data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:350: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). sizeof(buf) - strlen(buf), data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:353: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). snprintf(buf + strlen(buf), data/freebsd-libs-10.3~svn296373/lib/libnetgraph/debug.c:354: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). sizeof(buf) - strlen(buf), " "); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:119:8: [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(args) + 1)) == NULL) { data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:126:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)ascii->header.cmdstr, cmd, data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:129: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). ascii->header.arglen = strlen(ascii->data) + 1; data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:216: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). sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD; data/freebsd-libs-10.3~svn296373/lib/libnetgraph/msg.c:357:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(reply->data, ascii->data, ascii->header.arglen); data/freebsd-libs-10.3~svn296373/lib/libnetgraph/sock.c:103: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). sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD; data/freebsd-libs-10.3~svn296373/lib/libnetgraph/sock.c:153: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). sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD; data/freebsd-libs-10.3~svn296373/lib/libnetgraph/sock.c:279: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). sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD; data/freebsd-libs-10.3~svn296373/lib/libusb/libusb01.c:246:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return (strlen(buf)); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_desc.c:335:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return (strlen(data)); data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_io.c:182:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fds[i].fd, &dummy, 1) != 1) data/freebsd-libs-10.3~svn296373/lib/libusb/libusb10_io.c:547:4: [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); /* nice it */ data/freebsd-libs-10.3~svn296373/lib/libusb/libusb20_ugen20.c:262: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). st->dst = st->src + strlen(st->src) + 1; data/freebsd-libs-10.3~svn296373/lib/libusb/libusb_global_linux.h:73:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d,s,len); \ data/freebsd-libs-10.3~svn296373/lib/libutil/fparseln.c:195:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:65: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(dir) >= sizeof(group_dir)) { data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:81: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(group) >= sizeof(group_file)) { data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:147:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nr = read(mfd, buf, sizeof(buf))) > 0) data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:213:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readlen = read(ffd, end, sizeof(buf) - (end -buf)); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:272: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). len = strlen(line); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:284:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readlen = read(ffd, buf, sizeof(buf)); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:301:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(line); data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:435:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). line_size += strlen(gr->gr_mem[ndx]) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:566: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). len += strlen(gr->gr_name) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:568: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). len += strlen(gr->gr_passwd) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:572:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len += strlen(gr->gr_mem[i]) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/gr_util.c:578: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). len += strlen(name) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/humanize_number.c:128:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). baselen += strlen(suffix); data/freebsd-libs-10.3~svn296373/lib/libutil/kld.c:55: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). strlen(name) == (size_t)(ko - fstat.name) && data/freebsd-libs-10.3~svn296373/lib/libutil/login_auth.c:103:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((count = read(fd, buf, sizeof(buf))) > 0) data/freebsd-libs-10.3~svn296373/lib/libutil/login_cap.c:71:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen(str) + 1; /* realloc() only if necessary */ data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:159:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). np = malloc(strlen(var) + (dollas * nlen) data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:172:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int l = strlen(p); data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:202: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). int hlen = pwd ? strlen(pwd->pw_dir) : 0; data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:203: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). int nlen = pwd ? strlen(pwd->pw_name) : 0; data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:544:41: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mymask = (flags & LOGIN_SETUMASK) ? umask(LOGIN_DEFUMASK) : 0; data/freebsd-libs-10.3~svn296373/lib/libutil/login_class.c:564:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mymask); data/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c:80:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(fd, buf, sizeof(buf) - 1); data/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c:203: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). if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) { data/freebsd-libs-10.3~svn296373/lib/libutil/pidfile.c:203: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). if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) { data/freebsd-libs-10.3~svn296373/lib/libutil/property.c:94:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((max = read(fd, buf, sizeof buf)) < 0) { data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:103: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(dir) >= sizeof(passwd_dir)) { data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:119: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(master) >= sizeof(masterpasswd)) { data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:157:8: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(0); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:232:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nr = read(mfd, buf, sizeof(buf))) > 0) data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:477:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readlen = read(ffd, end, sizeof(buf) - (end - buf)); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:537: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). len = strlen(line); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:549:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readlen = read(ffd, buf, sizeof(buf)); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:566:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(line); data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:602: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). len += strlen(pw->pw_name) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:604: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). len += strlen(pw->pw_passwd) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:606: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). len += strlen(pw->pw_class) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:608: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). len += strlen(pw->pw_gecos) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:610: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). len += strlen(pw->pw_dir) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/pw_util.c:612: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). len += strlen(pw->pw_shell) + 1; data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:104:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(qfnamep, cp, qfbufsize); data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:127:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(qf->fsname, fs->fs_file, sizeof(qf->fsname)); data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:146:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch (read(qf->fd, &dqh, sizeof(dqh))) { data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:279:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch (read(qf->fd, &dqb32, sizeof(dqb32))) { data/freebsd-libs-10.3~svn296373/lib/libutil/quotafile.c:307:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch (read(qf->fd, &dqb64, sizeof(dqb64))) { data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:60: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). trimdomain(trimmed, strlen(trimmed)); data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:61: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(trimmed) <= hsize) { data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:74:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(host, trimmed, hsize); data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:81:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(host, inet_ntoa(*ip), hsize); data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:179: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). if (strlen(buf) > hsize && data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:184:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(host, buf, hsize); data/freebsd-libs-10.3~svn296373/lib/libutil/realhostname.c:194:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(host, buf, hsize); data/freebsd-libs-10.3~svn296373/lib/libutil/tests/humanize_number_test.c:467:6: [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(result) == 0) data/freebsd-libs-10.3~svn296373/lib/libutil/tests/pidfile_test.c:181:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd[0], &ch, 1) != 1) { data/freebsd-libs-10.3~svn296373/lib/libutil/tests/trimdomain-nodomain_test.c:67: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). trimdomain(testhost, hostsize < 0 ? (int)strlen(testhost) : hostsize); data/freebsd-libs-10.3~svn296373/lib/libutil/tests/trimdomain_test.c:67: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). trimdomain(testhost, hostsize < 0 ? (int)strlen(testhost) : hostsize); data/freebsd-libs-10.3~svn296373/lib/libutil/trimdomain.c:67: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). memmove(domain, s + 1, strlen(s + 1) + 1); data/freebsd-libs-10.3~svn296373/lib/libutil/trimdomain.c:70: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). dlen = strlen(domain); data/freebsd-libs-10.3~svn296373/lib/libutil/trimdomain.c:85: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). (len = strlen(s + dlen + 1)) < (size_t)(end - s)) { data/freebsd-libs-10.3~svn296373/lib/libutil/uucplock.c:216:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bytes_read = read (fd, buf, sizeof (buf) - 1); data/freebsd-libs-10.3~svn296373/sys/cam/ata/ata_xpt.c:899: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). strlen(path->device->serial_num); data/freebsd-libs-10.3~svn296373/sys/cam/cam.c:375: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). strlen(path_str), (proto_flags & data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:1588:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cdm->matches[j].result.bus_result.dev_name, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:1848:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cdm->matches[j].result.periph_result.periph_name, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:2020:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cdm->matches[j].result.periph_result.periph_name, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:2730:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cgdl->periph_name, data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:5124: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(cpi->sim_vid, "FreeBSD", SIM_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:5125: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 character. strncpy(cpi->hba_vid, "", HBA_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/cam_xpt.c:5126:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:829: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). i = sizeof(msg->port) + strlen(port->port_name) + 1; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:894: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). l = strlen(port->wwpn_iid[iid].name) + 1; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4445: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). idlen2 = roundup2(strlen(scsiname) + 1, 4); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4465:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)t10id->vendor, CTL_VENDOR, sizeof(t10id->vendor)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4467:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(t10id->vendor, vendor, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4468: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). min(sizeof(t10id->vendor), strlen(vendor))); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:4470:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)t10id->vendor_spec_id, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:9533:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)sn_ptr->serial_num, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10251:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->vendor, CTL_VENDOR, sizeof(inq_ptr->vendor)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10254:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->vendor, val, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10255: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). min(sizeof(inq_ptr->vendor), strlen(val))); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10258:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->product, CTL_DIRECT_PRODUCT, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10263:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->product, CTL_DIRECT_PRODUCT, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10267:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->product, CTL_PROCESSOR_PRODUCT, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10271:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->product, CTL_CDROM_PRODUCT, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10275:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10281:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->product, val, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10282:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). min(sizeof(inq_ptr->product), strlen(val))); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10291: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(inq_ptr->revision, "0001", sizeof(inq_ptr->revision)); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10294:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(inq_ptr->revision, val, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl.c:10295: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). min(sizeof(inq_ptr->revision), strlen(val))); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:616:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE_DEFINE1(cbb, kernel, read, file_start, "uint64_t"); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:618:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE_DEFINE1(cbb, kernel, read, file_done,"uint64_t"); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:644:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE(cbb, kernel, read, file_start, 0, 0, 0, 0, 0); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:690:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:875:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE(cbb, kernel, read, file_start, 0, 0, 0, 0, 0); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:909:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:1507:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE_DEFINE1(cbb, kernel, read, start, "uint64_t"); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:1509:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE_DEFINE1(cbb, kernel, read, alloc_done, "uint64_t"); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:1557:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE(cbb, kernel, read, start, 0, 0, 0, 0, 0); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:1644:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SDT_PROBE(cbb, kernel, read, alloc_done, 0, 0, 0, 0, 0); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2343:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->serial_num, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2347:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)params->serial_num, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2350:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->serial_num, params->serial_num, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2356:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->device_id, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2360:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)params->device_id, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_block.c:2363:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->device_id, params->device_id, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:582:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->serial_num, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:586:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)params->serial_num, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:589:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->serial_num, params->serial_num, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:595:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->device_id, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:599:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)params->device_id, tmpstr, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_backend_ramdisk.c:602:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)cbe_lun->device_id, params->device_id, data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_error.c:693:52: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ctl_set_medium_error(struct ctl_scsiio *ctsio, int read) data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_error.c:695:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read) { data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:776: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(cpi->sim_vid, "FreeBSD", SIM_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:777: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(cpi->hba_vid, "FreeBSD", HBA_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_cam_sim.c:778:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:2034: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). idlen = strlen(target) + strlen(",t,0x0001") + 1; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:2034: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). idlen = strlen(target) + strlen(",t,0x0001") + 1; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:2048: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). idlen = strlen(target) + 1; data/freebsd-libs-10.3~svn296373/sys/cam/ctl/ctl_frontend_iscsi.c:2253: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). if (name[0] == '\0' || strlen(name) >= CTL_ISCSI_NAME_LEN) data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3513: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). snprintf(cdb_string + strlen(cdb_string), data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:3514:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len - strlen(cdb_string), "%02hhx ", cdb_ptr[i]); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5861: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). table_len = strlen(table[i].name); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:5862:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_len = strlen(name); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:6101:11: [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). id_len = strlen(id_str); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:6254:11: [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). id_len = strlen(id_str); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:6255: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). sep_len = strlen(sep_template); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:6310: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). id_size = sizeof(*iscsi) + strlen(iqn_prefix) + id_len + 1; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:7939:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:7960:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). scsi_cmd->opcode = read ? READ_6 : WRITE_6; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:7979:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). scsi_cmd->opcode = read ? READ_10 : WRITE_10; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:8002:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). scsi_cmd->opcode = read ? READ_12 : WRITE_12; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:8024:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). scsi_cmd->opcode = read ? READ_16 : WRITE_16; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_all.c:8035:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (read ? CAM_DIR_IN : CAM_DIR_OUT) | data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:655: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). cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_cd.c:657:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:2051:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, p, sizeof(buf)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:2216: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). cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_da.c:2218:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_low.c:744: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(cpi->sim_vid, "FreeBSD", SIM_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_low.c:745: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(cpi->hba_vid, "SCSI_LOW", HBA_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_low.c:746:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_pass.c:446:6: [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(physpath) != 0) { data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1164:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). prot_len = strlen(prot_name); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1326:8: [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(sa_param_table[i].name)) != 0) data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:1702:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). g->fill_len = strlen(tmpstr2) + 1; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:4403:6: [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(periph->periph_name) + 1); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:5213:6: [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(tmpstr) + 1, desc); \ data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:5462:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int read; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:5467:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). scsi_cmd->opcode = read ? SA_READ : SA_WRITE; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:5469:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (sli && read) data/freebsd-libs-10.3~svn296373/sys/cam/scsi/scsi_sa.c:5476:40: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cam_fill_csio(csio, retries, cbfcnp, (read ? CAM_DIR_IN : CAM_DIR_OUT) | data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c:216: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). && (line_len < (strlen(line_prefix) + 3))) { data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c:222: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). cur_len = line_len - strlen(line_prefix); data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c:239: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). first_line_len -= strlen(smp_command_desc(smpio->smp_request[1])) + 2; data/freebsd-libs-10.3~svn296373/sys/cam/scsi/smp_all.c:265:45: [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). smp_command_sbuf(smpio, sb, path_str, 80 - strlen(path_str), 80); data/freebsd-libs-10.3~svn296373/sys/kern/subr_prf.c:806: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). n = strlen (p); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias.c:1660:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buf); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias.c:1699:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(t->name, p->name, DLL_LEN); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c:732:11: [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). slen = strlen(stemp); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_ftp.c:737:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(sptr, stemp, maxpacketsize - hlen); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:311: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). slen = strlen(buffer); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:318:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buffer, "\n"); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:323: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). if ((int)(ntohs(pip->ip_len) + strlen(buffer)) > maxpacketsize) data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:572: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). cmd_len = strlen(cmd); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:580:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buffer); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:815:6: [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(str_port) != 0) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_proxy.c:827:6: [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(str_server_port) != 0) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:219: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). search_str_len = strlen(search_str); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:269: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). while (port_dlen > (int)strlen(port_str)) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:369: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). memcpy(port_newdata, stemp, strlen(stemp)); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:370: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). port_newdata += strlen(stemp); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:378: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). memcpy(port_newdata, stemp, strlen(stemp)); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:379: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). port_newdata += strlen(stemp); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:506: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). if (dlen >= (int)strlen(setup)) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:507:28: [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 (memcmp(data, setup, strlen(setup)) == 0) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:512: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). if (dlen >= (int)strlen(pna)) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:513: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). if (memcmp(data, pna, strlen(pna)) == 0) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:524: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). if (dlen >= (int)strlen(str200)) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:527: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). i <= dlen - (int)strlen(str200); data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:529: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). if (memcmp(&data[i], str200, strlen(str200)) == 0) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:536: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(str200); /* skip string found */ data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:540:28: [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 ((dlen - i) >= (int)strlen(okstr)) { data/freebsd-libs-10.3~svn296373/sys/netinet/libalias/alias_smedia.c:542: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). if (memcmp(&data[i], okstr, strlen(okstr)) == 0) ANALYSIS SUMMARY: Hits = 858 Lines analyzed = 150628 in approximately 3.63 seconds (41446 lines/second) Physical Source Lines of Code (SLOC) = 107865 Hits@level = [0] 1042 [1] 271 [2] 497 [3] 5 [4] 84 [5] 1 Hits@level+ = [0+] 1900 [1+] 858 [2+] 587 [3+] 90 [4+] 85 [5+] 1 Hits/KSLOC@level+ = [0+] 17.6146 [1+] 7.95439 [2+] 5.44199 [3+] 0.834376 [4+] 0.788022 [5+] 0.00927085 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.