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/tiny-initramfs-0.1/util.c
Examining data/tiny-initramfs-0.1/io.c
Examining data/tiny-initramfs-0.1/tiny_initramfs.h
Examining data/tiny-initramfs-0.1/mount.c
Examining data/tiny-initramfs-0.1/tiny_initramfs.c
Examining data/tiny-initramfs-0.1/fstab.c
Examining data/tiny-initramfs-0.1/log.c
Examining data/tiny-initramfs-0.1/nfs.c
Examining data/tiny-initramfs-0.1/nfs4.h
Examining data/tiny-initramfs-0.1/devices.c

FINAL RESULTS:

data/tiny-initramfs-0.1/devices.c:124:19:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    have_device = access(device, F_OK) != 0;
data/tiny-initramfs-0.1/devices.c:148:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
      have_device = access(device, F_OK) != 0;
data/tiny-initramfs-0.1/tiny_initramfs.c:182: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(TARGET_DIRECTORY "/dev", F_OK) != 0)
data/tiny-initramfs-0.1/tiny_initramfs.c:184: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(TARGET_DIRECTORY "/proc", F_OK) != 0)
data/tiny-initramfs-0.1/tiny_initramfs.c:442:3:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  execv(binary, argv);
data/tiny-initramfs-0.1/tiny_initramfs.c:280:9:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    r = chroot(".");
data/tiny-initramfs-0.1/devices.c:105: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 uuid[16];
data/tiny-initramfs-0.1/devices.c:166: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 uuid_buf[32 + 4 + 1] = { 0 };
data/tiny-initramfs-0.1/devices.c:167: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 uuid_temp[16];
data/tiny-initramfs-0.1/devices.c:248:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/tiny-initramfs-0.1/devices.c:251: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 fn_buf[MAX_PATH_LEN];
data/tiny-initramfs-0.1/devices.c:253:11:  [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).
  dirfd = open("/dev", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
data/tiny-initramfs-0.1/devices.c:376: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(device_name, O_RDONLY | O_CLOEXEC);
data/tiny-initramfs-0.1/devices.c:421:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[0x78];
data/tiny-initramfs-0.1/devices.c:434:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[0x30];
data/tiny-initramfs-0.1/devices.c:447:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[0x48];
data/tiny-initramfs-0.1/fstab.c:52:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char line[MAX_LINE_LEN] = { 0 };
data/tiny-initramfs-0.1/fstab.c:53: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 *fields[6] = { 0 };
data/tiny-initramfs-0.1/io.c:33:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[MAX_LINE_LEN] = { 0 };
data/tiny-initramfs-0.1/io.c:39: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 | O_CLOEXEC);
data/tiny-initramfs-0.1/log.c:107: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(KMSG_FILENAME, O_WRONLY | O_NOCTTY | O_CLOEXEC);
data/tiny-initramfs-0.1/mount.c:44: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 supported_filesystems[MAX_SUPPORTED_FILESYSTEMS][MAX_FILESYSTEM_TYPE_LEN];
data/tiny-initramfs-0.1/mount.c:54:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char data[MAX_LINE_LEN];
data/tiny-initramfs-0.1/mount.c:214: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 opts[MAX_LINE_LEN] = { 0 };
data/tiny-initramfs-0.1/nfs.c:78: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 p_options[MAX_LINE_LEN], *token, *saveptr, *opt_val, *endptr;
data/tiny-initramfs-0.1/nfs.c:81: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 ip_addr[16] = "127.0.0.1";
data/tiny-initramfs-0.1/nfs.c:82: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 hostname[MAX_LINE_LEN] = { 0 };
data/tiny-initramfs-0.1/nfs.c:83: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 mnt_path[MAX_LINE_LEN] = { 0 };
data/tiny-initramfs-0.1/nfs.c:314: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 nullproc_response[sizeof(nullproc_expected_response)];
data/tiny-initramfs-0.1/nfs.c:331:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/tiny-initramfs-0.1/nfs.c:341: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).
    int urandom_fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
