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/kexec-tools-2.0.20/include/config.h
Examining data/kexec-tools-2.0.20/include/kexec-uImage.h
Examining data/kexec-tools-2.0.20/include/x86/x86-linux.h
Examining data/kexec-tools-2.0.20/include/x86/mb_info.h
Examining data/kexec-tools-2.0.20/include/x86/mb_header.h
Examining data/kexec-tools-2.0.20/include/x86/multiboot2.h
Examining data/kexec-tools-2.0.20/include/elf.h
Examining data/kexec-tools-2.0.20/include/image.h
Examining data/kexec-tools-2.0.20/include/unused.h
Examining data/kexec-tools-2.0.20/include/boot/linuxbios_tables.h
Examining data/kexec-tools-2.0.20/include/boot/beoboot.h
Examining data/kexec-tools-2.0.20/include/boot/elf_boot.h
Examining data/kexec-tools-2.0.20/util_lib/compute_ip_checksum.c
Examining data/kexec-tools-2.0.20/util_lib/elf_info.c
Examining data/kexec-tools-2.0.20/util_lib/sha256.c
Examining data/kexec-tools-2.0.20/util_lib/include/elf_info.h
Examining data/kexec-tools-2.0.20/util_lib/include/sha256.h
Examining data/kexec-tools-2.0.20/util_lib/include/ip_checksum.h
Examining data/kexec-tools-2.0.20/util/bin-to-hex.c
Examining data/kexec-tools-2.0.20/purgatory/purgatory.c
Examining data/kexec-tools-2.0.20/purgatory/printf.c
Examining data/kexec-tools-2.0.20/purgatory/string.c
Examining data/kexec-tools-2.0.20/purgatory/arch/x86_64/purgatory-x86_64.c
Examining data/kexec-tools-2.0.20/purgatory/arch/x86_64/include/arch/io.h
Examining data/kexec-tools-2.0.20/purgatory/arch/x86_64/include/arch/debug.h
Examining data/kexec-tools-2.0.20/purgatory/arch/x86_64/purgatory-x86_64.h
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/crashdump_backup.c
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/console-x86.c
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/vga.c
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/pic.c
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/purgatory-x86.c
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/purgatory-x86.h
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/include/arch/io.h
Examining data/kexec-tools-2.0.20/purgatory/arch/i386/include/arch/debug.h
Examining data/kexec-tools-2.0.20/purgatory/arch/arm64/purgatory-arm64.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ia64/purgatory-ia64.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ia64/console-ia64.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ia64/vga.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ia64/io.h
Examining data/kexec-tools-2.0.20/purgatory/arch/ia64/purgatory-ia64.h
Examining data/kexec-tools-2.0.20/purgatory/arch/mips/purgatory-mips.c
Examining data/kexec-tools-2.0.20/purgatory/arch/mips/console-mips.c
Examining data/kexec-tools-2.0.20/purgatory/arch/mips/purgatory-mips.h
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc/purgatory-ppc.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc/console-ppc.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc/purgatory-ppc.h
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc/ppc_asm.h
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc64/purgatory-ppc64.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc64/console-ppc64.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc64/crashdump_backup.c
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc64/hvCall.h
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc64/ppc64_asm.h
Examining data/kexec-tools-2.0.20/purgatory/arch/ppc64/purgatory-ppc64.h
Examining data/kexec-tools-2.0.20/purgatory/arch/s390/console-s390.c
Examining data/kexec-tools-2.0.20/purgatory/arch/s390/purgatory-s390.c
Examining data/kexec-tools-2.0.20/purgatory/include/purgatory.h
Examining data/kexec-tools-2.0.20/purgatory/include/string.h
Examining data/kexec-tools-2.0.20/kexec/kexec.c
Examining data/kexec-tools-2.0.20/kexec/ifdown.c
Examining data/kexec-tools-2.0.20/kexec/kexec-elf.c
Examining data/kexec-tools-2.0.20/kexec/kexec-elf-exec.c
Examining data/kexec-tools-2.0.20/kexec/kexec-elf-core.c
Examining data/kexec-tools-2.0.20/kexec/kexec-elf-rel.c
Examining data/kexec-tools-2.0.20/kexec/kexec-elf-boot.c
Examining data/kexec-tools-2.0.20/kexec/kexec-iomem.c
Examining data/kexec-tools-2.0.20/kexec/firmware_memmap.c
Examining data/kexec-tools-2.0.20/kexec/crashdump.c
Examining data/kexec-tools-2.0.20/kexec/crashdump-xen.c
Examining data/kexec-tools-2.0.20/kexec/phys_arch.c
Examining data/kexec-tools-2.0.20/kexec/kernel_version.c
Examining data/kexec-tools-2.0.20/kexec/lzma.c
Examining data/kexec-tools-2.0.20/kexec/zlib.c
Examining data/kexec-tools-2.0.20/kexec/kexec-xen.c
Examining data/kexec-tools-2.0.20/kexec/symbols.c
Examining data/kexec-tools-2.0.20/kexec/crashdump-elf.c
Examining data/kexec-tools-2.0.20/kexec/crashdump.h
Examining data/kexec-tools-2.0.20/kexec/firmware_memmap.h
Examining data/kexec-tools-2.0.20/kexec/kexec-elf-boot.h
Examining data/kexec-tools-2.0.20/kexec/kexec-elf.h
Examining data/kexec-tools-2.0.20/kexec/kexec-sha256.h
Examining data/kexec-tools-2.0.20/kexec/kexec-zlib.h
Examining data/kexec-tools-2.0.20/kexec/kexec-lzma.h
Examining data/kexec-tools-2.0.20/kexec/kexec-xen.h
Examining data/kexec-tools-2.0.20/kexec/kexec-syscall.h
Examining data/kexec-tools-2.0.20/kexec/kexec.h
Examining data/kexec-tools-2.0.20/kexec/proc_iomem.c
Examining data/kexec-tools-2.0.20/kexec/virt_to_phys.c
Examining data/kexec-tools-2.0.20/kexec/phys_to_virt.c
Examining data/kexec-tools-2.0.20/kexec/add_segment.c
Examining data/kexec-tools-2.0.20/kexec/add_buffer.c
Examining data/kexec-tools-2.0.20/kexec/arch_reuse_initrd.c
Examining data/kexec-tools-2.0.20/kexec/kexec-uImage.c
Examining data/kexec-tools-2.0.20/kexec/fs2dt.c
Examining data/kexec-tools-2.0.20/kexec/mem_regions.c
Examining data/kexec-tools-2.0.20/kexec/mem_regions.h
Examining data/kexec-tools-2.0.20/kexec/dt-ops.c
Examining data/kexec-tools-2.0.20/kexec/dt-ops.h
Examining data/kexec-tools-2.0.20/kexec/arch/alpha/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm/kexec-elf-rel-arm.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm/kexec-uImage-arm.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm/phys_to_virt.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm/iomem.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm/phys_to_virt.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/crashdump-arm64.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-elf-arm64.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-uImage-arm64.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-image-arm64.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-zImage-arm64.c
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/crashdump-arm64.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/image-header.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/iomem.h
Examining data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.h
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86-common.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-elf-x86.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-elf-rel-x86.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-bzImage.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-beoboot-x86.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-nbi.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.h
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c
Examining data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.h
Examining data/kexec-tools-2.0.20/kexec/arch/i386/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86.h
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-iomem.c
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-ia64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-rel-ia64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-ia64.h
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.h
Examining data/kexec-tools-2.0.20/kexec/arch/ia64/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/m68k/kexec-m68k.c
Examining data/kexec-tools-2.0.20/kexec/arch/m68k/kexec-elf-m68k.c
Examining data/kexec-tools-2.0.20/kexec/arch/m68k/kexec-elf-rel-m68k.c
Examining data/kexec-tools-2.0.20/kexec/arch/m68k/bootinfo.c
Examining data/kexec-tools-2.0.20/kexec/arch/m68k/bootinfo.h
Examining data/kexec-tools-2.0.20/kexec/arch/m68k/kexec-m68k.h
Examining data/kexec-tools-2.0.20/kexec/arch/m68k/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/mips/kexec-mips.c
Examining data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-mips.c
Examining data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-rel-mips.c
Examining data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c
Examining data/kexec-tools-2.0.20/kexec/arch/mips/kexec-mips.h
Examining data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.h
Examining data/kexec-tools-2.0.20/kexec/arch/mips/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/cris/kexec-cris.c
Examining data/kexec-tools-2.0.20/kexec/arch/cris/kexec-elf-cris.c
Examining data/kexec-tools-2.0.20/kexec/arch/cris/kexec-elf-rel-cris.c
Examining data/kexec-tools-2.0.20/kexec/arch/cris/kexec-cris.h
Examining data/kexec-tools-2.0.20/kexec/arch/cris/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-rel-ppc.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-uImage-ppc.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/fixup_dtb.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/libfdt-wrapper.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/fixup_dtb.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/ops.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/ppc_asm.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/include/page.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/include/types.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-rel-ppc64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-zImage-ppc64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/fdt.c
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/include/arch/fdt.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c
Examining data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c
Examining data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c
Examining data/kexec-tools-2.0.20/kexec/arch/s390/kexec-elf-rel-s390.c
Examining data/kexec-tools-2.0.20/kexec/arch/s390/crashdump-s390.c
Examining data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.h
Examining data/kexec-tools-2.0.20/kexec/arch/s390/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c
Examining data/kexec-tools-2.0.20/kexec/arch/sh/kexec-uImage-sh.c
Examining data/kexec-tools-2.0.20/kexec/arch/sh/kexec-zImage-sh.c
Examining data/kexec-tools-2.0.20/kexec/arch/sh/kexec-netbsd-sh.c
Examining data/kexec-tools-2.0.20/kexec/arch/sh/kexec-elf-sh.c
Examining data/kexec-tools-2.0.20/kexec/arch/sh/kexec-elf-rel-sh.c
Examining data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c
Examining data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.h
Examining data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.h
Examining data/kexec-tools-2.0.20/kexec/arch/sh/include/arch/options.h
Examining data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-x86_64.c
Examining data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-x86_64.c
Examining data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
Examining data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-x86_64.h
Examining data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c
Examining data/kexec-tools-2.0.20/kexec/libfdt/fdt.h
Examining data/kexec-tools-2.0.20/kexec/libfdt/libfdt.h
Examining data/kexec-tools-2.0.20/kexec/libfdt/libfdt_env.h
Examining data/kexec-tools-2.0.20/kexec/libfdt/libfdt_internal.h
Examining data/kexec-tools-2.0.20/kexec/libfdt/fdt.c
Examining data/kexec-tools-2.0.20/kexec/libfdt/fdt_ro.c
Examining data/kexec-tools-2.0.20/kexec/libfdt/fdt_wip.c
Examining data/kexec-tools-2.0.20/kexec/libfdt/fdt_sw.c
Examining data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c
Examining data/kexec-tools-2.0.20/kexec/libfdt/fdt_strerror.c
Examining data/kexec-tools-2.0.20/kexec/fs2dt.h
Examining data/kexec-tools-2.0.20/vmcore-dmesg/vmcore-dmesg.c

