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/r-cran-processx-3.4.4/src/cleancall.c
Examining data/r-cran-processx-3.4.4/src/win/thread.c
Examining data/r-cran-processx-3.4.4/src/win/utils.c
Examining data/r-cran-processx-3.4.4/src/win/processx-win.h
Examining data/r-cran-processx-3.4.4/src/win/stdio.c
Examining data/r-cran-processx-3.4.4/src/win/named_pipe.c
Examining data/r-cran-processx-3.4.4/src/win/processx-stdio.h
Examining data/r-cran-processx-3.4.4/src/win/processx.c
Examining data/r-cran-processx-3.4.4/src/unix/childlist.c
Examining data/r-cran-processx-3.4.4/src/unix/connection.c
Examining data/r-cran-processx-3.4.4/src/unix/sigchld.c
Examining data/r-cran-processx-3.4.4/src/unix/utils.c
Examining data/r-cran-processx-3.4.4/src/unix/named_pipe.c
Examining data/r-cran-processx-3.4.4/src/unix/processx-unix.h
Examining data/r-cran-processx-3.4.4/src/unix/processx.c
Examining data/r-cran-processx-3.4.4/src/base64.c
Examining data/r-cran-processx-3.4.4/src/create-time.c
Examining data/r-cran-processx-3.4.4/src/client.c
Examining data/r-cran-processx-3.4.4/src/tools/interrupt.c
Examining data/r-cran-processx-3.4.4/src/tools/pxu.c
Examining data/r-cran-processx-3.4.4/src/tools/px.c
Examining data/r-cran-processx-3.4.4/src/supervisor/windows.c
Examining data/r-cran-processx-3.4.4/src/supervisor/utils.c
Examining data/r-cran-processx-3.4.4/src/supervisor/windows.h
Examining data/r-cran-processx-3.4.4/src/supervisor/utils.h
Examining data/r-cran-processx-3.4.4/src/supervisor/supervisor.c
Examining data/r-cran-processx-3.4.4/src/errors.c
Examining data/r-cran-processx-3.4.4/src/processx-connection.h
Examining data/r-cran-processx-3.4.4/src/init.c
Examining data/r-cran-processx-3.4.4/src/processx-connection.c
Examining data/r-cran-processx-3.4.4/src/processx-vector.c
Examining data/r-cran-processx-3.4.4/src/processx.h
Examining data/r-cran-processx-3.4.4/src/poll.c
Examining data/r-cran-processx-3.4.4/src/cleancall.h
Examining data/r-cran-processx-3.4.4/src/errors.h
Examining data/r-cran-processx-3.4.4/src/processx-types.h

FINAL RESULTS:

data/r-cran-processx-3.4.4/src/errors.c:16:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(errorbuf, ERRORBUF_SIZE, msg, args);
data/r-cran-processx-3.4.4/src/errors.c:50:7:  [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(realsysmsg, lpMsgBuf);
data/r-cran-processx-3.4.4/src/errors.c:57:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(errorbuf, ERRORBUF_SIZE, msg, args);
data/r-cran-processx-3.4.4/src/errors.c:78:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(errorbuf, ERRORBUF_SIZE, msg, args);
data/r-cran-processx-3.4.4/src/processx-connection.c:115:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if (c_read) access |= GENERIC_READ;
data/r-cran-processx-3.4.4/src/processx-connection.c:116:16:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if (c_write) access |= GENERIC_WRITE;
data/r-cran-processx-3.4.4/src/processx-connection.c:121:29:  [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.
    /* dwDesiredAccess = */ access,
data/r-cran-processx-3.4.4/src/supervisor/utils.c:22:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(format, args);
data/r-cran-processx-3.4.4/src/unix/processx.c:308:3:  [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.
  execvp(command, args);
data/r-cran-processx-3.4.4/src/unix/utils.c:10:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(cstr, ptr);
data/r-cran-processx-3.4.4/src/win/processx.c:244:7:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
      wcscpy(pos, temp_buffer);
data/r-cran-processx-3.4.4/src/win/processx.c:509:9:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
        wcscpy(ptr, required_vars[i].wide_eq);
data/r-cran-processx-3.4.4/src/win/stdio.c:9:66:  [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.
static int processx__create_nul_handle(HANDLE *handle_ptr, DWORD access) {
data/r-cran-processx-3.4.4/src/win/stdio.c:19:35:  [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.
    /* dwDesiredAccess=        */ access,
data/r-cran-processx-3.4.4/src/win/stdio.c:32:14:  [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.
					  DWORD access) {
data/r-cran-processx-3.4.4/src/win/stdio.c:47:35:  [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.
    /* dwDesiredAccess=        */ access,
data/r-cran-processx-3.4.4/src/win/stdio.c:60:14:  [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.
					  DWORD access) {
data/r-cran-processx-3.4.4/src/win/stdio.c:75:35:  [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.
    /* dwDesiredAccess=        */ access,
data/r-cran-processx-3.4.4/src/win/stdio.c:321:73:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
      err = processx__create_nul_handle(&CHILD_STDIO_HANDLE(buffer, i), access);
data/r-cran-processx-3.4.4/src/win/stdio.c:339:18:  [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.
					    output, access);
data/r-cran-processx-3.4.4/src/win/stdio.c:342:19:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
					     output, access);
data/r-cran-processx-3.4.4/src/tools/px.c:204:22:  [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.
      printf("%s\n", getenv(argv[++idx]));
data/r-cran-processx-3.4.4/src/unix/processx.c:78:7:  [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("PROCESSX_NOTIFY_OLD_SIGCHLD")) {
data/r-cran-processx-3.4.4/src/base64.c:183:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(RAW(rout2), RAW(rout), j);
data/r-cran-processx-3.4.4/src/client.c:203:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(c_file, _O_WRONLY | _O_CREAT | _O_TRUNC, 0644);
data/r-cran-processx-3.4.4/src/client.c:205:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(c_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
data/r-cran-processx-3.4.4/src/client.c:218:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(c_file, _O_WRONLY | _O_CREAT | _O_TRUNC, 0644);
data/r-cran-processx-3.4.4/src/client.c:220:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(c_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
data/r-cran-processx-3.4.4/src/create-time.c:65:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd = open(path, O_RDONLY);
data/r-cran-processx-3.4.4/src/create-time.c:98:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char path[512];
data/r-cran-processx-3.4.4/src/create-time.c:103:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char state[2] = { 0, 0 };
data/r-cran-processx-3.4.4/src/errors.c:9: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 errorbuf[ERRORBUF_SIZE];
data/r-cran-processx-3.4.4/src/processx-connection.c:136: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).
  os_handle = open(c_filename, flags, 0644);
data/r-cran-processx-3.4.4/src/processx-connection.c:217: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.
  if (left > 0) memcpy(RAW(result), cbytes + written, left);
data/r-cran-processx-3.4.4/src/processx-connection.c:512:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buffer, ccon->utf8, utf8_bytes);
data/r-cran-processx-3.4.4/src/processx-connection.c:580:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(*linep, ccon->utf8, newline);
data/r-cran-processx-3.4.4/src/supervisor/supervisor.c:300: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 readbuf[INPUT_BUF_LEN];
data/r-cran-processx-3.4.4/src/supervisor/supervisor.c:324:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp_input = fopen(input_pipe_name, "r");
data/r-cran-processx-3.4.4/src/supervisor/windows.c:132: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 input_char_buf[WIN_INPUT_BUF_LEN];
data/r-cran-processx-3.4.4/src/supervisor/windows.c:193: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 input_char_buf[WIN_INPUT_BUF_LEN];
data/r-cran-processx-3.4.4/src/tools/px.c:49:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[8192];
data/r-cran-processx-3.4.4/src/tools/px.c:67:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = open(filename, O_RDONLY);
data/r-cran-processx-3.4.4/src/tools/px.c:90:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[nbytes + 1];
data/r-cran-processx-3.4.4/src/tools/px.c:168:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      int fd = open(argv[++idx], _O_WRONLY | _O_CREAT | _O_BINARY);
data/r-cran-processx-3.4.4/src/tools/px.c:170:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      int fd = open(argv[++idx], O_WRONLY | O_CREAT, 0644);
data/r-cran-processx-3.4.4/src/tools/pxu.c:47:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[8192];
data/r-cran-processx-3.4.4/src/tools/pxu.c:98:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buffer[nbytes + 1];
data/r-cran-processx-3.4.4/src/unix/processx.c:141: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.
  const char *out_files[3] = { std_in, std_out, std_err };
data/r-cran-processx-3.4.4/src/unix/processx.c:151:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int sub_fd = open(pty_name, O_RDWR);
data/r-cran-processx-3.4.4/src/unix/processx.c:244:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  use_fd = open(out_files[fd], O_RDONLY);
data/r-cran-processx-3.4.4/src/unix/processx.c:246:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	  use_fd = open(out_files[fd], O_CREAT | O_TRUNC| O_RDWR, 0644);
data/r-cran-processx-3.4.4/src/unix/processx.c:250:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	use_fd = open("/dev/null", fd == 0 ? O_RDONLY : O_RDWR);
data/r-cran-processx-3.4.4/src/unix/processx.c:443:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pty_namex[R_PROCESSX_PTY_NAME_LEN];
data/r-cran-processx-3.4.4/src/unix/sigchld.c:95:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&old_sig_handler, &old, sizeof(old));
data/r-cran-processx-3.4.4/src/win/processx.c:80:12:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  ws_len = MultiByteToWideChar(
data/r-cran-processx-3.4.4/src/win/processx.c:93:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  r = MultiByteToWideChar(
data/r-cran-processx-3.4.4/src/win/processx.c:198:15:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    arg_len = MultiByteToWideChar(
data/r-cran-processx-3.4.4/src/win/processx.c:229:15:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    arg_len = MultiByteToWideChar(
data/r-cran-processx-3.4.4/src/win/processx.c:378:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(dst_copy, env, len * sizeof(WCHAR));
data/r-cran-processx-3.4.4/src/win/processx.c:379:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(dst_copy + len, id, idlen * sizeof(WCHAR));
data/r-cran-processx-3.4.4/src/win/processx.c:408:13:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      len = MultiByteToWideChar(CP_UTF8,
data/r-cran-processx-3.4.4/src/win/processx.c:423:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  len = MultiByteToWideChar(CP_UTF8, 0, tree_id, -1, NULL, 0);
data/r-cran-processx-3.4.4/src/win/processx.c:437:13:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      len = MultiByteToWideChar(CP_UTF8,
data/r-cran-processx-3.4.4/src/win/processx.c:452:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  len = MultiByteToWideChar(CP_UTF8, 0, tree_id, -1, ptr,
data/r-cran-processx-3.4.4/src/win/stdio.c:101:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pipe_name[40];
data/r-cran-processx-3.4.4/src/win/stdio.c:167:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char pipe_name[40];
data/r-cran-processx-3.4.4/src/win/thread.c:231:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[10];
data/r-cran-processx-3.4.4/src/create-time.c:80:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(fd, ptr, rem_size);
data/r-cran-processx-3.4.4/src/errors.c:49: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).
      realsysmsg = R_alloc(1, strlen(lpMsgBuf) + 1);
data/r-cran-processx-3.4.4/src/processx-connection.c:106:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
SEXP processx_connection_create_file(SEXP filename, SEXP read, SEXP write) {
data/r-cran-processx-3.4.4/src/processx-connection.c:108:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int c_read = LOGICAL(read)[0];
data/r-cran-processx-3.4.4/src/processx-connection.c:1389:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  bytes_read = read(ccon->handle, ccon->buffer + ccon->buffer_data_size, todo);
data/r-cran-processx-3.4.4/src/processx-connection.h:136:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
SEXP processx_connection_create_file(SEXP filename, SEXP read, SEXP write);
data/r-cran-processx-3.4.4/src/supervisor/supervisor.c:91:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(milliseconds * 1000);
data/r-cran-processx-3.4.4/src/supervisor/supervisor.c:251:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                parent_pid_arg = extract_pid(argv[i], (int) strlen(argv[i]));
data/r-cran-processx-3.4.4/src/tools/px.c:52:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((n = read(f, buf, (long) sizeof buf)) > 0) {
data/r-cran-processx-3.4.4/src/tools/px.c:80: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).
  size_t len = strlen(s);
data/r-cran-processx-3.4.4/src/tools/px.c:93:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret = read(fd1, buffer, nbytes);
data/r-cran-processx-3.4.4/src/tools/px.c:132:21:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      if (fnum > 0) usleep((useconds_t) (fnum * 1000.0 * 1000.0));
data/r-cran-processx-3.4.4/src/tools/pxu.c:50:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  while ((n = read(f, buf, (long) sizeof buf)) > 0) {
data/r-cran-processx-3.4.4/src/tools/pxu.c:78:16:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t len = wcslen(s);
data/r-cran-processx-3.4.4/src/tools/pxu.c:88: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).
  size_t len = strlen(s);
data/r-cran-processx-3.4.4/src/tools/pxu.c:101:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret = read(fd1, buffer, nbytes);
data/r-cran-processx-3.4.4/src/tools/pxu.c:142:21:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      if (fnum > 0) usleep((useconds_t) (fnum * 1000.0 * 1000.0));
data/r-cran-processx-3.4.4/src/unix/processx.c:112:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (strlen(p) < sn_len) {
data/r-cran-processx-3.4.4/src/unix/processx.c:113:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(sub_name, p, sn_len);
data/r-cran-processx-3.4.4/src/unix/processx.c:538:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    r = read(signal_pipe[0], &exec_errorno, sizeof(exec_errorno));
data/r-cran-processx-3.4.4/src/unix/utils.c:9:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  char *cstr = R_alloc(1, (int) strlen(ptr) + 1);
data/r-cran-processx-3.4.4/src/win/named_pipe.c:120:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        strlen(text_str),
data/r-cran-processx-3.4.4/src/win/named_pipe.c:125:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!success || strlen(text_str) != n_written) {
data/r-cran-processx-3.4.4/src/win/processx.c:110:16:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t len = wcslen(source);
data/r-cran-processx-3.4.4/src/win/processx.c:124:5:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    wcsncpy(target, source, len);
data/r-cran-processx-3.4.4/src/win/processx.c:135:5:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    wcsncpy(target, source, len);
data/r-cran-processx-3.4.4/src/win/processx.c:373:11:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  idlen = wcslen(id) + 1;
data/r-cran-processx-3.4.4/src/win/processx.c:522:13:  [1] (buffer) wcslen:
  Does not handle 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 = wcslen(*ptr_copy) + 1;
data/r-cran-processx-3.4.4/src/win/processx.c:578:3:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  wcsncpy(result_pos, cwd, cwd_len);
data/r-cran-processx-3.4.4/src/win/processx.c:588:3:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  wcsncpy(result_pos, dir, dir_len);
data/r-cran-processx-3.4.4/src/win/processx.c:598:3:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  wcsncpy(result_pos, name, name_len);
data/r-cran-processx-3.4.4/src/win/processx.c:609:5:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    wcsncpy(result_pos, ext, ext_len);
data/r-cran-processx-3.4.4/src/win/processx.c:726:21:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t file_len = wcslen(file);
data/r-cran-processx-3.4.4/src/win/processx.c:727:20:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t cwd_len = wcslen(cwd);
data/r-cran-processx-3.4.4/src/win/processx.c:983:29:  [1] (buffer) wcslen:
  Does not handle 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 (! application_path && wcslen(path) >= 2 &&

ANALYSIS SUMMARY:

Hits = 102
Lines analyzed = 8447 in approximately 0.22 seconds (38953 lines/second)
Physical Source Lines of Code (SLOC) = 5919
Hits@level = [0] 115 [1]  35 [2]  44 [3]   2 [4]  21 [5]   0
Hits@level+ = [0+] 217 [1+] 102 [2+]  67 [3+]  23 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 36.6616 [1+] 17.2326 [2+] 11.3195 [3+] 3.88579 [4+] 3.5479 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.