data/tiny-initramfs-0.1/nfs.c:353: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(nullproc_expected_response + 4, nullproc_request + 4, 4);
data/tiny-initramfs-0.1/nfs.c:476:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char ip_part_terminator_chars[4] = { '.', '.', '.', '\0' };
data/tiny-initramfs-0.1/nfs.c:484: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 bytes[4];
data/tiny-initramfs-0.1/nfs.c:502:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[16];
data/tiny-initramfs-0.1/nfs.c:506: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 bytes[4];
data/tiny-initramfs-0.1/tiny_initramfs.c:59: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 root_device[MAX_PATH_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.c:60: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 root_options[MAX_LINE_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.c:62: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 root_nfshost[MAX_LINE_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.c:63: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 root_nfsdir[MAX_LINE_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.c:64: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 root_nfsoptions[MAX_LINE_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.c:66: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 root_fstype[MAX_FILESYSTEM_TYPE_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.c:69: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 init_binary[MAX_PATH_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.c:77: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 real_device_name[MAX_PATH_LEN] = { 0 };
data/tiny-initramfs-0.1/tiny_initramfs.c:431: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 *argv[256];
data/tiny-initramfs-0.1/tiny_initramfs.c:511: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(line, O_RDONLY | O_CLOEXEC);
data/tiny-initramfs-0.1/tiny_initramfs.h:108: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 source[MAX_PATH_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.h:109:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char dest[MAX_PATH_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.h:110: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 type[MAX_PATH_LEN];
data/tiny-initramfs-0.1/tiny_initramfs.h:111:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char options[MAX_LINE_LEN];
data/tiny-initramfs-0.1/devices.c:69: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(string_representation) < 32)
data/tiny-initramfs-0.1/devices.c:209:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (device_name[strlen(device_name)-1] != c)
data/tiny-initramfs-0.1/devices.c:211: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 (strlen(device_name) > 32 + 4 + 1)
data/tiny-initramfs-0.1/devices.c:213:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(uuid_buf, device_name, 32 + 4);
data/tiny-initramfs-0.1/devices.c:215: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 (strlen(device_name) > 32 + 4)
data/tiny-initramfs-0.1/devices.c:217:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(uuid_buf, device_name, 32 + 4);
data/tiny-initramfs-0.1/devices.c:348: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).
  size_t l = strlen(device_name);
data/tiny-initramfs-0.1/devices.c:355:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      if (strncmp(device_name, ptr->prefix, strlen(ptr->prefix)) != 0)
data/tiny-initramfs-0.1/devices.c:359: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).
      k = strlen(ptr->suffix);
data/tiny-initramfs-0.1/devices.c:400:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  n = read(fd, data_buffer, len);
data/tiny-initramfs-0.1/io.c:48:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(fd, pos, MAX_LINE_LEN - 1 - (pos - buf));
data/tiny-initramfs-0.1/log.c:72: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).
    iov[1].iov_len = strlen(before1);
data/tiny-initramfs-0.1/log.c:78: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).
    iov[argc].iov_len = strlen(arg);
data/tiny-initramfs-0.1/log.c:87: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).
    iov[argc].iov_len = strlen(after1);
data/tiny-initramfs-0.1/log.c:93: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).
    iov[argc].iov_len = strlen(after2);
data/tiny-initramfs-0.1/mount.c:238:71:  [1] (buffer) strlen:
  Does not handle 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 (opt_index = 0, opt_name = mount_option_names, opt_name_len = strlen(opt_name);
data/tiny-initramfs-0.1/mount.c:240:68:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
         ++opt_index, opt_name += opt_name_len + 1, opt_name_len = strlen(opt_name))
data/tiny-initramfs-0.1/mount.c:254: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).
               || (strlen(check) == opt_name_len - 1 &&
data/tiny-initramfs-0.1/nfs.c:135:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(hostname, source, MIN(MAX_LINE_LEN - 1, opt_val - source));
data/tiny-initramfs-0.1/nfs.c:233: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).
  data.mnt_path.len = strlen(mnt_path);
data/tiny-initramfs-0.1/nfs.c:236: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).
  data.hostname.len = strlen(hostname);
data/tiny-initramfs-0.1/nfs.c:271: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).
  data.client_addr.len = strlen(ip_addr);
data/tiny-initramfs-0.1/nfs.c:344:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(urandom_fd, nullproc_request + 4, 4);
data/tiny-initramfs-0.1/tiny_initramfs.c:115: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(root_device)) {
data/tiny-initramfs-0.1/tiny_initramfs.c:117:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(root_nfshost))
data/tiny-initramfs-0.1/tiny_initramfs.c:125: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).
  root_fstype_len = strlen(root_fstype);
data/tiny-initramfs-0.1/tiny_initramfs.c:129:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!strlen(root_nfshost)) {
data/tiny-initramfs-0.1/tiny_initramfs.c:131: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).
      if (r < 0 || !strlen(root_nfshost))
data/tiny-initramfs-0.1/tiny_initramfs.c:142: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).
    root_nfsdir_len = strlen(root_nfsdir);
data/tiny-initramfs-0.1/tiny_initramfs.c:143: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).
    root_nfsoptions_len = strlen(root_nfsoptions);
data/tiny-initramfs-0.1/tiny_initramfs.c:144: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).
    root_options_len = strlen(root_options);
data/tiny-initramfs-0.1/tiny_initramfs.c:151:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(root_nfshost) + 1 + root_nfsdir_len + 1 > MAX_PATH_LEN)
data/tiny-initramfs-0.1/tiny_initramfs.c:173: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).
  r = mount_filesystem(real_device_name, TARGET_DIRECTORY, strlen(root_fstype) ? root_fstype : NULL, root_options, global_rw ? 0 : MS_RDONLY, global_rw ? MS_RDONLY : 0);
data/tiny-initramfs-0.1/tiny_initramfs.c:292: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(init_binary)) {
data/tiny-initramfs-0.1/tiny_initramfs.c:331: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 (strlen(token) > MAX_PATH_LEN - 1)
data/tiny-initramfs-0.1/tiny_initramfs.c:349: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 (strlen(token) > MAX_FILESYSTEM_TYPE_LEN - 1)
data/tiny-initramfs-0.1/tiny_initramfs.c:366: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 (strlen(token) > MAX_PATH_LEN - 1)
data/tiny-initramfs-0.1/tiny_initramfs.c:419:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(value) > 0)
data/tiny-initramfs-0.1/util.c:30: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(buf) > size)
data/tiny-initramfs-0.1/util.c:33: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).
  remaining_size = size - strlen(buf);
data/tiny-initramfs-0.1/util.c:36:5:  [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(buf, ptr, remaining_size - 1);
data/tiny-initramfs-0.1/util.c:39:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(ptr) >= remaining_size - 1) {
data/tiny-initramfs-0.1/util.c:44: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).
    remaining_size -= strlen(ptr);

ANALYSIS SUMMARY:

Hits = 93
Lines analyzed = 2515 in approximately 0.09 seconds (27330 lines/second)
Physical Source Lines of Code (SLOC) = 1817
Hits@level = [0]   2 [1]  43 [2]  44 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+]  95 [1+]  93 [2+]  50 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 52.284 [1+] 51.1833 [2+] 27.5179 [3+] 3.30215 [4+] 2.75179 [5+]   0
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.