FINAL RESULTS:

data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.c:149:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	return !access(SYSFS_FDT, F_OK);
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:132:2:  [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(arm64_opts_usage);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:623:2:  [4] (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).
	strcat (str_mmap, str_tmp);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:635:2:  [4] (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).
	strcat (str_mmap, str_tmp);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:641:2:  [4] (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).
	strcat(cmdline, str_mmap);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:658:2:  [4] (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).
	strcat(cmdline, str_mmap);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:715:2:  [4] (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).
	strcat(cmdline, str);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:802:2:  [4] (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).
	strcat(cmdline, acpi_rsdp_buf);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:285:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tag->string, "%s", BOOTLOADER " " BOOTLOADER_VERSION);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:517:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(mod_clp, "%s", mod_command_line);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:332:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(((char *)mbi) + sizeof(*mbi), "%s", command_line);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:333:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(((char *)mbi) + sizeof(*mbi) + command_line_len, "%s",
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:459:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(mod_clp, "%s", mod_command_line);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:221:10:  [4] (buffer) vfscanf:
  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.
	retno = vfscanf(fp, scanf_line, argptr);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:474:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		err = access(filename, F_OK);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:588:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(filename,
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:663:8:  [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.
	ret = access("/sys/firmware/efi/systab", F_OK);
data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c:227:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str, "%s%s", *cmdline, buf);
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:253: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(cmdline, command_line);
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:261:4:  [4] (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).
			strcat(cmdline, buf);
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:268:2:  [4] (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).
	strcat(cmdline, str);
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:293:2:  [4] (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).
	strcat(cmdline, str);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:128: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:129:3:  [4] (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).
		strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:262:2:  [4] (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).
	strcat(cmdline, str);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:283: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(str, cmdstr);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:286:2:  [4] (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).
	strcat(str, byte);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:120: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(propnames+offset, name);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:133: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(fname, pathname);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:192: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(fn, dp->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:267:6:  [4] (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).
					strcat(local_cmdline, old_param);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:349: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((void *)dt, *basename ? basename : "");
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:393: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(dn, dp->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:427: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(local_cmdline, cmdline);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:334: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:335:3:  [4] (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).
		strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:481: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:482:3:  [4] (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).
		strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:518:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:541:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:591:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:615:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:654:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:674:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:707:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:765:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(fname, "%s%s%s",
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-uImage-ppc.c:208: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(cmdline_buf, command_line);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:212: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(fpath, fname);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:304: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:305:3:  [4] (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).
		strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:475: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(str, cmdstr);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:478:2:  [4] (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).
	strcat(str, byte);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:485:2:  [4] (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).
	strcat(cmdline, str);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:270: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:271:3:  [4] (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).
		strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:433: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:434:3:  [4] (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).
		strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:462: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:463:5:  [4] (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).
				strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:478: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:479:5:  [4] (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).
				strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:508: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:509:4:  [4] (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).
			strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:533: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:534:4:  [4] (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).
			strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:554: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:555:4:  [4] (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).
			strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:578: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:579:5:  [4] (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).
				strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:598: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:599:5:  [4] (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).
				strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:639: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:640:4:  [4] (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).
			strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:678: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:679:4:  [4] (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).
			strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:745: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(fname, device_tree);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:746:4:  [4] (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).
			strcat(fname, dentry->d_name);
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:45:2:  [4] (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).
	strcat(command_line, str);
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:134:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "/sys/devices/system/memory/%s/state",
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:130: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(str, cmdstr);
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:133:2:  [4] (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).
	strcat(str, byte);
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:138:2:  [4] (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).
	strcat(cmdline, str);
data/kexec-tools-2.0.20/kexec/crashdump-xen.c:116:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (access("/proc/xen", F_OK) == 0)
data/kexec-tools-2.0.20/kexec/dt-ops.c:96:2:  [4] (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).
	strcat(new_node, node);
data/kexec-tools-2.0.20/kexec/dt-ops.c:157:2:  [4] (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).
	strcat(new_node, node);
data/kexec-tools-2.0.20/kexec/fs2dt.c:167: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(propnames+offset, name);
data/kexec-tools-2.0.20/kexec/fs2dt.c:229: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(fname, pathname);
data/kexec-tools-2.0.20/kexec/fs2dt.c:337: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(fname, pathname);
data/kexec-tools-2.0.20/kexec/fs2dt.c:403: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(fn, dp->d_name);
data/kexec-tools-2.0.20/kexec/fs2dt.c:535: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(filename, pathname);
data/kexec-tools-2.0.20/kexec/fs2dt.c:550:3:  [4] (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).
		strcat(local_cmdline, old_param);
data/kexec-tools-2.0.20/kexec/fs2dt.c:590: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((void *)dt, *basename ? basename : "");
data/kexec-tools-2.0.20/kexec/fs2dt.c:735: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(dn, dp->d_name);
data/kexec-tools-2.0.20/kexec/fs2dt.c:833: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(local_cmdline, cmdline);
data/kexec-tools-2.0.20/kexec/kexec.c:79: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(stderr, fmt, args);
data/kexec-tools-2.0.20/kexec/kexec.c:884:2:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execv("/sbin/shutdown", args);
data/kexec-tools-2.0.20/kexec/kexec.c:885:2:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execv("/etc/shutdown", args);
data/kexec-tools-2.0.20/kexec/kexec.c:886:2:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execv("/bin/shutdown", args);
data/kexec-tools-2.0.20/kexec/kexec.c:979:2:  [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(PACKAGE_STRING "\n");
data/kexec-tools-2.0.20/kexec/kexec.c:1158: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(cmdline, base);
data/kexec-tools-2.0.20/kexec/kexec.c:1160:2:  [4] (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).
	strcat(cmdline, append);
data/kexec-tools-2.0.20/kexec/kexec.h:121:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, __VA_ARGS__); \
data/kexec-tools-2.0.20/kexec/kexec.h:265:26:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__ ((format (printf, 1, 2)));
data/kexec-tools-2.0.20/kexec/symbols.c:22:7:  [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 (sscanf(line, "%llx %c %s", &vaddr, &type, sym) != 3)
data/kexec-tools-2.0.20/purgatory/include/purgatory.h:5:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
void sprintf(char *buffer, const char *fmt, ...)
data/kexec-tools-2.0.20/purgatory/include/purgatory.h:6:26:  [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/kexec-tools-2.0.20/purgatory/include/purgatory.h:7:6:  [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.
void printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
data/kexec-tools-2.0.20/purgatory/include/purgatory.h:7:59:  [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.
void printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
data/kexec-tools-2.0.20/purgatory/printf.c:36:6:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
void vsprintf(char *buffer, const char *fmt, va_list args)
data/kexec-tools-2.0.20/purgatory/printf.c:138:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
void sprintf(char *buffer, const char *fmt, ...)
data/kexec-tools-2.0.20/purgatory/printf.c:143:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf(buffer, fmt, args);
data/kexec-tools-2.0.20/purgatory/printf.c:147:6:  [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.
void printf(const char *fmt, ...)
data/kexec-tools-2.0.20/purgatory/printf.c:152:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf(0, fmt, args);
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.c:117:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:433:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:148:9:  [3] (buffer) getopt_long:
  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.
		opt = getopt_long(argc, argv, short_options, options, 0);
data/kexec-tools-2.0.20/kexec/arch/cris/kexec-elf-cris.c:103:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-beoboot-x86.c:99:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-bzImage.c:408:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-elf-x86.c:127:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:433:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1)
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:496:16:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv,
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:265:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:437:16:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, 
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-nbi.c:173:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86.c:87:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:149:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options,
data/kexec-tools-2.0.20/kexec/arch/m68k/kexec-elf-m68k.c:96:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) !=
data/kexec-tools-2.0.20/kexec/arch/m68k/kexec-m68k.c:57:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) !=
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-mips.c:112:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options,
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:351:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:204:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-uImage-ppc.c:114:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c:120:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options,
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c:224:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options,
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:935:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:64:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:119:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc,argv,short_options,options,0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-elf-sh.c:88:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-netbsd-sh.c:79:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:113:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-zImage-sh.c:90:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:261:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:349:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-x86_64.c:126:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-x86_64.c:88:15:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options, options, 0)) != -1) {
data/kexec-tools-2.0.20/kexec/kexec.c:1297:16:  [3] (buffer) getopt_long:
  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 ((opt = getopt_long(argc, argv, short_options,
data/kexec-tools-2.0.20/kexec/kexec.c:1474:16:  [3] (buffer) getopt_long:
  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((opt = getopt_long(argc, argv, short_options,
data/kexec-tools-2.0.20/include/boot/beoboot.h:4: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 magic[4];
data/kexec-tools-2.0.20/include/elf.h:77:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char	e_ident[EI_NIDENT];	/* Magic number and other info */
data/kexec-tools-2.0.20/include/elf.h:95:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char	e_ident[EI_NIDENT];	/* Magic number and other info */
data/kexec-tools-2.0.20/include/x86/multiboot2.h:212: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 string[0];
data/kexec-tools-2.0.20/include/x86/multiboot2.h:221:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char cmdline[0];
data/kexec-tools-2.0.20/include/x86/multiboot2.h:321: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 sections[0];
data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.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 buf[COMMAND_LINE_SIZE];
data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.c:189: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[COMMAND_LINE_SIZE];
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.c:33: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.c:35: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).
	fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:49: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 magic[8];
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:60: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[16];
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:61: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 command_line[512];
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:106: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    cmdline[1];     /* this is the minimum size */
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:165: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).
	fp = fopen(fn, "r");
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:195: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).
	fp = fopen(fn, "r");
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:252: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(params, saved_tags, byte_size(saved_tags));
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:280: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(params->u.cmdline.cmdline, command_line,
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:383: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, &val32, sizeof(uint32_t));
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:390: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, &val, sizeof(uint64_t));
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:639: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 command_line[COMMAND_LINE_SIZE] = "";
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:861: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("/proc/kcore", O_RDONLY)) < 0) {
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:887: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("/proc/kcore", O_RDONLY)) < 0) {
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-image-arm64.c:45:22:  [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).
			info->initrd_fd = open(arm64_opts.initrd, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-zImage-arm64.c:63:12:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	if ((fd = mkstemp(fname)) < 0) {
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-zImage-arm64.c:113: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).
	kernel_fd = open(fname, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-zImage-arm64.c:152:22:  [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).
			info->initrd_fd = open(arm64_opts.initrd, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/cris/kexec-elf-cris.c:129: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(trampoline_buf,
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.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 line[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:252: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).
	fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:619: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_mmap[256], str_tmp[20];
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:621: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 (str_mmap, " memmap=");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:626: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 (str_mmap, "K@");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:628: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 (str_mmap, "K$");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:630: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 (str_mmap, "K#");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:632: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 (str_mmap, "K!");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.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 str_mmap[256];
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:653: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(str_mmap, " memmap=exactmap");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:699: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[30], *ptr;
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:707: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(str, " elfcorehdr=");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:732: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:737: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).
	fp = fopen(crash_notes, "r");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:791: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 acpi_rsdp_buf[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:798: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(acpi_rsdp_buf, " acpi_rsdp=0x%lx", acpi_rsdp);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-bzImage.c:243: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((unsigned char *)real_mode + 0x1f1, kernel + 0x1f1,
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-bzImage.c:247: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(real_mode, kernel, kern16_size);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:58: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 headerbuf[MULTIBOOT_SEARCH];
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:86: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(headerbuf, buf, len);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:258: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(tag->entries, mmap_entries, tag->entry_size * info->memory_ranges);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:276: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(tag->string, cmdline, cmdline_len);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:311:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open("/dev/fb0", O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:374: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(tag->cmdline, (char *)(long) mod_clp, strlen((char *)(long) mod_clp) + 1);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:65: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 headerbuf[MULTIBOOT_SEARCH];
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:81: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(headerbuf, buf, len);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:171: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("/dev/fb0", O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86-common.c:66: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86-common.c:68: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).
	fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86-common.c:311: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[512];
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86-common.c:312:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *fp = fopen( "/proc/cmdline", "r" );
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86-common.c:408: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[MAX_LINE], *s;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-x86-common.c:411: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).
	fp = fopen("/sys/firmware/efi/systab", "r");
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:45: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(real_mode->header_magic, "HdrS", 4);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:122: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(cmdline_ptr, cmdline, cmdline_len);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:132: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("/dev/fb0", O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:210: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];
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:215: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).
	fp = fopen(filename, "r");
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:231: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];
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:232: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[1024];
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:239: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).
	fp = fopen(filename, "r");
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:268: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];
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:276: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).
	fp = fopen(filename, "r");
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:403:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char full_dir_name[PATH_MAX];
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:466: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];
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:488: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).
	data_file = open(filename, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:539: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[1024], *s, *end;
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:541: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).
	fp = fopen(filename, "r");
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:580: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[1024];
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:691: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(sd->data, esd, sizeof(*esd));
data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c:160: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 line[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c:166:14:  [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).
        fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c:222: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/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c:224: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(buf, " elfcorehdr=%ldK", addr/1024);
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:256: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 buf[128];
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:257: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(buf," max_addr=%lluM min_addr=%lluM",
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-ia64.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 line[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-ia64.c:85: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).
	fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/arch/m68k/bootinfo.c:195: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(bi->string, cmdline, size);
data/kexec-tools-2.0.20/kexec/arch/m68k/bootinfo.h:22: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 string[0];
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:158: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:162: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).
	fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.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 str[50], *ptr;
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:257: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(str, " mem=");
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:260:2:  [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(str, "K@");
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:277: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[30], *ptr;
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:285: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(str, " elfcorehdr=");
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:324: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:327: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).
	fp = fopen(cpuinfo, "r");
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-mips.c:41: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 cmdline_buf[COMMAND_LINE_SIZE] = CMDLINE_PREFIX;
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-mips.c:37: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-mips.c:43: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).
	fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:95: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_tree[256] = "/proc/device-tree/";
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:96: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 fname[256];
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:139:4:  [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(fname, "/reg");
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:140:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			fd = open(fname, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:269: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[COMMAND_LINE_SIZE], *ptr;
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:428: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(DEVTREE_CRASHKERNEL_BASE, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc/fixup_dtb.c:378: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).
	fp = fopen("debug.dtb", "w");
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:41: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 pathname[MAXPATH];
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:42: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 propnames[NAMESPACE] = { 0 };
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:47: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 local_cmdline[COMMAND_LINE_SIZE] = { "" };
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:127: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 fname[MAXPATH], *bname;
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:179: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(dt, &ranges, rlen);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:236: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(pathname, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:250: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 temp_cmdline[COMMAND_LINE_SIZE] = { "" };
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:261: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(temp_cmdline, dt, len);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:273: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(dt, local_cmdline, cmd_len);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:374:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dt, &initrd_base, len);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:384: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(dt, &initrd_end, len);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:422: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(pathname, "/proc/device-tree/");
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:461: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, bb, bb->off_mem_rsvmap);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:463: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+tlen, mem_rsrv, bb->off_dt_struct - bb->off_mem_rsvmap);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:465: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+tlen, dtstruct,  bb->off_dt_strings - bb->off_dt_struct);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:467: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+tlen, propnames,  bb->totalsize - bb->off_dt_strings);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:98:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char bl_desc[UPSZ(BOOTLOADER)];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:100:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char blv_desc[UPSZ(BOOTLOADER_VERSION)];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:102:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char command_line[0];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:436: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(sec_buf, buf + dol_sect_offset(h, j), 
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:457: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(arg_buf, setup_dol_start, setup_dol_size);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:458: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(notes, &elf_boot_notes, sizeof(elf_boot_notes));
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:459: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(notes->command_line, command_line, command_line_len);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:45:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char bl_desc[UPSZ(BOOTLOADER)];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:47:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char blv_desc[UPSZ(BOOTLOADER_VERSION)];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:49:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char command_line[0];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:189: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 *fixup_nodes[FIXUP_ENTRYS + 1];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:218:25:  [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).
			target_is_gamecube = atoi(optarg);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:326: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(arg_buf, setup_start, setup_size);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:327: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(notes, &elf_boot_notes, sizeof(elf_boot_notes));
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:328: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(notes->command_line, command_line, command_line_len);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:51: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(file, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:65: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(file, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c: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 buf[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:170: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_tree[256] = "/proc/device-tree/";
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:319: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_tree[256] = "/proc/device-tree/";
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:320: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 fname[256];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:321: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[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:346:4:  [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(fname, "/reg");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:347: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(fname, O_RDONLY)) < 0) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:396:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:430: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[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:433:14:  [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 ((file = fopen(fname, "r"))) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:461: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[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:462: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_tree[256] = "/proc/device-tree/";
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:463: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 fname[256];
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:491:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				strcat(fname, "/linux,kernel-end");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:492:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:521:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:544:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:594:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:618:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:657:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:677:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:696:4:  [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(fname, "/linux,rtas-base");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:697:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:710:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:731:4:  [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(fname, "/reg");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:732: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(fname, O_RDONLY)) < 0) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:747:4:  [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(fname, "/linux,tce-base");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:748:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:768:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-uImage-ppc.c:96: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 *fixup_nodes[FIXUP_ENTRYS + 1];
data/kexec-tools-2.0.20/kexec/arch/ppc/libfdt-wrapper.c:92: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, p, min(len, buflen));
data/kexec-tools-2.0.20/kexec/arch/ppc/ops.h:118: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[MAX_PATH_LEN];
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:135: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 fname[128], buf[32];
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:141: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(fname, "/proc/device-tree/");
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:142:2:  [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(fname, "ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory");
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:144: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(fname, "-v2");
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:145:14:  [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 ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.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 fpath[PATH_LEN];
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:206: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/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:222: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(fpath, "/compatible");
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:223:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((file = fopen(fpath, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:261: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_tree[256] = "/proc/device-tree/";
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:262: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 fname[PATH_LEN];
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:263: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[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:327:4:  [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(fname, "/reg");
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:328:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:461: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[COMMAND_LINE_SIZE], *ptr;
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:631: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(DEVTREE_CRASHKERNEL_BASE, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c:79: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(name, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c:155:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		info->initrd_fd = open(ramdisk, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:153: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 fname[128], buf[32];
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:158: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(fname, "/proc/device-tree/");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:159:2:  [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(fname, "ibm,dynamic-reconfiguration-memory/ibm,lmb-size");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:160:14:  [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 ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:176: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(fname, "/proc/device-tree/");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:177:2:  [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(fname,
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:179:14:  [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 ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:180: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(fname, "-v2");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:181:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c: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 device_tree[256] = "/proc/device-tree/";
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:250: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 fname[256];
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:251: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[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:280:4:  [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(fname, "/reg");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:281:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:335: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 fname[256], buf[16];
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:339: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(fname, "/proc/device-tree/reserved-ranges");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:341:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:378: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[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:381:14:  [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 ((file = fopen(fname, "r"))) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:409: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[MAXBYTES];
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:410: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_tree[256] = "/proc/device-tree/";
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:411: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 fname[256];
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:441:4:  [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(fname, "/linux,kernel-end");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:442:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:464:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				strcat(fname, "/linux,crashkernel-base");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:465:17:  [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 ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:480:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				strcat(fname, "/linux,crashkernel-size");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:481:17:  [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 ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:510:4:  [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(fname, "/linux,memory-limit");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:511:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:535:4:  [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(fname, "/linux,htab-base");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:536:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:556:4:  [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(fname, "/linux,htab-size");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:557:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:580:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				strcat(fname, "/linux,initrd-start");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:581:17:  [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 ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:600:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				strcat(fname, "/linux,initrd-end");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:601:17:  [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 ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:627:4:  [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(fname, "/linux,rtas-base");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:628:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:641:4:  [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(fname, "/rtas-size");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:642:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:664:4:  [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(fname, "/opal-base-address");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:665:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:680:4:  [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(fname, "/opal-runtime-size");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:681:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file = fopen(fname, "r");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:705:4:  [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(fname, "/reg");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:706:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:727:4:  [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(fname, "/linux,tce-base");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:728:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:747:4:  [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(fname, "/linux,tce-size");
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-ppc64.c:748:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			if ((file = fopen(fname, "r")) == NULL) {
data/kexec-tools-2.0.20/kexec/arch/s390/crashdump-s390.c:31: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[COMMAND_LINESIZE];
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:28: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 command_line[COMMAND_LINESIZE];
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:77:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		info->initrd_fd = open(ramdisk, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:191: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(krnl_buffer + COMMAND_LINE_OFFS, command_line, strlen(command_line));
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:36: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).
	fh = fopen(path, "rb");
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:120: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[PATH_MAX];
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:121: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[64];
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:155: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[80];
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:158: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).
	fp = fopen(iomem,"r");
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:116: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[COMMAND_LINE_SIZE], *ptr;
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-netbsd-sh.c:141: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(param, netbsd_booter, 256);
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:152: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 append_buf[256];
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:158:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if((fp = fopen("/proc/cmdline", "r")) == NULL){
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:179:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(zero_page_buf + 0x100, cmd_line, n);
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:187: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:191: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).
	fp = fopen(cpuinfo, "r");
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:189: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((unsigned char *)real_mode + 0x1f1, kernel + 0x1f1,
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:303:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		info->initrd_fd = open(ramdisk, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-rel-x86_64.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 buf[100];
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-rel-x86_64.c:54:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, "R_X86_64_%lu", r_type);
data/kexec-tools-2.0.20/kexec/crashdump-elf.c:111: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(elf->e_ident, ELFMAG, SELFMAG);
data/kexec-tools-2.0.20/kexec/crashdump-xen.c:60: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 signature[13];
data/kexec-tools-2.0.20/kexec/crashdump.c:67: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 crash_notes[PATH_MAX];
data/kexec-tools-2.0.20/kexec/crashdump.c:68: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 crash_notes_size[PATH_MAX];
data/kexec-tools-2.0.20/kexec/crashdump.c:69: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/crashdump.c:80: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(crash_notes, "/sys/devices/system/cpu/cpu%d/crash_notes", cpu);
data/kexec-tools-2.0.20/kexec/crashdump.c:81: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).
	fp = fopen(crash_notes, "r");
data/kexec-tools-2.0.20/kexec/crashdump.c:108: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(crash_notes_size,
data/kexec-tools-2.0.20/kexec/crashdump.c:110: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).
	fp = fopen(crash_notes_size, "r");
data/kexec-tools-2.0.20/kexec/crashdump.c:131: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/crashdump.c:139:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(fp = fopen(kdump_info, "r")))
data/kexec-tools-2.0.20/kexec/firmware_memmap.c:60: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 linebuffer[BUFSIZ];
data/kexec-tools-2.0.20/kexec/firmware_memmap.c:63: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).
	fp = fopen(filename, "r");
data/kexec-tools-2.0.20/kexec/firmware_memmap.c:96: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 linebuffer[BUFSIZ];
data/kexec-tools-2.0.20/kexec/firmware_memmap.c:99: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).
	fp = fopen(filename, "r");
data/kexec-tools-2.0.20/kexec/firmware_memmap.c:126: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];
data/kexec-tools-2.0.20/kexec/firmware_memmap.c:243: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 full_path[PATH_MAX];
data/kexec-tools-2.0.20/kexec/fs2dt.c:42: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 pathname[MAXPATH];
data/kexec-tools-2.0.20/kexec/fs2dt.c:43: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 propnames[NAMESPACE] = { 0 };
data/kexec-tools-2.0.20/kexec/fs2dt.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 local_cmdline[COMMAND_LINE_SIZE] = { "" };
data/kexec-tools-2.0.20/kexec/fs2dt.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 fname[MAXPATH], *bname;
data/kexec-tools-2.0.20/kexec/fs2dt.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 buf[32];
data/kexec-tools-2.0.20/kexec/fs2dt.c:313: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(dt, ranges, rlen);
data/kexec-tools-2.0.20/kexec/fs2dt.c:330: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 fname[MAXPATH], *bname;
data/kexec-tools-2.0.20/kexec/fs2dt.c:387: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(dt, ranges, rlen);
data/kexec-tools-2.0.20/kexec/fs2dt.c:467: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(dt, buf, slen);
data/kexec-tools-2.0.20/kexec/fs2dt.c:475: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(pathname, O_RDONLY);
data/kexec-tools-2.0.20/kexec/fs2dt.c:530: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[MAXPATH];
data/kexec-tools-2.0.20/kexec/fs2dt.c:536:2:  [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(filename, "bootargs");
data/kexec-tools-2.0.20/kexec/fs2dt.c:537: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).
	fp = fopen(filename, "r");
data/kexec-tools-2.0.20/kexec/fs2dt.c:611: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(dt, &bevalue, len);
data/kexec-tools-2.0.20/kexec/fs2dt.c:622: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(dt, &bevalue, len);
data/kexec-tools-2.0.20/kexec/fs2dt.c:637:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char filename[MAXPATH];
data/kexec-tools-2.0.20/kexec/fs2dt.c:663: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(dt, local_cmdline,cmd_len);
data/kexec-tools-2.0.20/kexec/fs2dt.c:674:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(filename, O_RDONLY);
data/kexec-tools-2.0.20/kexec/fs2dt.c:677:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			fd = open(filename, O_RDONLY);
data/kexec-tools-2.0.20/kexec/fs2dt.c:706:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(filename, O_RDONLY);
data/kexec-tools-2.0.20/kexec/fs2dt.c:801: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, bb, tlen);
data/kexec-tools-2.0.20/kexec/fs2dt.c:805: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 + toff, mem_rsrv, tlen);
data/kexec-tools-2.0.20/kexec/fs2dt.c:809: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 + toff, dt_base,  tlen);
data/kexec-tools-2.0.20/kexec/fs2dt.c:813: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 + toff, propnames,  tlen);
data/kexec-tools-2.0.20/kexec/fs2dt.c:821: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(pathname, "/proc/device-tree/");
data/kexec-tools-2.0.20/kexec/kexec-elf-boot.c:39:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char bl_desc[UPSZ(BOOTLOADER)];
data/kexec-tools-2.0.20/kexec/kexec-elf-boot.c:41:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char blv_desc[UPSZ(BOOTLOADER_VERSION)];
data/kexec-tools-2.0.20/kexec/kexec-elf-boot.c:43:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char command_line[0];
data/kexec-tools-2.0.20/kexec/kexec-elf-boot.c:79: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(notes, &boot_notes, sizeof(boot_notes));
data/kexec-tools-2.0.20/kexec/kexec-elf-boot.c:80: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(notes->command_line, cmdline, cmdline_len);
data/kexec-tools-2.0.20/kexec/kexec-elf-rel.c:276: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(buf + off, shdr->sh_data, shdr->sh_size);
data/kexec-tools-2.0.20/kexec/kexec-elf-rel.c:524: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(sym_buf, buf, size);
data/kexec-tools-2.0.20/kexec/kexec-elf-rel.c:548: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, sym_buf,size);
data/kexec-tools-2.0.20/kexec/kexec-elf.c:245:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char e_ident[EI_NIDENT];
data/kexec-tools-2.0.20/kexec/kexec-elf.c:665: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(hdr, note, sizeof(*hdr));
data/kexec-tools-2.0.20/kexec/kexec-iomem.c:37: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[MAX_LINE];
data/kexec-tools-2.0.20/kexec/kexec-iomem.c:45: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).
	fp = fopen(iomem, "r");
data/kexec-tools-2.0.20/kexec/kexec-xen.c:134: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(seg_buf, segments[s].buf, segments[s].bufsz);
data/kexec-tools-2.0.20/kexec/kexec.c:537: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(filename, O_RDONLY | _O_BINARY);
data/kexec-tools-2.0.20/kexec/kexec.c:616: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(filename, O_RDONLY | _O_BINARY);
data/kexec-tools-2.0.20/kexec/kexec.c:922: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[3];
data/kexec-tools-2.0.20/kexec/kexec.c:928: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).
	fp = fopen(file, "r");
data/kexec-tools-2.0.20/kexec/kexec.c:1115: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).
	fp = fopen("/proc/cmdline", "r");
data/kexec-tools-2.0.20/kexec/kexec.c:1198: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).
	kernel_fd = open(kernel, O_RDONLY);
data/kexec-tools-2.0.20/kexec/kexec.h:80:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&_v, (loc), size); \
data/kexec-tools-2.0.20/kexec/kexec.h:95:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy((loc), &_v, size); \
data/kexec-tools-2.0.20/kexec/libfdt/fdt.h:32: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[0];
data/kexec-tools-2.0.20/kexec/libfdt/fdt.h:39: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 data[0];
data/kexec-tools-2.0.20/kexec/libfdt/fdt_ro.c:293: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(buf + p, name, namelen);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c:168: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(new, s, len);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c:270: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(namep, name, newlen+1);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c:288: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(prop->data, val, len);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c:341: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(nh->name, name, namelen);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_sw.c:150: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(nh->name, name, namelen);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_sw.c:186: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(strtab + offset, s, len);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_sw.c:209: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(prop->data, val, len);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_wip.c:71: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(propval, val, len);
data/kexec-tools-2.0.20/kexec/lzma.c:54:8:  [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).
		fp = fopen(path, encoding ? "w" : "r");
data/kexec-tools-2.0.20/kexec/symbols.c:9: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 sym[128];
data/kexec-tools-2.0.20/kexec/symbols.c:10: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[128];
data/kexec-tools-2.0.20/kexec/symbols.c:15: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).
	fp = fopen(kallsyms, "r");
data/kexec-tools-2.0.20/purgatory/arch/i386/crashdump_backup.c:49:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dest, src, size);
data/kexec-tools-2.0.20/purgatory/arch/i386/purgatory-x86.c:48:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(cmdline_end, " kexec_jump_back_entry=0x%x",
data/kexec-tools-2.0.20/purgatory/arch/ia64/purgatory-ia64.c:263: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(new_boot_param, boot_param, 4096);
data/kexec-tools-2.0.20/purgatory/arch/ia64/purgatory-ia64.c:281: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(command_line + command_line_len,
data/kexec-tools-2.0.20/purgatory/arch/ppc64/console-ppc64.c:32: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 buff[16] = "";
data/kexec-tools-2.0.20/purgatory/arch/ppc64/crashdump_backup.c:37:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dest, src, BACKUP_SRC_SIZE);
data/kexec-tools-2.0.20/purgatory/arch/s390/purgatory-s390.c:47: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[1024];
data/kexec-tools-2.0.20/purgatory/arch/x86_64/purgatory-x86_64.c:21:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(cmdline_end, " kexec_jump_back_entry=0x%lx",
data/kexec-tools-2.0.20/purgatory/include/string.h:8: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.
void* memcpy(void *dest, const void *src, size_t len);
data/kexec-tools-2.0.20/purgatory/printf.c:55: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 tmp[40], *q = tmp;
data/kexec-tools-2.0.20/purgatory/string.c:24: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.
void* memcpy(void *dest, const void *src, size_t len)
data/kexec-tools-2.0.20/util_lib/compute_ip_checksum.c:42:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&buffer, ptr, 1);
data/kexec-tools-2.0.20/util_lib/compute_ip_checksum.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(&buffer, ptr, 1);
data/kexec-tools-2.0.20/util_lib/elf_info.c:28: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 osrelease[4096];
data/kexec-tools-2.0.20/util_lib/elf_info.c:291: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 temp_buf[1024];
data/kexec-tools-2.0.20/util_lib/elf_info.c:348: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(osrelease, pos + 10, to_copy);
data/kexec-tools-2.0.20/util_lib/elf_info.c:631: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, out_buf[OUT_BUF_SIZE];
data/kexec-tools-2.0.20/util_lib/elf_info.c:708:10:  [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(out_buf + len, "[%5llu.%06llu] ",
data/kexec-tools-2.0.20/util_lib/elf_info.c:731:12:  [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(out_buf + len, "\\x%02x", c);
data/kexec-tools-2.0.20/util_lib/sha256.c:204: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( ctx->buffer + left, input, fill );
data/kexec-tools-2.0.20/util_lib/sha256.c:220: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(ctx->buffer + left, input, length);
data/kexec-tools-2.0.20/util_lib/sha256.c:291: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 output[65];
data/kexec-tools-2.0.20/util_lib/sha256.c:293:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char buf[1000];
data/kexec-tools-2.0.20/util_lib/sha256.c:294:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char sha256sum[32];
data/kexec-tools-2.0.20/util_lib/sha256.c:325: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( output + j * 2, "%02x", sha256sum[j] );
data/kexec-tools-2.0.20/util_lib/sha256.c:341:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if( ! ( f = fopen( argv[1], "rb" ) ) )
data/kexec-tools-2.0.20/vmcore-dmesg/vmcore-dmesg.c:19: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(fname, O_RDONLY);
data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.c:174:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.c:198:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	(void) strncpy(cmdline, buf, COMMAND_LINE_SIZE);
data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.c:342: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).
	if (strncmp(str, CRASH_KERNEL_BOOT, strlen(CRASH_KERNEL_BOOT)) == 0) {
data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.c:349: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).
	else if (strncmp(str, CRASH_KERNEL, strlen(CRASH_KERNEL)) == 0) {
data/kexec-tools-2.0.20/kexec/arch/arm/crashdump-arm.c:358: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).
	else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0) {
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.c:56: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).
		if (memcmp(str, SYSTEM_RAM_BOOT, strlen(SYSTEM_RAM_BOOT)) == 0 ||
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-arm.c:57: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).
		    memcmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0) {
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:476: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).
		command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:545: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).
				command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:625:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			(void) strncpy(modified_cmdline, command_line,
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:636: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).
		command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/arm/kexec-zImage-arm.c:718: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(command_line) + 1))
data/kexec-tools-2.0.20/kexec/arch/arm64/crashdump-arm64.c:92: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 (strncmp(str, CRASH_KERNEL, strlen(CRASH_KERNEL)) == 0)
data/kexec-tools-2.0.20/kexec/arch/arm64/crashdump-arm64.c:95: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).
	else if (strncmp(str, SYSTEM_RAM, strlen(SYSTEM_RAM)) == 0)
data/kexec-tools-2.0.20/kexec/arch/arm64/crashdump-arm64.c:98: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).
	else if (strncmp(str, KERNEL_CODE, strlen(KERNEL_CODE)) == 0)
data/kexec-tools-2.0.20/kexec/arch/arm64/crashdump-arm64.c:100: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).
	else if (strncmp(str, KERNEL_DATA, strlen(KERNEL_DATA)) == 0)
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:642: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(arm64_opts.command_line) >
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:649:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(command_line, arm64_opts.command_line,
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:956:32:  [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(str, SYSTEM_RAM, strlen(SYSTEM_RAM)))
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c:958: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).
	else if (!strncmp(str, IOMEM_RESERVED, strlen(IOMEM_RESERVED)))
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-image-arm64.c:58: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(arm64_opts.command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/arm64/kexec-zImage-arm64.c:165: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(arm64_opts.command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:608: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).
	for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:636:2:  [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 (str_mmap, "K");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:637: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(str_mmap);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:638: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).
	cmdlen = strlen(cmdline) + len;
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:654: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(str_mmap);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:655: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).
	cmdlen = strlen(cmdline) + len;
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:708: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).
	ptr += strlen(str);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:710:2:  [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(str, "K");
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:711: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(str);
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:712: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).
	cmdlen = strlen(cmdline) + len;
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:799: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(cmdline) + strlen(acpi_rsdp_buf) > (COMMAND_LINE_SIZE - 1))
data/kexec-tools-2.0.20/kexec/arch/i386/crashdump-x86.c:799: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).
	if (strlen(cmdline) + strlen(acpi_rsdp_buf) > (COMMAND_LINE_SIZE - 1))
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-bzImage.c:178:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(modified_cmdline, command_line,
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-bzImage.c:194: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).
		command_line_len = strlen(command_line) +1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-bzImage.c:435: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).
		command_line_len = strlen(command_line) +1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-elf-x86.c:164: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).
		command_line_len = strlen(command_line) +1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-elf-x86.c:177:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(modified_cmdline, command_line,
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-elf-x86.c:270: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).
			command_line_len = strlen(modified_cmdline) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:125: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).
			+ ALIGN_UP (strlen(BOOTLOADER " " BOOTLOADER_VERSION) + 1, MULTIBOOT_TAG_ALIGN))
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:284:53:  [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).
		tag->size = sizeof(struct multiboot_tag_string) + strlen(BOOTLOADER " " BOOTLOADER_VERSION) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:370:52:  [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).
	tag->size = sizeof(struct multiboot_tag_module) + strlen((char *)(long) mod_clp) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:374: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).
	memcpy(tag->cmdline, (char *)(long) mod_clp, strlen((char *)(long) mod_clp) + 1);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:449:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			mod_command_line_space += strlen(optarg) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:464: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).
	command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-mb2-x86.c:521: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).
			mod_clp += strlen(mod_clp) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:280:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			mod_command_line_space += strlen(optarg) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:295: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).
	command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:328: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 (BOOTLOADER " " BOOTLOADER_VERSION) + 1, 4);
data/kexec-tools-2.0.20/kexec/arch/i386/kexec-multiboot-x86.c:468: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).
			mod_clp += strlen(mod_clp) + 1;
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:493:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(data_file, buf, size);
data/kexec-tools-2.0.20/kexec/arch/i386/x86-linux-setup.c:549: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).
		*val = strtoull(s + strlen(pattern), &end, 16);
data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c:225: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(*cmdline) + strlen(buf) + 1;
data/kexec-tools-2.0.20/kexec/arch/ia64/crashdump-ia64.c:225: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).
	len = strlen(*cmdline) + strlen(buf) + 1;
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:173: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).
		command_line_len = strlen(command_line) + 16;
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:249: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).
		command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:259: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).
			command_line_len = strlen(cmdline) + strlen(buf) + 1;
data/kexec-tools-2.0.20/kexec/arch/ia64/kexec-elf-ia64.c:259: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).
			command_line_len = strlen(cmdline) + strlen(buf) + 1;
data/kexec-tools-2.0.20/kexec/arch/m68k/bootinfo.c:193: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).
	size = strlen(cmdline) + 1;
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:239: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).
	for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:258: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).
	ptr += strlen(str);
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:261: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).
	ptr = str + strlen(str);
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:263:2:  [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(str, "K");
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:264: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(str);
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:265: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).
	cmdlen = strlen(cmdline) + len;
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:286: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).
	ptr += strlen(str);
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:288:2:  [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(str, "K");
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:289: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(str);
data/kexec-tools-2.0.20/kexec/arch/mips/crashdump-mips.c:290: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).
	cmdlen = strlen(cmdline) + len;
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-mips.c:118: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).
		command_line_len = strlen(arch_options.command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-mips.c:130:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(cmdline_buf, arch_options.command_line, command_line_len);
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-mips.c:132:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(cmdline_buf, crash_cmdline,
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-mips.c:134:5:  [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(crash_cmdline) - 1);
data/kexec-tools-2.0.20/kexec/arch/mips/kexec-elf-mips.c:153:60:  [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).
		create_flatten_tree(&dtb_buf, &dtb_length, cmdline_buf + strlen(CMDLINE_PREFIX));
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:245: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).
	for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:256: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 cmdlen = strlen(cmdline) + strlen(str);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:256: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).
	int cmdlen = strlen(cmdline) + strlen(str);
