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/boxfort-0.0.0-git20200808-ac0507b/include/boxfort.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/sample/callback.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/sample/context.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/sample/nested.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/sample/timeout.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/addr.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/addr.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/arena.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/arena.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/asm/mangling.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/asm/mangling/leading-underscore.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/asm/mangling/none.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/asm/stackfix.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/common.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/context.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/context.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/exe-elf.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/exe-elf.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/exe-mach-o.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/exe-mach-o.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/exe-pe.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/exe-pe.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/exe.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/timeout-posix.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/timeout-windows.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/timeout.h
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/timestamp.c
Examining data/boxfort-0.0.0-git20200808-ac0507b/src/timestamp.h

FINAL RESULTS:

data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:345:18:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    ssize_t rc = readlink(self, buf, sz);
data/boxfort-0.0.0-git20200808-ac0507b/src/arena.c:268: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(a->name, name);
data/boxfort-0.0.0-git20200808-ac0507b/src/common.h:67:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, __VA_ARGS__);               \
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:78: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(&elt->data[size], addr.soname);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:99: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(elt->name, arena->name);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:744:13:  [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_ctx.ctx->context.name, ictx->arena->name);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:402:5:  [4] (format) _sntprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    _sntprintf(map_name, sizeof (map_name), TEXT("Local\\bxfi_%lu"), (unsigned long)GetCurrentProcessId());
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:421:17:  [4] (format) _sntprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
                _sntprintf(cmdline, size, fmt, sandbox->debug.tcp, filename,
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:431:17:  [4] (format) _sntprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
                _sntprintf(cmdline, size, fmt, sandbox->debug.tcp, filename,
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:441:17:  [4] (format) _sntprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
                _sntprintf(cmdline, size, fmt, sandbox->debug.tcp, filename,
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:485:9:  [4] (format) _sntprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
        _sntprintf(cmdline, size, fmt, env_map);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:246:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    return !!getenv("BXFI_MAP");
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:251:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *ctx_path = getenv("BXFI_MAP");
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:295:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char *ctx_path = getenv("BXFI_MAP");
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:591:25:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *path = strdup(getenv("PATH"));
data/boxfort-0.0.0-git20200808-ac0507b/src/arena.c:181:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[BXFI_ARENA_NAME_SIZE];
data/boxfort-0.0.0-git20200808-ac0507b/src/arena.c:205:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = open(name, O_CREAT | O_RDWR | O_EXCL, 0600);
data/boxfort-0.0.0-git20200808-ac0507b/src/arena.c:361:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(*arena + 1, orig + 1, orig->size - sizeof (orig));
data/boxfort-0.0.0-git20200808-ac0507b/src/arena.c:592:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(np, p, chunk->size);
data/boxfort-0.0.0-git20200808-ac0507b/src/arena.h:63:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[BXFI_ARENA_NAME_SIZE];
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:122: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(&elt->data, name, len);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:123: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(&elt->data[elt->namesz], ptr, size);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:184: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(&elt->data[i], name, len);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:186:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&elt->data[i], &norm.addr, sizeof (void *));
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:188:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&elt->data[i], &norm.seg, sizeof (norm.seg));
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:190: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(&elt->data[i], norm.soname, sonamelen);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:309:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(elt->data, addr, elt->size);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:361:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy(addr, elt->data, elt->size);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:369:24:  [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 hndl = open(elt->name, O_RDONLY, 0600);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:394:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int hndl = open(ctx->name, O_RDONLY, 0600);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.h:55:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char name[BXFI_ARENA_NAME_SIZE];
data/boxfort-0.0.0-git20200808-ac0507b/src/exe-elf.c:212: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 opcodes[BXFI_TRAMPOLINE_SIZE];
data/boxfort-0.0.0-git20200808-ac0507b/src/exe-elf.c:227: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(nonstd (void *) addr, opcodes, sizeof (opcodes));
data/boxfort-0.0.0-git20200808-ac0507b/src/exe-mach-o.c:81: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 opcodes[BXFI_TRAMPOLINE_SIZE];
data/boxfort-0.0.0-git20200808-ac0507b/src/exe-mach-o.c:96: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(nonstd (void *) addr, opcodes, sizeof (opcodes));
data/boxfort-0.0.0-git20200808-ac0507b/src/exe-pe.c:75:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char opcodes[size]; /* VLA */
data/boxfort-0.0.0-git20200808-ac0507b/src/exe-pe.c:80:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(opcodes, &bxfi_trampoline, size);
data/boxfort-0.0.0-git20200808-ac0507b/src/exe-pe.c:95: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(nonstd (void *) addr, opcodes, size);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:317:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = open(self, O_RDONLY);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:319: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 path[PATH_MAX];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:485:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        int fds = open("/dev/fd", O_RDONLY | O_DIRECTORY);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:545: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(&self.cond, &nil, sizeof (nil));
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:619: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(dupe, environ, (len + 1) * sizeof (void *));
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:651: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.
    static char exe[PATH_MAX + 1];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:658: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 map_name[sizeof ("/bxfi_") + 21];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:675: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 dbg_full[PATH_MAX];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:749:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(local_ctx.ctx + 1, addr.soname, len + 1);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:823: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 env_map[sizeof ("BXFI_MAP=") + sizeof (map_name)];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:829: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 *argv[16] = { "boxfort-worker" };
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:833: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 port[11];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:972: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 map_name[sizeof ("/bxfi_") + 21];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:63: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(map->map_name, name, (_tcslen(name) + 1) * sizeof (TCHAR));
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:97: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(map->map_name, name, (_tcslen(name) + 1) * sizeof (TCHAR));
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:395:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR filename[MAX_PATH];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:401:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR map_name[sizeof ("Local\\bxfi_") + 21];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:404:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR env_map[sizeof ("BXFI_MAP=") + sizeof (map_name) + 2];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:540: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(map.ctx + 1, addr.soname, len + 1);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.h:43:5:  [2] (buffer) TCHAR:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    TCHAR map_name[sizeof ("bxfi_") + 21];
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox.c:81: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(sandbox, &params->callback + 1, sizeof (*sandbox));
data/boxfort-0.0.0-git20200808-ac0507b/src/timeout-posix.c:134: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(&self.sync, &mutex, sizeof (mutex));
data/boxfort-0.0.0-git20200808-ac0507b/src/timeout-posix.c:135:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&self.cond, &cond, sizeof (cond));
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:68: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).
            sizeof (*elt) + size + strlen(addr.soname) + 1);
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:111: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).
    size_t len = strlen(name) + 1;
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:170: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).
    size_t sonamelen = strlen(norm.soname) + 1;
