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/fakechroot-2.19/src/__fxstatat.c
Examining data/fakechroot-2.19/src/__fxstatat64.c
Examining data/fakechroot-2.19/src/__getcwd_chk.c
Examining data/fakechroot-2.19/src/__getwd_chk.c
Examining data/fakechroot-2.19/src/__lxstat.c
Examining data/fakechroot-2.19/src/__lxstat64.c
Examining data/fakechroot-2.19/src/__lxstat64.h
Examining data/fakechroot-2.19/src/__open.c
Examining data/fakechroot-2.19/src/__open64.c
Examining data/fakechroot-2.19/src/__open64_2.c
Examining data/fakechroot-2.19/src/__open_2.c
Examining data/fakechroot-2.19/src/__openat64_2.c
Examining data/fakechroot-2.19/src/__openat_2.c
Examining data/fakechroot-2.19/src/__opendir2.c
Examining data/fakechroot-2.19/src/__readlink_chk.c
Examining data/fakechroot-2.19/src/__readlinkat_chk.c
Examining data/fakechroot-2.19/src/__realpath_chk.c
Examining data/fakechroot-2.19/src/__realpath_chk.h
Examining data/fakechroot-2.19/src/__statfs.c
Examining data/fakechroot-2.19/src/__xmknod.c
Examining data/fakechroot-2.19/src/__xmknodat.c
Examining data/fakechroot-2.19/src/__xstat.c
Examining data/fakechroot-2.19/src/__xstat64.c
Examining data/fakechroot-2.19/src/__xstat64.h
Examining data/fakechroot-2.19/src/_xftw.c
Examining data/fakechroot-2.19/src/_xftw64.c
Examining data/fakechroot-2.19/src/access.c
Examining data/fakechroot-2.19/src/acct.c
Examining data/fakechroot-2.19/src/audit_log_acct_message.c
Examining data/fakechroot-2.19/src/bind.c
Examining data/fakechroot-2.19/src/bindtextdomain.c
Examining data/fakechroot-2.19/src/canonicalize_file_name.c
Examining data/fakechroot-2.19/src/chdir.c
Examining data/fakechroot-2.19/src/chmod.c
Examining data/fakechroot-2.19/src/chown.c
Examining data/fakechroot-2.19/src/chroot.c
Examining data/fakechroot-2.19/src/clearenv.c
Examining data/fakechroot-2.19/src/connect.c
Examining data/fakechroot-2.19/src/creat.c
Examining data/fakechroot-2.19/src/creat64.c
Examining data/fakechroot-2.19/src/dedotdot.c
Examining data/fakechroot-2.19/src/dedotdot.h
Examining data/fakechroot-2.19/src/dl_iterate_phdr.c
Examining data/fakechroot-2.19/src/dladdr.c
Examining data/fakechroot-2.19/src/dlmopen.c
Examining data/fakechroot-2.19/src/dlopen.c
Examining data/fakechroot-2.19/src/eaccess.c
Examining data/fakechroot-2.19/src/euidaccess.c
Examining data/fakechroot-2.19/src/execl.c
Examining data/fakechroot-2.19/src/execle.c
Examining data/fakechroot-2.19/src/execlp.c
Examining data/fakechroot-2.19/src/execv.c
Examining data/fakechroot-2.19/src/execve.c
Examining data/fakechroot-2.19/src/execvp.c
Examining data/fakechroot-2.19/src/faccessat.c
Examining data/fakechroot-2.19/src/fchmodat.c
Examining data/fakechroot-2.19/src/fchownat.c
Examining data/fakechroot-2.19/src/fopen.c
Examining data/fakechroot-2.19/src/fopen64.c
Examining data/fakechroot-2.19/src/freopen.c
Examining data/fakechroot-2.19/src/freopen64.c
Examining data/fakechroot-2.19/src/fts.c
Examining data/fakechroot-2.19/src/ftw.c
Examining data/fakechroot-2.19/src/ftw64.c
Examining data/fakechroot-2.19/src/futimesat.c
Examining data/fakechroot-2.19/src/get_current_dir_name.c
Examining data/fakechroot-2.19/src/getcwd.c
Examining data/fakechroot-2.19/src/getcwd.h
Examining data/fakechroot-2.19/src/getcwd_real.c
Examining data/fakechroot-2.19/src/getcwd_real.h
Examining data/fakechroot-2.19/src/getpeername.c
Examining data/fakechroot-2.19/src/getsockname.c
Examining data/fakechroot-2.19/src/getwd.c
Examining data/fakechroot-2.19/src/getxattr.c
Examining data/fakechroot-2.19/src/glob.c
Examining data/fakechroot-2.19/src/glob64.c
Examining data/fakechroot-2.19/src/glob_pattern_p.c
Examining data/fakechroot-2.19/src/inotify_add_watch.c
Examining data/fakechroot-2.19/src/lchmod.c
Examining data/fakechroot-2.19/src/lchown.c
Examining data/fakechroot-2.19/src/lckpwdf.c
Examining data/fakechroot-2.19/src/lgetxattr.c
Examining data/fakechroot-2.19/src/libfakechroot.c
Examining data/fakechroot-2.19/src/libfakechroot.h
Examining data/fakechroot-2.19/src/link.c
Examining data/fakechroot-2.19/src/linkat.c
Examining data/fakechroot-2.19/src/listxattr.c
Examining data/fakechroot-2.19/src/llistxattr.c
Examining data/fakechroot-2.19/src/lremovexattr.c
Examining data/fakechroot-2.19/src/lsetxattr.c
Examining data/fakechroot-2.19/src/lstat.c
Examining data/fakechroot-2.19/src/lstat.h
Examining data/fakechroot-2.19/src/lstat64.c
Examining data/fakechroot-2.19/src/lutimes.c
Examining data/fakechroot-2.19/src/mkdir.c
Examining data/fakechroot-2.19/src/mkdirat.c
Examining data/fakechroot-2.19/src/mkdtemp.c
Examining data/fakechroot-2.19/src/mkfifo.c
Examining data/fakechroot-2.19/src/mkfifoat.c
Examining data/fakechroot-2.19/src/mknod.c
Examining data/fakechroot-2.19/src/mknodat.c
Examining data/fakechroot-2.19/src/mkostemp.c
Examining data/fakechroot-2.19/src/mkostemp64.c
Examining data/fakechroot-2.19/src/mkostemps.c
Examining data/fakechroot-2.19/src/mkostemps64.c
Examining data/fakechroot-2.19/src/mkstemp.c
Examining data/fakechroot-2.19/src/mkstemp64.c
Examining data/fakechroot-2.19/src/mkstemps.c
Examining data/fakechroot-2.19/src/mkstemps64.c
Examining data/fakechroot-2.19/src/mktemp.c
Examining data/fakechroot-2.19/src/open.c
Examining data/fakechroot-2.19/src/open.h
Examining data/fakechroot-2.19/src/open64.c
Examining data/fakechroot-2.19/src/openat.c
Examining data/fakechroot-2.19/src/openat64.c
Examining data/fakechroot-2.19/src/opendir.c
Examining data/fakechroot-2.19/src/opendir.h
Examining data/fakechroot-2.19/src/pathconf.c
Examining data/fakechroot-2.19/src/popen.c
Examining data/fakechroot-2.19/src/posix_spawn.c
Examining data/fakechroot-2.19/src/posix_spawnp.c
Examining data/fakechroot-2.19/src/rawmemchr.c
Examining data/fakechroot-2.19/src/rawmemchr.h
Examining data/fakechroot-2.19/src/readlink.c
Examining data/fakechroot-2.19/src/readlink.h
Examining data/fakechroot-2.19/src/readlinkat.c
Examining data/fakechroot-2.19/src/realpath.c
Examining data/fakechroot-2.19/src/rel2abs.c
Examining data/fakechroot-2.19/src/rel2abs.h
Examining data/fakechroot-2.19/src/rel2absat.c
Examining data/fakechroot-2.19/src/rel2absat.h
Examining data/fakechroot-2.19/src/remove.c
Examining data/fakechroot-2.19/src/removexattr.c
Examining data/fakechroot-2.19/src/rename.c
Examining data/fakechroot-2.19/src/renameat.c
Examining data/fakechroot-2.19/src/revoke.c
Examining data/fakechroot-2.19/src/rmdir.c
Examining data/fakechroot-2.19/src/rpl_lstat.c
Examining data/fakechroot-2.19/src/scandir.c
Examining data/fakechroot-2.19/src/scandir64.c
Examining data/fakechroot-2.19/src/setenv.c
Examining data/fakechroot-2.19/src/setenv.h
Examining data/fakechroot-2.19/src/setxattr.c
Examining data/fakechroot-2.19/src/stat.c
Examining data/fakechroot-2.19/src/stat.h
Examining data/fakechroot-2.19/src/stat64.c
Examining data/fakechroot-2.19/src/statfs.c
Examining data/fakechroot-2.19/src/statfs64.c
Examining data/fakechroot-2.19/src/statvfs.c
Examining data/fakechroot-2.19/src/statvfs64.c
Examining data/fakechroot-2.19/src/stpcpy.c
Examining data/fakechroot-2.19/src/strchrnul.c
Examining data/fakechroot-2.19/src/strchrnul.h
Examining data/fakechroot-2.19/src/strlcpy.c
Examining data/fakechroot-2.19/src/strlcpy.h
Examining data/fakechroot-2.19/src/symlink.c
Examining data/fakechroot-2.19/src/symlinkat.c
Examining data/fakechroot-2.19/src/system.c
Examining data/fakechroot-2.19/src/tempnam.c
Examining data/fakechroot-2.19/src/tmpnam.c
Examining data/fakechroot-2.19/src/truncate.c
Examining data/fakechroot-2.19/src/truncate64.c
Examining data/fakechroot-2.19/src/ulckpwdf.c
Examining data/fakechroot-2.19/src/unlink.c
Examining data/fakechroot-2.19/src/unlinkat.c
Examining data/fakechroot-2.19/src/utime.c
Examining data/fakechroot-2.19/src/utimensat.c
Examining data/fakechroot-2.19/src/utimes.c
Examining data/fakechroot-2.19/src/renameat2.c
Examining data/fakechroot-2.19/src/statx.c
Examining data/fakechroot-2.19/test/src/test-canonicalize_file_name.c
Examining data/fakechroot-2.19/test/src/test-chroot.c
Examining data/fakechroot-2.19/test/src/test-clearenv.c
Examining data/fakechroot-2.19/test/src/test-dedotdot.c
Examining data/fakechroot-2.19/test/src/test-execlp.c
Examining data/fakechroot-2.19/test/src/test-execve-null-envp.c
Examining data/fakechroot-2.19/test/src/test-fts.c
Examining data/fakechroot-2.19/test/src/test-ftw.c
Examining data/fakechroot-2.19/test/src/test-hello.c
Examining data/fakechroot-2.19/test/src/test-lstat.c
Examining data/fakechroot-2.19/test/src/test-mkdtemp.c
Examining data/fakechroot-2.19/test/src/test-mkstemp.c
Examining data/fakechroot-2.19/test/src/test-mkstemps.c
Examining data/fakechroot-2.19/test/src/test-mktemp.c
Examining data/fakechroot-2.19/test/src/test-opendir.c
Examining data/fakechroot-2.19/test/src/test-popen.c
Examining data/fakechroot-2.19/test/src/test-posix_spawn.c
Examining data/fakechroot-2.19/test/src/test-posix_spawnp.c
Examining data/fakechroot-2.19/test/src/test-realpath.c
Examining data/fakechroot-2.19/test/src/test-scandir.c
Examining data/fakechroot-2.19/test/src/test-socket-af_unix-client.c
Examining data/fakechroot-2.19/test/src/test-socket-af_unix-server.c
Examining data/fakechroot-2.19/test/src/test-statfs.c
Examining data/fakechroot-2.19/test/src/test-statvfs.c
Examining data/fakechroot-2.19/test/src/test-system.c