data/kexec-tools-2.0.20/kexec/arch/ppc/crashdump-powerpc.c:284: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).
	ptr += strlen(str);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:113:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			offset += strlen(propnames+offset)+1;
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:117: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).
	if (NAMESPACE - offset < strlen(name) + 1)
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:241:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, dt, len) != len)
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:252: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).
			cmd_len = strlen(local_cmdline);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:266:7:  [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(local_cmdline, " ");
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:270:4:  [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(local_cmdline, " ");
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:271: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).
			cmd_len = strlen(local_cmdline);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:313: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).
			res = strlen(p1) - strlen(p2);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:313: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).
			res = strlen(p1) - strlen(p2);
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:350: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).
	dt += strlen((void *)dt) / sizeof(unsigned) + 1;
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:352:2:  [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(pathname, "/");
data/kexec-tools-2.0.20/kexec/arch/ppc/fs2dt.c:353: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).
	dn = pathname + strlen(pathname);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-dol-ppc.c:365: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).
		command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:244: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).
	command_line_len = strlen(command_line);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:296: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).
		crash_cmdline_len = strlen(crash_cmdline);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:343:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(cmdline_buf, command_line, command_line_len);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:345:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(cmdline_buf, crash_cmdline,
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-elf-ppc.c:347:5:  [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(crash_cmdline) - 1);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:57:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	res = read(fd, &dt_address_cells, sizeof(dt_address_cells));
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:71:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	res = read(fd, &dt_size_cells, sizeof(dt_size_cells));
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-ppc.c:101:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, buf, nbytes) != nbytes) {
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-uImage-ppc.c:152: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).
	command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-uImage-ppc.c:193: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).
		crash_cmdline_len = strlen(crash_cmdline);
