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/rjava-0.9-13/jri/bootstrap/JRIBootstrap.c
Examining data/rjava-0.9-13/jri/bootstrap/JRIBootstrap.h
Examining data/rjava-0.9-13/jri/src/Rdecl.h
Examining data/rjava-0.9-13/jri/src/Rcallbacks.c
Examining data/rjava-0.9-13/jri/src/Rengine.c
Examining data/rjava-0.9-13/jri/src/jri.h
Examining data/rjava-0.9-13/jri/src/rjava.c
Examining data/rjava-0.9-13/jri/src/win32/findjava.c
Examining data/rjava-0.9-13/jri/src/rjava.h
Examining data/rjava-0.9-13/jri/src/globals.c
Examining data/rjava-0.9-13/jri/src/jri.c
Examining data/rjava-0.9-13/jri/src/Rinit.h
Examining data/rjava-0.9-13/jri/src/Rcallbacks.h
Examining data/rjava-0.9-13/jri/src/globals.h
Examining data/rjava-0.9-13/jri/src/Rinit.c
Examining data/rjava-0.9-13/src/callback.h
Examining data/rjava-0.9-13/src/rJava.c
Examining data/rjava-0.9-13/src/fields.c
Examining data/rjava-0.9-13/src/otables.c
Examining data/rjava-0.9-13/src/Rglue.c
Examining data/rjava-0.9-13/src/init.c
Examining data/rjava-0.9-13/src/loader.c
Examining data/rjava-0.9-13/src/rJava.h
Examining data/rjava-0.9-13/src/callback.c
Examining data/rjava-0.9-13/src/callJNI.c
Examining data/rjava-0.9-13/src/arrayc.c
Examining data/rjava-0.9-13/src/registration.c
Examining data/rjava-0.9-13/src/jvm-w32/config.h
Examining data/rjava-0.9-13/src/jvm-w32/WinRegistry.c
Examining data/rjava-0.9-13/src/jvm-w32/findjava.c
Examining data/rjava-0.9-13/src/jri_glue.c
Examining data/rjava-0.9-13/src/tools.c

FINAL RESULTS:

data/rjava-0.9-13/jri/src/Rinit.c:169:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(ss, "%s [y/n/c]: ", s);
data/rjava-0.9-13/jri/src/Rinit.c:200:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(Rversion, "%s.%s", R_MAJOR, R_MINOR);
data/rjava-0.9-13/jri/src/Rinit.c:204:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(msg, "Error: R.DLL version does not match (DLL: %s, expecting: %s)\n", getDLLVersion(), Rversion);
data/rjava-0.9-13/jri/src/Rinit.c:205:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, msg);
data/rjava-0.9-13/jri/src/Rinit.c:212:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(RHome, getenv("R_HOME"));
data/rjava-0.9-13/jri/src/Rinit.c:231:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(rhb,"R_HOME=%s",RHome);
data/rjava-0.9-13/jri/src/Rinit.c:240:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(RUser, getenv("R_USER"));
data/rjava-0.9-13/jri/src/Rinit.c:242:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(RUser, getenv("HOME"));
data/rjava-0.9-13/jri/src/Rinit.c:244:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(RUser, getenv("HOMEDIR"));
data/rjava-0.9-13/jri/src/Rinit.c:245:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(RUser, getenv("HOMEPATH"));
data/rjava-0.9-13/jri/src/jri.c:17:3:  [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(fmt,v);
data/rjava-0.9-13/jri/src/jri.c:28:5:  [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(fmt,v);
data/rjava-0.9-13/jri/src/jri.c:53:3:  [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(fmt,v);
data/rjava-0.9-13/jri/src/win32/findjava.c:16: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(RegStrBuf,getenv("R_HOME"));
data/rjava-0.9-13/jri/src/win32/findjava.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(RegStrBuf,getenv("JAVA_HOME"));
data/rjava-0.9-13/jri/src/win32/findjava.c:58: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(dbuf,javakey);
data/rjava-0.9-13/jri/src/win32/findjava.c:60:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(dbuf,RegStrBuf);
data/rjava-0.9-13/jri/src/win32/findjava.c:62: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(javakey, dbuf);
data/rjava-0.9-13/jri/src/win32/findjava.c:90: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(dbuf, RegStrBuf);
data/rjava-0.9-13/src/Rglue.c:213: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(sig->sig + al, add);
data/rjava-0.9-13/src/Rglue.c:1007:8:  [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(buf+1, cname);
data/rjava-0.9-13/src/Rglue.c:1010:8:  [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(buf+2, cname);
data/rjava-0.9-13/src/callJNI.c:31:2:  [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(msg, 511, err, ap);
data/rjava-0.9-13/src/callJNI.c:51: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(cn, cName);
data/rjava-0.9-13/src/fields.c:29: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(jc+1, cl);
data/rjava-0.9-13/src/init.c:74:10:  [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.
  return vfprintf(f, fmt, ap);
data/rjava-0.9-13/src/init.c:141:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(classpath, "-Djava.class.path=%s", user_classpath);
data/rjava-0.9-13/src/jvm-w32/findjava.c:16: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(RegStrBuf,getenv("R_HOME"));
data/rjava-0.9-13/src/jvm-w32/findjava.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(RegStrBuf,getenv("JAVA_HOME"));
data/rjava-0.9-13/src/jvm-w32/findjava.c:58: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(dbuf,javakey);
data/rjava-0.9-13/src/jvm-w32/findjava.c:60:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(dbuf,RegStrBuf);
data/rjava-0.9-13/src/jvm-w32/findjava.c:62: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(javakey, dbuf);
data/rjava-0.9-13/src/jvm-w32/findjava.c:90: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(dbuf, RegStrBuf);
data/rjava-0.9-13/src/rJava.h:67:128:  [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 MEM_PROF_OUT(X ...) { if (memprof_f) { long t = time(0); fprintf(memprof_f, "<%08x> %x:%02d ", (int) env, t/60, t%60); fprintf(memprof_f, X); }; }
data/rjava-0.9-13/jri/bootstrap/JRIBootstrap.c:111:8:  [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.
  cVal=getenv(cVar);
data/rjava-0.9-13/jri/src/Rengine.c:606: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.
    cVal=getenv(cKey);
data/rjava-0.9-13/jri/src/Rinit.c:24: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("R_HOME")) {
data/rjava-0.9-13/jri/src/Rinit.c:211:8:  [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("R_HOME")) {
data/rjava-0.9-13/jri/src/Rinit.c:212: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.
	strcpy(RHome, getenv("R_HOME"));
data/rjava-0.9-13/jri/src/Rinit.c:239:9:  [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("R_USER")) {
data/rjava-0.9-13/jri/src/Rinit.c:240: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.
	strcpy(RUser, getenv("R_USER"));
data/rjava-0.9-13/jri/src/Rinit.c:241: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.
    } else if (getenv("HOME")) {
data/rjava-0.9-13/jri/src/Rinit.c:242: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.
	strcpy(RUser, getenv("HOME"));
data/rjava-0.9-13/jri/src/Rinit.c:243: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.
    } else if (getenv("HOMEDIR")) {
data/rjava-0.9-13/jri/src/Rinit.c:244: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.
	strcpy(RUser, getenv("HOMEDIR"));
data/rjava-0.9-13/jri/src/Rinit.c:245: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.
	strcat(RUser, getenv("HOMEPATH"));
data/rjava-0.9-13/jri/src/win32/findjava.c:15:9:  [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("R_HOME")) {
data/rjava-0.9-13/jri/src/win32/findjava.c:16:24:  [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.
      strcpy(RegStrBuf,getenv("R_HOME"));
data/rjava-0.9-13/jri/src/win32/findjava.c:30: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("JAVA_HOME")) {
data/rjava-0.9-13/jri/src/win32/findjava.c:31: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.
    strcpy(RegStrBuf,getenv("JAVA_HOME"));
data/rjava-0.9-13/src/init.c:107: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.
    user_classpath = getenv("CLASSPATH");
data/rjava-0.9-13/src/init.c:379: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("R_GUI_APP_VERSION") || getenv("RJAVA_INIT_AWT"))
data/rjava-0.9-13/src/init.c:379:38:  [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("R_GUI_APP_VERSION") || getenv("RJAVA_INIT_AWT"))
data/rjava-0.9-13/src/init.c:593: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.
  char *vval = getenv("RJAVA_JVM_STACK_WORKAROUND");
data/rjava-0.9-13/src/jvm-w32/findjava.c:15:9:  [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("R_HOME")) {
data/rjava-0.9-13/src/jvm-w32/findjava.c:16:24:  [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.
      strcpy(RegStrBuf,getenv("R_HOME"));
data/rjava-0.9-13/src/jvm-w32/findjava.c:30: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("JAVA_HOME")) {
data/rjava-0.9-13/src/jvm-w32/findjava.c:31: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.
    strcpy(RegStrBuf,getenv("JAVA_HOME"));
data/rjava-0.9-13/jri/bootstrap/JRIBootstrap.c:12: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 cVal[1024];
data/rjava-0.9-13/jri/bootstrap/JRIBootstrap.c:40:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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/rjava-0.9-13/jri/bootstrap/JRIBootstrap.c:63:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[256];
data/rjava-0.9-13/jri/bootstrap/JRIBootstrap.c:87:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/rjava-0.9-13/jri/src/Rinit.c:166: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  ss[128];
data/rjava-0.9-13/jri/src/Rinit.c:167:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char a[3];
data/rjava-0.9-13/jri/src/Rinit.c:188: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 Rversion[25], RUser[MAX_PATH], RHome[MAX_PATH];
data/rjava-0.9-13/jri/src/Rinit.c:195: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 rhb[MAX_PATH+10];
data/rjava-0.9-13/jri/src/Rinit.c:203: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 msg[512];
data/rjava-0.9-13/jri/src/jri.c:107: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(dae,INTEGER(e),sizeof(jint)*len);
data/rjava-0.9-13/jri/src/jri.c:135: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(dae, RAW(e), len);
data/rjava-0.9-13/jri/src/jri.c:163: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(dae,INTEGER(e),sizeof(jint)*len);
data/rjava-0.9-13/jri/src/jri.c:222: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(dae,REAL(e),sizeof(jdouble)*len);
data/rjava-0.9-13/jri/src/jri.c:369: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(INTEGER(ar),ap,sizeof(jint)*l);
data/rjava-0.9-13/jri/src/jri.c:394: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(RAW(ar), ap, l);
data/rjava-0.9-13/jri/src/jri.c:418: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(LOGICAL(ar),ap,sizeof(jint)*l);
data/rjava-0.9-13/jri/src/jri.c:499:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(REAL(ar),ap,sizeof(jdouble)*l);
data/rjava-0.9-13/jri/src/win32/findjava.c:5: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 RegStrBuf[32768], dbuf[32768];
data/rjava-0.9-13/src/Rglue.c:208:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(ns, sig->sig, al + 1);
data/rjava-0.9-13/src/Rglue.c:788: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 cn[128];
data/rjava-0.9-13/src/Rglue.c:848:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cn[128];
data/rjava-0.9-13/src/Rglue.c:983:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[256];
data/rjava-0.9-13/src/arrayc.c:77:12:  [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 (l>0) memcpy(INTEGER(ar),ap,sizeof(jint)*l);
data/rjava-0.9-13/src/arrayc.c:219:12:  [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 (l>0) memcpy(RAW(ar),ap,l);
data/rjava-0.9-13/src/arrayc.c:250:12:  [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 (l>0) memcpy(REAL(ar),ap,sizeof(jdouble)*l);
data/rjava-0.9-13/src/callJNI.c:23:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char msg[512];
data/rjava-0.9-13/src/callJNI.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 cn[128], *c=cn;
data/rjava-0.9-13/src/callJNI.c:140: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(dae,cont,sizeof(jdouble)*len);
data/rjava-0.9-13/src/callJNI.c:156: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(dae,cont,sizeof(jint)*len);
data/rjava-0.9-13/src/callJNI.c:172: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(dae,cont,len);
data/rjava-0.9-13/src/init.c:495: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[psize];
data/rjava-0.9-13/src/init.c:557: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 dummy[1];
data/rjava-0.9-13/src/init.c:595:11:  [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).
    val = atoi(vval);
data/rjava-0.9-13/src/init.c:676: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 dummy[1];
data/rjava-0.9-13/src/jri_glue.c:10: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 sig[128];
data/rjava-0.9-13/src/jvm-w32/WinRegistry.c:7:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char RegStrBuf[32768];
data/rjava-0.9-13/src/jvm-w32/findjava.c:5: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 RegStrBuf[32768], dbuf[32768];
data/rjava-0.9-13/src/rJava.h:114:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char sigbuf[256]; /* default size of the local buffer (on the stack) */
data/rjava-0.9-13/src/tools.c:157:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    memprof_f = fopen(cFn, "a");
data/rjava-0.9-13/jri/src/Rcallbacks.c:90: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).
			int l=strlen(c);
data/rjava-0.9-13/jri/src/Rcallbacks.c:91:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy((char*)buf, c, (l>len-1)?len-1:l);
data/rjava-0.9-13/jri/src/Rcallbacks.c:189: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).
					slen=strlen(c);
data/rjava-0.9-13/jri/src/Rcallbacks.c:190:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(buf, c, (slen>len-1)?len-1:slen);
data/rjava-0.9-13/jri/src/Rcallbacks.c:209: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).
		namelen = strlen(buf);
data/rjava-0.9-13/jri/src/Rcallbacks.c:213:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		return strlen(buf);
data/rjava-0.9-13/jri/src/Rcallbacks.c:268:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if(strlen(p) > PATH_MAX - 1)
data/rjava-0.9-13/jri/src/Rcallbacks.c:302:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if(strlen(p) > PATH_MAX - 1)
data/rjava-0.9-13/jri/src/Rinit.c:201: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).
    cvl=strlen(R_MAJOR)+2;
data/rjava-0.9-13/jri/src/Rinit.c:248: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).
    p = RUser + (strlen(RUser) - 1);
data/rjava-0.9-13/jri/src/rjava.c:23:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  n = read(resin, buf, sizeof(ptrlong));
data/rjava-0.9-13/jri/src/rjava.c:52:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  read(resin, buf, sizeof(ptrlong) * 2);
data/rjava-0.9-13/jri/src/win32/findjava.c:59:5:  [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(dbuf,"\\");
data/rjava-0.9-13/jri/src/win32/findjava.c:61: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).
    javakey=(char*) malloc(strlen(dbuf)+1);
data/rjava-0.9-13/src/Rglue.c:202: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).
  int l = strlen(add);
data/rjava-0.9-13/src/Rglue.c:1001:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  if (strlen(cname)<253) {
data/rjava-0.9-13/src/Rglue.c:1011:8:  [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(buf,";");
data/rjava-0.9-13/src/callback.c:31:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int n = read(ipcin, buf, sizeof(long));
data/rjava-0.9-13/src/callback.c:36:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    n = read(ipcin, buf, sizeof(long));
data/rjava-0.9-13/src/callback.c:47:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(ipcin, buf+1, sizeof(long)*2);
data/rjava-0.9-13/src/fields.c:27: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).
  char *jc = malloc(strlen(cl)+3);
data/rjava-0.9-13/src/fields.c:30:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
  strcat(jc, ";");
data/rjava-0.9-13/src/init.c:140: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).
  classpath = (char*) calloc(24 + strlen(user_classpath), sizeof(char));
data/rjava-0.9-13/src/init.c:511:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while (read(pipefd[0], &buf, psize) > 0);
data/rjava-0.9-13/src/jvm-w32/findjava.c:59:5:  [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(dbuf,"\\");
data/rjava-0.9-13/src/jvm-w32/findjava.c:61: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).
    javakey=(char*) malloc(strlen(dbuf)+1);

ANALYSIS SUMMARY:

Hits = 123
Lines analyzed = 6822 in approximately 0.25 seconds (27567 lines/second)
Physical Source Lines of Code (SLOC) = 5323
Hits@level = [0]  39 [1]  26 [2]  39 [3]  24 [4]  34 [5]   0
Hits@level+ = [0+] 162 [1+] 123 [2+]  97 [3+]  58 [4+]  34 [5+]   0
Hits/KSLOC@level+ = [0+] 30.434 [1+] 23.1073 [2+] 18.2228 [3+] 10.8961 [4+] 6.38738 [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.