FINAL RESULTS:

data/fakechroot-2.19/src/__lxstat.c:50:25:  [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.
        if ((linksize = readlink(orig_filename, tmp, sizeof(tmp)-1)) != -1)
data/fakechroot-2.19/src/__lxstat64.c:66:25:  [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.
        if ((linksize = readlink(orig_filename, tmp, sizeof(tmp)-1)) != -1)
data/fakechroot-2.19/src/chmod.c:28:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
wrapper(chmod, int, (const char * path, mode_t mode))
data/fakechroot-2.19/src/chmod.c:32:21:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    return nextcall(chmod)(path, mode);
data/fakechroot-2.19/src/chown.c:28:9:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
wrapper(chown, int, (const char * path, uid_t owner, gid_t group))
data/fakechroot-2.19/src/chown.c:32:21:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    return nextcall(chown)(path, owner, group);
data/fakechroot-2.19/src/lstat.c:61:23:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        if ((status = readlink(orig, tmp, sizeof(tmp)-1)) != -1)
data/fakechroot-2.19/src/lstat64.c:57:23:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        if ((status = readlink(orig, tmp, sizeof(tmp)-1)) != -1)
data/fakechroot-2.19/src/readlink.c:28:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
wrapper(readlink, READLINK_TYPE_RETURN, (const char * path, char * buf, READLINK_TYPE_ARG3(bufsiz)))
data/fakechroot-2.19/src/readlink.c:41:30:  [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.
    if ((linksize = nextcall(readlink)(path, tmp, FAKECHROOT_PATH_MAX-1)) == -1) {
data/fakechroot-2.19/src/readlink.h:27:15:  [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.
wrapper_proto(readlink, READLINK_TYPE_RETURN, (const char *, char *, READLINK_TYPE_ARG3()));
data/fakechroot-2.19/src/realpath.c:199:21:  [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.
                n = readlink(rpath, buf, path_max - 1);
data/fakechroot-2.19/test/src/test-lstat.c:30:15:  [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.
    if ((sz = readlink(argv[1], buf, sizeof(buf))) < 0) {
data/fakechroot-2.19/src/access.c:26: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.
wrapper(access, int, (const char * pathname, int mode))
data/fakechroot-2.19/src/access.c:30: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.
    return nextcall(access)(pathname, mode);
data/fakechroot-2.19/src/clearenv.c:61: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(tmpkey[n], key);
data/fakechroot-2.19/src/clearenv.c:62: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(tmpenv[n], env);
data/fakechroot-2.19/src/execl.c:42:9:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
wrapper(execl, int, (const char * path, const char * arg, ...))
data/fakechroot-2.19/src/execle.c:38:9:  [4] (shell) execle:
  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.
wrapper(execle, int, (const char * path, const char * arg, ...))
data/fakechroot-2.19/src/execlp.c:37:9:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
wrapper(execlp, int, (const char * file, const char * arg, ...))
data/fakechroot-2.19/src/execlp.c:67:12:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    return execvp(file, (char * const *) argv);
data/fakechroot-2.19/src/execv.c:32:9:  [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.
wrapper(execv, int, (const char * path, char * const argv []))
data/fakechroot-2.19/src/execve.c:120: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(newenvp[newenvppos], key);
data/fakechroot-2.19/src/execve.c:122:13:  [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(newenvp[newenvppos], env);
data/fakechroot-2.19/src/execve.c:157:9:  [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(newenvp[newenvppos], filename);
data/fakechroot-2.19/src/execve.c:172: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(tmp, filename);
data/fakechroot-2.19/src/execve.c:225:21:  [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(newfilename, ptr);
data/fakechroot-2.19/src/execvp.c:46:9:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
wrapper(execvp, int, (const char * file, char * const argv[]))
data/fakechroot-2.19/src/execvp.c:76: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(path, DEFAULT_PATH);
data/fakechroot-2.19/src/get_current_dir_name.c:45: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(newptr, cwd);
data/fakechroot-2.19/src/glob.c:42:9:  [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(tmp, pglob->gl_pathv[i]);
data/fakechroot-2.19/src/glob.c:51: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(pglob->gl_pathv[i], tmpptr);
data/fakechroot-2.19/src/glob64.c:45:9:  [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(tmp, pglob->gl_pathv[i]);
data/fakechroot-2.19/src/glob64.c:54: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(pglob->gl_pathv[i], tmpptr);
data/fakechroot-2.19/src/libfakechroot.c:82:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(newfmt, PACKAGE ": %s\n", fmt);
data/fakechroot-2.19/src/libfakechroot.c:84:11:  [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.
    ret = vfprintf(stderr, newfmt, ap);
data/fakechroot-2.19/src/libfakechroot.h:226:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#ifndef snprintf
data/fakechroot-2.19/src/libfakechroot.h:227:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
int snprintf(char *, size_t, const char *, ...);
data/fakechroot-2.19/src/link.c:31: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(tmp, oldpath);
data/fakechroot-2.19/src/linkat.c:34: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(tmp, oldpath);
data/fakechroot-2.19/src/mktemp.c:31:9:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
wrapper(mktemp, char *, (char * template))
data/fakechroot-2.19/src/mktemp.c:53:18:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
    if (nextcall(mktemp)(tmpptr) == NULL || !*tmpptr) {
data/fakechroot-2.19/src/popen.c:70:1:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
popen(const char *program, const char *type)
data/fakechroot-2.19/src/popen.c:131:17:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
                execl(_PATH_BSHELL, "sh", "-c", program, (char *)NULL);
data/fakechroot-2.19/src/posix_spawn.c:124: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(newenvp[newenvppos], key);
data/fakechroot-2.19/src/posix_spawn.c:126:13:  [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(newenvp[newenvppos], env);
data/fakechroot-2.19/src/posix_spawn.c:161:9:  [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(newenvp[newenvppos], filename);
data/fakechroot-2.19/src/posix_spawn.c:176: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(tmp, filename);
data/fakechroot-2.19/src/posix_spawn.c:229:21:  [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(newfilename, ptr);
data/fakechroot-2.19/src/posix_spawnp.c:77: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(path, DEFAULT_PATH);
data/fakechroot-2.19/src/rename.c:31: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(tmp, oldpath);
data/fakechroot-2.19/src/renameat.c:34: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(tmp, oldpath);
data/fakechroot-2.19/src/renameat2.c:34: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(tmp, oldpath);
data/fakechroot-2.19/src/symlink.c:31: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(tmp, oldpath);
data/fakechroot-2.19/src/symlinkat.c:34: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(tmp, oldpath);
data/fakechroot-2.19/src/system.c:39:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
wrapper(system, int, (const char * command))
data/fakechroot-2.19/src/system.c:61:9:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        execl("/bin/sh", "sh", "-c", command, (char *) 0);
data/fakechroot-2.19/src/tmpnam.c:42: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(ptr2, ptr);
data/fakechroot-2.19/test/src/test-chroot.c:8:20:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define debug(msg) fprintf(stderr, msg)
data/fakechroot-2.19/test/src/test-chroot.c:32:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(argv[3]) == -1) {
data/fakechroot-2.19/test/src/test-chroot.c:50:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(argv[6]) == -1) {
data/fakechroot-2.19/test/src/test-clearenv.c:14:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(argv[1]) == -1) {
data/fakechroot-2.19/test/src/test-execlp.c:11:5:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    execlp(argv[1], argv[1], argv[2], NULL);
data/fakechroot-2.19/test/src/test-mktemp.c:16:17:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
    if ((path = mktemp(template)) == NULL || !*path) {
data/fakechroot-2.19/test/src/test-popen.c:23:10:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    fp = popen(argv[1], "r");
data/fakechroot-2.19/test/src/test-socket-af_unix-client.c:25: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(serv_addr.sun_path, argv[1]);
data/fakechroot-2.19/test/src/test-socket-af_unix-server.c:32: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(serv_addr.sun_path, argv[1]);
data/fakechroot-2.19/test/src/test-statvfs.c:31:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    printf((sizeof(statvfsb.f_bsize) == 8 ? "%ld\n" : "%d\n"), statvfsb.f_bsize);
data/fakechroot-2.19/test/src/test-system.c:10:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if (system(argv[1]) == -1) {
data/fakechroot-2.19/src/__readlink_chk.c:35:35:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/__readlinkat_chk.c:36:35:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/__realpath_chk.c:49:12:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    return realpath(path, resolved);
data/fakechroot-2.19/src/bind.c:55:36:  [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 *af_unix_path = getenv("FAKECHROOT_AF_UNIX_PATH");
data/fakechroot-2.19/src/canonicalize_file_name.c:40:12:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    return realpath(name, resolved);
data/fakechroot-2.19/src/chdir.c:31:35:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/chroot.c:47: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.
wrapper(chroot, int, (const char * path))
data/fakechroot-2.19/src/chroot.c:50:35:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/chroot.c:117:23:  [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.
    ld_library_path = getenv("LD_LIBRARY_PATH");
data/fakechroot-2.19/src/clearenv.c:57:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        env = getenv(key);
data/fakechroot-2.19/src/connect.c:55:36:  [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 *af_unix_path = getenv("FAKECHROOT_AF_UNIX_PATH");
data/fakechroot-2.19/src/execve.c:60:23:  [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 *elfloader = getenv("FAKECHROOT_ELFLOADER");
data/fakechroot-2.19/src/execve.c:61:33:  [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 *elfloader_opt_argv0 = getenv("FAKECHROOT_ELFLOADER_OPT_ARGV0");
data/fakechroot-2.19/src/execve.c:71:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    cmdorig = getenv("FAKECHROOT_CMD_ORIG");
data/fakechroot-2.19/src/execve.c:73:49:  [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.
        do_cmd_subst = fakechroot_try_cmd_subst(getenv("FAKECHROOT_CMD_SUBST"), argv0, substfilename);
data/fakechroot-2.19/src/execve.c:101:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        env = getenv(key);
data/fakechroot-2.19/src/execvp.c:64:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        path = getenv("PATH");
data/fakechroot-2.19/src/getwd.c:28:9:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
wrapper(getwd, char *, (char * buf))
data/fakechroot-2.19/src/getwd.c:33:25:  [3] (buffer) getwd:
  This does not protect against buffer overflows by itself, so use with
  caution (CWE-120, CWE-20). Use getcwd instead.
    if ((cwd = nextcall(getwd)(buf)) == NULL) {
data/fakechroot-2.19/src/glob.c:39:39:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/glob64.c:42:39:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/libfakechroot.c:79:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (!getenv("FAKECHROOT_DEBUG"))
data/fakechroot-2.19/src/libfakechroot.c:98:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *detect = getenv("FAKECHROOT_DETECT");
data/fakechroot-2.19/src/libfakechroot.c:111:37:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    debug("FAKECHROOT_BASE=\"%s\"", getenv("FAKECHROOT_BASE"));
data/fakechroot-2.19/src/libfakechroot.c:112:42:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    debug("FAKECHROOT_BASE_ORIG=\"%s\"", getenv("FAKECHROOT_BASE_ORIG"));
data/fakechroot-2.19/src/libfakechroot.c:113:41:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    debug("FAKECHROOT_CMD_ORIG=\"%s\"", getenv("FAKECHROOT_CMD_ORIG"));
data/fakechroot-2.19/src/libfakechroot.c:116:30:  [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 *exclude_path = getenv("FAKECHROOT_EXCLUDE_PATH");
data/fakechroot-2.19/src/libfakechroot.h:87:43:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE"); \
data/fakechroot-2.19/src/libfakechroot.h:109:47:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE"); \
data/fakechroot-2.19/src/posix_spawn.c:64:23:  [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 *elfloader = getenv("FAKECHROOT_ELFLOADER");
data/fakechroot-2.19/src/posix_spawn.c:65:33:  [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 *elfloader_opt_argv0 = getenv("FAKECHROOT_ELFLOADER_OPT_ARGV0");
data/fakechroot-2.19/src/posix_spawn.c:75:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    cmdorig = getenv("FAKECHROOT_CMD_ORIG");
data/fakechroot-2.19/src/posix_spawn.c:77:49:  [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.
        do_cmd_subst = fakechroot_try_cmd_subst(getenv("FAKECHROOT_CMD_SUBST"), argv0, substfilename);
data/fakechroot-2.19/src/posix_spawn.c:105:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        env = getenv(key);
data/fakechroot-2.19/src/posix_spawnp.c:65:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        path = getenv("PATH");
data/fakechroot-2.19/src/readlink.c:32:35:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/readlinkat.c:35:35:  [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 *fakechroot_base = getenv("FAKECHROOT_BASE");
data/fakechroot-2.19/src/realpath.c:68:9:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
wrapper(realpath, char *, (const char * name, char * resolved))
data/fakechroot-2.19/src/tempnam.c:26:9:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
wrapper(tempnam, char *, (const char * dir, const char * pfx))
data/fakechroot-2.19/src/tempnam.c:30:21:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
    return nextcall(tempnam)(dir, pfx);
data/fakechroot-2.19/src/tmpnam.c:26:9:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
wrapper(tmpnam, char *, (char * s))
data/fakechroot-2.19/src/tmpnam.c:32:25:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
        return nextcall(tmpnam)(s);
data/fakechroot-2.19/src/tmpnam.c:35:20:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
    ptr = nextcall(tmpnam)(NULL);
data/fakechroot-2.19/test/src/test-canonicalize_file_name.c:17:12:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    return realpath(path, resolved);
data/fakechroot-2.19/test/src/test-chroot.c:26: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.
    if (chroot(argv[2]) == -1) {
data/fakechroot-2.19/test/src/test-chroot.c:44: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.
    if (chroot(argv[5]) == -1) {
data/fakechroot-2.19/test/src/test-realpath.c:19:26:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    if ((returned_path = realpath(path, resolved_path)) == NULL) {
data/fakechroot-2.19/src/__lxstat.c:39: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/__lxstat64.c:43: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 abs_filename[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/__lxstat64.c: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/__opendir2.c:84:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define _open open
data/fakechroot-2.19/src/__readlink_chk.c:34: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr;
data/fakechroot-2.19/src/__readlinkat_chk.c:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[FAKECHROOT_PATH_MAX], *tmpptr;
data/fakechroot-2.19/src/bind.c:60:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/chdir.c:30: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 cwd[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/chroot.c:53: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 cwd[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/chroot.c:54: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/connect.c:60:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/execl.c:64:40:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                argv = (const char **) memcpy(nptr, argv, i
data/fakechroot-2.19/src/execle.c:61:40:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                argv = (const char **) memcpy(nptr, argv, i
data/fakechroot-2.19/src/execlp.c:59:40:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                argv = (const char **) memcpy(nptr, argv, i
data/fakechroot-2.19/src/execve.c:43: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 hashbang[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/execve.c:48: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 tmpkey[1024], *tp;
data/fakechroot-2.19/src/execve.c:50: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/execve.c:51: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 substfilename[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/execve.c:52: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 newfilename[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/execve.c:53: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 argv0[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/execve.c:95:5:  [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(newenvp[newenvppos], "FAKECHROOT=true");
data/fakechroot-2.19/src/execve.c:156:9:  [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(newenvp[newenvppos], "FAKECHROOT_CMD_ORIG=");
data/fakechroot-2.19/src/execve.c:175:26:  [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 ((file = nextcall(open)(filename, O_RDONLY)) == -1) {
data/fakechroot-2.19/src/execvp.c:84:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        name = (char *) memcpy(name + pathlen + 1, file, len);
data/fakechroot-2.19/src/execvp.c:100:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                startp = (char *) memcpy(name - (p - path), path, p - path);
data/fakechroot-2.19/src/fopen.c:27: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).
wrapper(fopen, FILE *, (const char * path, const char * mode))
data/fakechroot-2.19/src/fopen.c:31:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return nextcall(fopen)(path, mode);
data/fakechroot-2.19/src/fts.c:203:51:  [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 (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
data/fakechroot-2.19/src/fts.c:332:45:  [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 ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
data/fakechroot-2.19/src/fts.c:422:37:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                                    open(".", O_RDONLY, 0)) < 0) {
data/fakechroot-2.19/src/fts.c:564:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if ((fd = open(".", O_RDONLY, 0)) < 0)
data/fakechroot-2.19/src/fts.c:975: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(p->fts_name, name, namelen);
data/fakechroot-2.19/src/fts.c:1006: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(p->fts_name, name, namelen);
data/fakechroot-2.19/src/fts.c:1111:32:  [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 < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
data/fakechroot-2.19/src/ftw.c:120:47:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
data/fakechroot-2.19/src/ftw.c:142:17:  [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).
# define __open open
data/fakechroot-2.19/src/futimesat.c:30:40:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
wrapper(futimesat, int, (int fd, const char * filename, const struct timeval tv [2]))
data/fakechroot-2.19/src/getcwd_real.c:294:33:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                                memcpy(bup, dp->d_name, NAMLEN(dp) + 1);
data/fakechroot-2.19/src/getcwd_real.c:331:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(bpt, dp->d_name, NAMLEN(dp));
data/fakechroot-2.19/src/getpeername.c:63:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/getsockname.c:63:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/glob.c:40: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr;
data/fakechroot-2.19/src/glob64.c:43: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr;
data/fakechroot-2.19/src/libfakechroot.c:46: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 *exclude_list[EXCLUDE_LIST_SIZE];
data/fakechroot-2.19/src/libfakechroot.c:74:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char newfmt[2048];
data/fakechroot-2.19/src/libfakechroot.c:107:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        _Exit(atoi(detect));
data/fakechroot-2.19/src/libfakechroot.c:159: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 cwd_path[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/libfakechroot.h:80:10:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
# define vfork fork
data/fakechroot-2.19/src/libfakechroot.h:94:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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))[0] = '/'; \
data/fakechroot-2.19/src/libfakechroot.h:95:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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))[1] = '\0'; \
data/fakechroot-2.19/src/libfakechroot.h:97:33:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    else if ( ((char *)(path))[fakechroot_base_len] == '/' ) { \
data/fakechroot-2.19/src/libfakechroot.h:111:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char fakechroot_buf[FAKECHROOT_PATH_MAX]; \
data/fakechroot-2.19/src/libfakechroot.h:123:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char fakechroot_abspath[FAKECHROOT_PATH_MAX]; \
data/fakechroot-2.19/src/libfakechroot.h:135:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char fakechroot_abspath[FAKECHROOT_PATH_MAX]; \
data/fakechroot-2.19/src/link.c:28: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/linkat.c:31: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/lstat.c:37:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char abs_filename[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/lstat.c:50: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 *fakechroot_path, fakechroot_buf[FAKECHROOT_PATH_MAX], tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/lstat64.c:38: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 *fakechroot_path, fakechroot_buf[FAKECHROOT_PATH_MAX], tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/lstat64.c:39: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 resolved[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/lutimes.c:29:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
wrapper(lutimes, int, (const char * filename, const struct timeval tv [2]))
data/fakechroot-2.19/src/mkdtemp.c:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkostemp.c:34: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkostemp64.c:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkostemps.c:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkostemps64.c:36: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkstemp.c:31:9:  [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).
wrapper(mkstemp, int, (char * template))
data/fakechroot-2.19/src/mkstemp.c:33: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkstemp.c:54:24:  [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 = nextcall(mkstemp)(tmpptr)) == -1 || !*tmpptr) {
data/fakechroot-2.19/src/mkstemp64.c:36: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkstemps.c:36: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mkstemps64.c:36: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/mktemp.c:33: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr = tmp;
data/fakechroot-2.19/src/open.c:29:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
wrapper_alias(open, int, (const char * pathname, int flags, ...))
data/fakechroot-2.19/src/open.c:44: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).
    return nextcall(open)(pathname, flags, mode);
data/fakechroot-2.19/src/open.h:26:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
wrapper_proto(open, int, (const char *, int, ...));
data/fakechroot-2.19/src/popen.c:93:23:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
        switch (pid = vfork()) {
data/fakechroot-2.19/src/posix_spawn.c:47: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 hashbang[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/posix_spawn.c:52: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 tmpkey[1024], *tp;
data/fakechroot-2.19/src/posix_spawn.c:54: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/posix_spawn.c: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 substfilename[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/posix_spawn.c:56: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 newfilename[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/posix_spawn.c:57: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 argv0[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/posix_spawn.c:99:5:  [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(newenvp[newenvppos], "FAKECHROOT=true");
data/fakechroot-2.19/src/posix_spawn.c:160:9:  [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(newenvp[newenvppos], "FAKECHROOT_CMD_ORIG=");
data/fakechroot-2.19/src/posix_spawn.c:179:26:  [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 ((file = nextcall(open)(filename, O_RDONLY)) == -1) {
data/fakechroot-2.19/src/posix_spawnp.c:85:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        name = (char *) memcpy(name + pathlen + 1, file, len);
data/fakechroot-2.19/src/posix_spawnp.c:101:35:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                startp = (char *) memcpy(name - (p - path), path, p - path);
data/fakechroot-2.19/src/readlink.c:31: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr;
data/fakechroot-2.19/src/readlinkat.c:34: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 tmp[FAKECHROOT_PATH_MAX], *tmpptr;
data/fakechroot-2.19/src/realpath.c:177: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(dest, start, end - start);
data/fakechroot-2.19/src/realpath.c:223:30:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                name = end = memcpy(extra_buf, buf, n);
data/fakechroot-2.19/src/rel2abs.c:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char cwd[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/rel2absat.c:42: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 cwd[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/rel2absat.c:64:31:  [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 ((cwdfd = nextcall(open)(".", O_RDONLY|O_DIRECTORY)) == -1) {
data/fakechroot-2.19/src/rename.c:28: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/renameat.c:31: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/renameat2.c:31: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/setenv.c:102:17:  [2] (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_environ, __environ, size * sizeof(char *));
data/fakechroot-2.19/src/setenv.c:122:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(var_val, name, namelen);
data/fakechroot-2.19/src/setenv.c:124:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(&var_val[namelen + 1], value, vallen);
data/fakechroot-2.19/src/statx.c:35:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char fakechroot_abspath[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/statx.c:36: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 fakechroot_buf[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/symlink.c:28: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/symlinkat.c:31: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 tmp[FAKECHROOT_PATH_MAX];
data/fakechroot-2.19/src/system.c:54:16:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
    if ((pid = vfork()) < 0) {
data/fakechroot-2.19/src/utimensat.c:30:43:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
wrapper(utimensat, int, (int dirfd, const char * pathname, const struct timespec times [2], int flags))
data/fakechroot-2.19/test/src/test-fts.c:25:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    options = atoi(argv[1]);
data/fakechroot-2.19/test/src/test-lstat.c:12:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/fakechroot-2.19/test/src/test-mkstemp.c:17:15:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    if ((fd = mkstemp(template)) == -1 || !*template) {
data/fakechroot-2.19/test/src/test-mkstemps.c:16:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    suffixlen = atoi(argv[2]);
data/fakechroot-2.19/test/src/test-popen.c:16:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char path[PATH_MAX];
data/fakechroot-2.19/test/src/test-socket-af_unix-client.c:16:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[82];
data/fakechroot-2.19/test/src/test-socket-af_unix-server.c:18: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 buffer[80];
data/fakechroot-2.19/src/__readlink_chk.c:50: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).
        else if (tmp[strlen(fakechroot_base)] == '\0') {
data/fakechroot-2.19/src/__readlink_chk.c:52: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).
            linksize = strlen(tmpptr);
data/fakechroot-2.19/src/__readlink_chk.c:54: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).
        else if (tmp[strlen(fakechroot_base)] == '/') {
data/fakechroot-2.19/src/__readlink_chk.c:55: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).
            tmpptr = tmp + strlen(fakechroot_base);
data/fakechroot-2.19/src/__readlink_chk.c:56: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).
            linksize -= strlen(fakechroot_base);
data/fakechroot-2.19/src/__readlink_chk.c:61: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 (strlen(tmpptr) > bufsiz) {
data/fakechroot-2.19/src/__readlink_chk.c:64:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmpptr, linksize);
data/fakechroot-2.19/src/__readlink_chk.c:67:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmp, linksize);
data/fakechroot-2.19/src/__readlinkat_chk.c:51: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).
        else if (tmp[strlen(fakechroot_base)] == '\0') {
data/fakechroot-2.19/src/__readlinkat_chk.c:53: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).
            linksize = strlen(tmpptr);
data/fakechroot-2.19/src/__readlinkat_chk.c:55: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).
        else if (tmp[strlen(fakechroot_base)] == '/') {
data/fakechroot-2.19/src/__readlinkat_chk.c:56: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).
            tmpptr = tmp + strlen(fakechroot_base);
data/fakechroot-2.19/src/__readlinkat_chk.c:57: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).
            linksize -= strlen(fakechroot_base);
data/fakechroot-2.19/src/__readlinkat_chk.c:62: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 (strlen(tmpptr) > bufsiz) {
data/fakechroot-2.19/src/__readlinkat_chk.c:65:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmpptr, linksize);
data/fakechroot-2.19/src/__readlinkat_chk.c:68:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmp, linksize);
data/fakechroot-2.19/src/bind.c:69: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 (strlen(path) >= sizeof(addr_un->sun_path)) {
data/fakechroot-2.19/src/chroot.c:93: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).
        tmplen = strlen(tmpptr);
data/fakechroot-2.19/src/chroot.c:100: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(tmpptr) > 1) && path[strlen(tmpptr) - 1] == '/') {
data/fakechroot-2.19/src/chroot.c:100: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 ((strlen(tmpptr) > 1) && path[strlen(tmpptr) - 1] == '/') {
data/fakechroot-2.19/src/chroot.c:101: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).
        tmpptr[strlen(tmpptr) - 1] = '\0';
data/fakechroot-2.19/src/chroot.c:119: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 (ld_library_path != NULL && strlen(ld_library_path) > 0) {
data/fakechroot-2.19/src/chroot.c:127:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(ld_library_path)+strlen(separator)+strlen(path)*2+sizeof("/usr/lib:/lib");
data/fakechroot-2.19/src/chroot.c:127: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).
    len = strlen(ld_library_path)+strlen(separator)+strlen(path)*2+sizeof("/usr/lib:/lib");
data/fakechroot-2.19/src/chroot.c:127: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).
    len = strlen(ld_library_path)+strlen(separator)+strlen(path)*2+sizeof("/usr/lib:/lib");
data/fakechroot-2.19/src/clearenv.c:59: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).
            tmpkey[n] = alloca(strlen(key) + 1);
data/fakechroot-2.19/src/clearenv.c:60: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).
            tmpenv[n] = alloca(strlen(env) + 1);
data/fakechroot-2.19/src/connect.c:69: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 (strlen(path) >= sizeof(addr_un->sun_path)) {
data/fakechroot-2.19/src/dedotdot.c:67: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).
        (void) strlcpy(cp + 1, cp2, strlen(cp2) + 1);
data/fakechroot-2.19/src/dedotdot.c:72: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).
        (void) strlcpy(file, file + 2, strlen(file) - 1);
data/fakechroot-2.19/src/dedotdot.c:74: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).
        (void) strlcpy(cp, cp + 2, strlen(cp) - 1);
data/fakechroot-2.19/src/dedotdot.c:79:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            (void) strlcpy(file, file + 3, strlen(file) - 2);
data/fakechroot-2.19/src/dedotdot.c:85: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).
        (void) strlcpy(cp2 + 1, cp + 4, strlen(cp) - 3);
data/fakechroot-2.19/src/dedotdot.c:89:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    while (strncmp(file, "../", 3) != 0 && (l = strlen(file)) > 3
data/fakechroot-2.19/src/dedotdot.c:104:13:  [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(file, "/");
data/fakechroot-2.19/src/dedotdot.c:110:9:  [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(file, ".");
data/fakechroot-2.19/src/dedotdot.c:113:9:  [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(file, "/");
data/fakechroot-2.19/src/dedotdot.c:117: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).
    for (l = strlen(file); l > 3 && strcmp((cp = file + l - 2), "/.") == 0; l -= 2) {
data/fakechroot-2.19/src/execve.c:68:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(argv0, filename, FAKECHROOT_PATH_MAX);
data/fakechroot-2.19/src/execve.c:94: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).
    newenvp[newenvppos] = malloc(strlen("FAKECHROOT=true") + 1);
data/fakechroot-2.19/src/execve.c:109:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(tmpkey, *ep, 1024);
data/fakechroot-2.19/src/execve.c:119: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).
            newenvp[newenvppos] = malloc(strlen(key) + strlen(env) + 3);
data/fakechroot-2.19/src/execve.c:119:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            newenvp[newenvppos] = malloc(strlen(key) + strlen(env) + 3);
data/fakechroot-2.19/src/execve.c:121:13:  [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(newenvp[newenvppos], "=");
data/fakechroot-2.19/src/execve.c:131:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(tmpkey, *ep, 1024);
data/fakechroot-2.19/src/execve.c:155: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).
        newenvp[newenvppos] = malloc(strlen("FAKECHROOT_CMD_ORIG=") + strlen(filename) + 1);
data/fakechroot-2.19/src/execve.c:155: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).
        newenvp[newenvppos] = malloc(strlen("FAKECHROOT_CMD_ORIG=") + strlen(filename) + 1);
data/fakechroot-2.19/src/execve.c:180:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    i = read(file, hashbang, FAKECHROOT_PATH_MAX-2);
data/fakechroot-2.19/src/execvp.c:80: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(file) + 1;
data/fakechroot-2.19/src/execvp.c:81: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).
        pathlen = strlen(path);
data/fakechroot-2.19/src/fts.c:73: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).
#  define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
data/fakechroot-2.19/src/fts.c:150:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if ((len = strlen(*argv)) == 0) {
data/fakechroot-2.19/src/fts.c:234: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).
                len = strlen(++cp);
data/fakechroot-2.19/src/fts.c:1092:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if ((len = strlen(*argv)) > max)
data/fakechroot-2.19/src/ftw.c:50: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).
#  define NAMLEN(dirent) strlen ((dirent)->d_name)
data/fakechroot-2.19/src/ftw.c:706: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).
  data.dirbufsize = MAX (2 * strlen (dir), PATH_MAX);
data/fakechroot-2.19/src/get_current_dir_name.c:41: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 ((newptr = malloc(strlen(cwd)+1)) == NULL) {
data/fakechroot-2.19/src/getcwd_real.c:163: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).
# define NAMLEN(d) (strlen ((d)->d_name))
data/fakechroot-2.19/src/glob.c:49: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).
                tmpptr = tmp + strlen(fakechroot_base);
data/fakechroot-2.19/src/glob64.c:52: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).
                tmpptr = tmp + strlen(fakechroot_base);
data/fakechroot-2.19/src/libfakechroot.c:128:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(exclude_list[list_max], &(exclude_path[i]), j - i);
data/fakechroot-2.19/src/libfakechroot.c:129:44:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                exclude_length[list_max] = strlen(exclude_list[list_max]);
data/fakechroot-2.19/src/libfakechroot.c:176: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).
        const size_t len = strlen(v_path);
data/fakechroot-2.19/src/libfakechroot.c:209:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(filename);
data/fakechroot-2.19/src/libfakechroot.c:218:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(cmd_subst, &env[len+1], len2);
data/fakechroot-2.19/src/libfakechroot.h:71:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
data/fakechroot-2.19/src/libfakechroot.h:91:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    const size_t fakechroot_base_len = strlen(fakechroot_base); \
data/fakechroot-2.19/src/libfakechroot.h:92: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).
                    const size_t path_len = strlen(path); \
data/fakechroot-2.19/src/mkostemps.c:42: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(template)+suffixlen < 6) {
data/fakechroot-2.19/src/mkostemps64.c:43: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(template)+suffixlen < 6) {
data/fakechroot-2.19/src/mkstemps.c:43: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(template)+suffixlen < 6) {
data/fakechroot-2.19/src/mkstemps64.c:43: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(template)+suffixlen < 6) {
data/fakechroot-2.19/src/posix_spawn.c:72:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(argv0, filename, FAKECHROOT_PATH_MAX);
data/fakechroot-2.19/src/posix_spawn.c:98: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).
    newenvp[newenvppos] = malloc(strlen("FAKECHROOT=true") + 1);
data/fakechroot-2.19/src/posix_spawn.c:113:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                    strncpy(tmpkey, *ep, 1024);
data/fakechroot-2.19/src/posix_spawn.c:123: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).
            newenvp[newenvppos] = malloc(strlen(key) + strlen(env) + 3);
data/fakechroot-2.19/src/posix_spawn.c:123:56:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            newenvp[newenvppos] = malloc(strlen(key) + strlen(env) + 3);
data/fakechroot-2.19/src/posix_spawn.c:125:13:  [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(newenvp[newenvppos], "=");
data/fakechroot-2.19/src/posix_spawn.c:135:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(tmpkey, *ep, 1024);
data/fakechroot-2.19/src/posix_spawn.c:159: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).
        newenvp[newenvppos] = malloc(strlen("FAKECHROOT_CMD_ORIG=") + strlen(filename) + 1);
data/fakechroot-2.19/src/posix_spawn.c:159: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).
        newenvp[newenvppos] = malloc(strlen("FAKECHROOT_CMD_ORIG=") + strlen(filename) + 1);
data/fakechroot-2.19/src/posix_spawn.c:184:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    i = read(file, hashbang, FAKECHROOT_PATH_MAX-2);
data/fakechroot-2.19/src/posix_spawnp.c:81: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(file) + 1;
data/fakechroot-2.19/src/posix_spawnp.c:82: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).
        pathlen = strlen(path);
data/fakechroot-2.19/src/readlink.c:51: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).
        else if (tmp[strlen(fakechroot_base)] == '\0') {
data/fakechroot-2.19/src/readlink.c:53: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).
            linksize = strlen(tmpptr);
data/fakechroot-2.19/src/readlink.c:55: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).
        else if (tmp[strlen(fakechroot_base)] == '/') {
data/fakechroot-2.19/src/readlink.c:56: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).
            tmpptr = tmp + strlen(fakechroot_base);
data/fakechroot-2.19/src/readlink.c:57: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).
            linksize -= strlen(fakechroot_base);
data/fakechroot-2.19/src/readlink.c:62: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 (strlen(tmpptr) > bufsiz) {
data/fakechroot-2.19/src/readlink.c:65:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmpptr, linksize);
data/fakechroot-2.19/src/readlink.c:68:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmp, linksize);
data/fakechroot-2.19/src/readlinkat.c:50: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).
        else if (tmp[strlen(fakechroot_base)] == '\0') {
data/fakechroot-2.19/src/readlinkat.c:52: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).
            linksize = strlen(tmpptr);
data/fakechroot-2.19/src/readlinkat.c:54: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).
        else if (tmp[strlen(fakechroot_base)] == '/') {
data/fakechroot-2.19/src/readlinkat.c:55: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).
            tmpptr = tmp + strlen(fakechroot_base);
data/fakechroot-2.19/src/readlinkat.c:56: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).
            linksize -= strlen(fakechroot_base);
data/fakechroot-2.19/src/readlinkat.c:61: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 (strlen(tmpptr) > bufsiz) {
data/fakechroot-2.19/src/readlinkat.c:64:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmpptr, linksize);
data/fakechroot-2.19/src/readlinkat.c:67:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, tmp, linksize);
data/fakechroot-2.19/src/realpath.c:215: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).
                len = strlen(end);
data/fakechroot-2.19/src/rpl_lstat.c:74: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 (file);
data/fakechroot-2.19/src/setenv.c:115: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).
                const size_t vallen = strlen(value) + 1;
data/fakechroot-2.19/src/tmpnam.c:39: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).
    ptr2 = malloc(strlen(ptr));
data/fakechroot-2.19/test/src/test-socket-af_unix-client.c:10:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
data/fakechroot-2.19/test/src/test-socket-af_unix-client.c:39:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, argv[2], 80);
data/fakechroot-2.19/test/src/test-socket-af_unix-client.c:40:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (write(sockfd, buffer, strlen(buffer)) < 0) {
data/fakechroot-2.19/test/src/test-socket-af_unix-client.c:45:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    n = read(sockfd, buffer, 80);
data/fakechroot-2.19/test/src/test-socket-af_unix-server.c:10:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
data/fakechroot-2.19/test/src/test-socket-af_unix-server.c:53:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    n = read(newsockfd, buffer, 80);

ANALYSIS SUMMARY:

Hits = 340
Lines analyzed = 13004 in approximately 0.53 seconds (24654 lines/second)
Physical Source Lines of Code (SLOC) = 6893
Hits@level = [0]  56 [1] 110 [2] 114 [3]  47 [4]  56 [5]  13
Hits@level+ = [0+] 396 [1+] 340 [2+] 230 [3+] 116 [4+]  69 [5+]  13
Hits/KSLOC@level+ = [0+] 57.4496 [1+] 49.3254 [2+] 33.3672 [3+] 16.8287 [4+] 10.0102 [5+] 1.88597
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.