data/kexec-tools-2.0.20/kexec/arch/ppc/kexec-uImage-ppc.c:210:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(cmdline_buf, crash_cmdline, crash_cmdline_len);
data/kexec-tools-2.0.20/kexec/arch/ppc/libfdt-wrapper.c:121: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).
		expand_buf(strlen(name) + 16);
data/kexec-tools-2.0.20/kexec/arch/ppc/ops.h:72:42:  [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 dt_ops.setprop(devp, name, buf, strlen(buf) + 1);
data/kexec-tools-2.0.20/kexec/arch/ppc/ops.h:104: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).
				       strlen(propval) + 1);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:450: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).
	for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:476: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).
	ptr += strlen(str);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:479: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(str);
data/kexec-tools-2.0.20/kexec/arch/ppc64/crashdump-ppc64.c:480: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).
	cmdlen = strlen(cmdline) + len;
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c:83:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rlen = read(fd, value, len);
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c:148: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).
		cmdline_len = strlen(cmdline) + 1;
data/kexec-tools-2.0.20/kexec/arch/ppc64/kexec-elf-ppc64.c:258:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(modified_cmdline, cmdline, COMMAND_LINE_SIZE);
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:41: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(command_line) + strlen(str) + 1 > COMMAND_LINESIZE) {
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:41: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).
	if (strlen(command_line) + strlen(str) + 1 > COMMAND_LINESIZE) {
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:86: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).
	info->command_line_len = strlen (command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:189: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(command_line) != 0) {
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-image.c:191:57:  [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(krnl_buffer + COMMAND_LINE_OFFS, command_line, strlen(command_line));
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:44: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).
	if (string[strlen(string) - 1] == '\n')
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:45: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).
		string[strlen(string) - 1] = 0;
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:175: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).
		if ((memcmp(str, sys_ram, strlen(sys_ram)) == 0) ||
data/kexec-tools-2.0.20/kexec/arch/s390/kexec-s390.c:176: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).
		    ((memcmp(str, crash_kernel, strlen(crash_kernel)) == 0) &&
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:105: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).
	for (j = 0, k = strlen(str) - 1; j < k; j++, k--) {
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:131: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).
	ptr += strlen(str);
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:134: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(str);
data/kexec-tools-2.0.20/kexec/arch/sh/crashdump-sh.c:135: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).
	cmdlen = strlen(cmdline) + len;
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-elf-sh.c:108:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(modified_cmdline, command_line,
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:162: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(append_buf);
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:176: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).
		if (n > strlen(cmd_line))
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:177: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).
			n = strlen(cmd_line);
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:199: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 (strncmp(line, key, strlen(key)))
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:201: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).
		p = strchr(line + strlen(key), ':');