data/boxfort-0.0.0-git20200808-ac0507b/src/context.c:172:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len  = strlen(name) + 1;
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:348:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, self, sz);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-posix.c:728:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(addr.soname);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:63:34:  [1] (buffer) _tcslen:
  Does not handle 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(map->map_name, name, (_tcslen(name) + 1) * sizeof (TCHAR));
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:97:34:  [1] (buffer) _tcslen:
  Does not handle 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(map->map_name, name, (_tcslen(name) + 1) * sizeof (TCHAR));
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox-windows.c:528: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).
    size_t len = strlen(addr.soname);
data/boxfort-0.0.0-git20200808-ac0507b/src/sandbox.h:44:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    __pragma(section(".CRT$XCU", read))                             \

ANALYSIS SUMMARY:

Hits = 71
Lines analyzed = 5289 in approximately 0.19 seconds (27181 lines/second)
Physical Source Lines of Code (SLOC) = 3583
Hits@level = [0]  20 [1]  10 [2]  46 [3]   4 [4]  10 [5]   1
Hits@level+ = [0+]  91 [1+]  71 [2+]  61 [3+]  15 [4+]  11 [5+]   1
Hits/KSLOC@level+ = [0+] 25.3977 [1+] 19.8158 [2+] 17.0248 [3+] 4.18644 [4+] 3.07005 [5+] 0.279096
Dot directories skipped = 2 (--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.