data/kexec-tools-2.0.20/kexec/arch/sh/kexec-sh.c:204:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!strncmp(p + 1, value, strlen(value)))
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:153:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(modified_cmdline, command_line,
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:169: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).
		command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:289: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).
		command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-bzImage64.c:377: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).
		command_line_len = strlen(command_line) + 1;
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-x86_64.c:163: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).
		command_line_len = strlen(command_line) +1;
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-x86_64.c:173:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(modified_cmdline, command_line,
data/kexec-tools-2.0.20/kexec/arch/x86_64/kexec-elf-x86_64.c:250: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).
			command_line_len = strlen(modified_cmdline) + 1;
data/kexec-tools-2.0.20/kexec/dt-ops.c:57: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).
		command_line, strlen(command_line) + 1);
data/kexec-tools-2.0.20/kexec/dt-ops.c:89: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).
	new_node = malloc(strlen("/") + strlen(node) + 1);
data/kexec-tools-2.0.20/kexec/dt-ops.c:89: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).
	new_node = malloc(strlen("/") + strlen(node) + 1);
data/kexec-tools-2.0.20/kexec/dt-ops.c:95:2:  [1] (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 character.
	strcpy(new_node, "/");
data/kexec-tools-2.0.20/kexec/dt-ops.c:150: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).
	new_node = malloc(strlen("/") + strlen(node) + 1);
data/kexec-tools-2.0.20/kexec/dt-ops.c:150: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).
	new_node = malloc(strlen("/") + strlen(node) + 1);
data/kexec-tools-2.0.20/kexec/dt-ops.c:156:2:  [1] (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 character.
	strcpy(new_node, "/");
data/kexec-tools-2.0.20/kexec/firmware_memmap.c:114: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).
	end = linebuffer + strlen(linebuffer) - 1;
data/kexec-tools-2.0.20/kexec/fs2dt.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).
			offset += strlen(propnames+offset)+1;
data/kexec-tools-2.0.20/kexec/fs2dt.c:164: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).
	if (NAMESPACE - offset < strlen(name) + 1)
data/kexec-tools-2.0.20/kexec/fs2dt.c:247:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, buf, LMB_ENTRY_SIZE) < 0)
data/kexec-tools-2.0.20/kexec/fs2dt.c:350:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, buf, sizeof(buf)) != sizeof(buf))
data/kexec-tools-2.0.20/kexec/fs2dt.c:511: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 len1 = strlen(str1);
data/kexec-tools-2.0.20/kexec/fs2dt.c:512: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 len2 = strlen(str2);
data/kexec-tools-2.0.20/kexec/fs2dt.c:547: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(local_cmdline);
data/kexec-tools-2.0.20/kexec/fs2dt.c:549:4:  [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(local_cmdline, " ");
data/kexec-tools-2.0.20/kexec/fs2dt.c:583: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).
	plen = *basename ? strlen(basename) : 0;
data/kexec-tools-2.0.20/kexec/fs2dt.c:594: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(pathname, "/");
data/kexec-tools-2.0.20/kexec/fs2dt.c:595: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).
	dn = pathname + strlen(pathname);
data/kexec-tools-2.0.20/kexec/fs2dt.c:641: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).
		cmd_len = strlen(local_cmdline);
data/kexec-tools-2.0.20/kexec/fs2dt.c:653: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(local_cmdline, " ");
data/kexec-tools-2.0.20/kexec/fs2dt.c:654: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).
		cmd_len = strlen(local_cmdline);
data/kexec-tools-2.0.20/kexec/fs2dt.c:698:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		result = read(fd, buff, statbuf.st_size);
data/kexec-tools-2.0.20/kexec/fs2dt.c:724:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		result = read(fd, buff, statbuf.st_size);
data/kexec-tools-2.0.20/kexec/ifdown.c:56:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(ifr.ifr_name, ifp->if_name, IFNAMSIZ);
data/kexec-tools-2.0.20/kexec/kexec-iomem.c:55: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).
		if (!match || memcmp(str, match, strlen(match)) == 0) {
data/kexec-tools-2.0.20/kexec/kexec.c:500:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		result = read(fd, buf + progress, size - progress);
data/kexec-tools-2.0.20/kexec/kexec.c:1087: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).
		memmove(start, end+1, strlen(end));
data/kexec-tools-2.0.20/kexec/kexec.c:1088: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).
		*(end + strlen(end)) = 0;
data/kexec-tools-2.0.20/kexec/kexec.c:1125: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).
	line[strlen(line) - 1] = '\0';
data/kexec-tools-2.0.20/kexec/kexec.c:1157: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).
	cmdline = xmalloc(strlen(base) + 1 + strlen(append) + 1);
data/kexec-tools-2.0.20/kexec/kexec.c:1157:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	cmdline = xmalloc(strlen(base) + 1 + strlen(append) + 1);
data/kexec-tools-2.0.20/kexec/kexec.c:1159:2:  [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(cmdline, " ");
data/kexec-tools-2.0.20/kexec/libfdt/fdt.c:182: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).
	int len = strlen(s) + 1;
data/kexec-tools-2.0.20/kexec/libfdt/fdt_ro.c:123:61:  [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 fdt_subnode_offset_namelen(fdt, parentoffset, name, strlen(name));
data/kexec-tools-2.0.20/kexec/libfdt/fdt_ro.c:128: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).
	const char *end = path + strlen(path);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_ro.c:168: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(nh->name);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_ro.c:413: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).
	int len = strlen(str);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c:155: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).
	int len = strlen(s) + 1;
data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c:263: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).
	newlen = strlen(name);
data/kexec-tools-2.0.20/kexec/libfdt/fdt_rw.c:350:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
data/kexec-tools-2.0.20/kexec/libfdt/fdt_sw.c:141: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).
	int namelen = strlen(name) + 1;
data/kexec-tools-2.0.20/kexec/libfdt/fdt_sw.c:173: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).
	int len = strlen(s) + 1;
data/kexec-tools-2.0.20/kexec/libfdt/libfdt.h:795: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).
	fdt_property(fdt, name, str, strlen(str)+1)
data/kexec-tools-2.0.20/kexec/libfdt/libfdt.h:975:50:  [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).
	fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
data/kexec-tools-2.0.20/kexec/libfdt/libfdt.h:1086: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).
		FDT_TAGALIGN(strlen(node_name) + 1) + FDT_TAGSIZE;
data/kexec-tools-2.0.20/kexec/libfdt/libfdt.h:1095: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(prop_name) + 1) +
data/kexec-tools-2.0.20/kexec/phys_arch.c:21: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(arches[i].machine)) == 0))
data/kexec-tools-2.0.20/util/bin-to-hex.c:11:13:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((c = getchar()) != EOF) {
data/kexec-tools-2.0.20/util_lib/elf_info.c:330:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(temp_buf, pos, len);
data/kexec-tools-2.0.20/util_lib/elf_info.c:366: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:367: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).
			log_sz = strtoull(pos + strlen(str), NULL, 10);
data/kexec-tools-2.0.20/util_lib/elf_info.c:370: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:371: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).
			log_sz = strtoull(pos + strlen(str), NULL, 10);
data/kexec-tools-2.0.20/util_lib/elf_info.c:375: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:376:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			log_offset_ts_nsec = strtoull(pos + strlen(str), NULL,
data/kexec-tools-2.0.20/util_lib/elf_info.c:379: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:380:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			log_offset_ts_nsec = strtoull(pos + strlen(str), NULL,
data/kexec-tools-2.0.20/util_lib/elf_info.c:384: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:385: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).
			log_offset_len = strtoul(pos + strlen(str), NULL, 10);
data/kexec-tools-2.0.20/util_lib/elf_info.c:388: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:389: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).
			log_offset_len = strtoul(pos + strlen(str), NULL, 10);
data/kexec-tools-2.0.20/util_lib/elf_info.c:392: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:393:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			log_offset_text_len = strtoul(pos + strlen(str), NULL,
data/kexec-tools-2.0.20/util_lib/elf_info.c:396: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).
		if (memcmp(str, pos, strlen(str)) == 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:397:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			log_offset_text_len = strtoul(pos + strlen(str), NULL,
data/kexec-tools-2.0.20/util_lib/elf_info.c:402: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).
		if (memcmp(str, pos, strlen(str)) == 0) {
data/kexec-tools-2.0.20/util_lib/elf_info.c:403:32:  [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).
			phys_offset = strtoul(pos + strlen(str), &endp,
data/kexec-tools-2.0.20/util_lib/elf_info.c:405: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).
			if (strlen(endp) != 0)
data/kexec-tools-2.0.20/util_lib/elf_info.c:406: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).
				phys_offset = strtoul(pos + strlen(str), &endp, 16);
data/kexec-tools-2.0.20/util_lib/elf_info.c:407: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 ((phys_offset == LONG_MAX) || strlen(endp) != 0) {
data/kexec-tools-2.0.20/util_lib/sha256.c:309: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( msg[i] ) );

ANALYSIS SUMMARY:

Hits = 727
Lines analyzed = 40903 in approximately 1.13 seconds (36304 lines/second)
Physical Source Lines of Code (SLOC) = 29429
Hits@level = [0] 567 [1] 212 [2] 367 [3]  35 [4] 113 [5]   0
Hits@level+ = [0+] 1294 [1+] 727 [2+] 515 [3+] 148 [4+] 113 [5+]   0
Hits/KSLOC@level+ = [0+] 43.9702 [1+] 24.7035 [2+] 17.4997 [3+] 5.02905 [4+] 3.83975 [5+]   0
Symlinks skipped = 1 (--allowlink overrides but see doc for security issue)
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.