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/tomcat-native-1.2.25/native/include/ssl_private.h
Examining data/tomcat-native-1.2.25/native/include/tcn_api.h
Examining data/tomcat-native-1.2.25/native/include/tcn.h
Examining data/tomcat-native-1.2.25/native/include/tcn_version.h
Examining data/tomcat-native-1.2.25/native/os/win32/registry.c
Examining data/tomcat-native-1.2.25/native/os/win32/system.c
Examining data/tomcat-native-1.2.25/native/os/win32/ntpipe.c
Examining data/tomcat-native-1.2.25/native/os/unix/uxpipe.c
Examining data/tomcat-native-1.2.25/native/os/unix/system.c
Examining data/tomcat-native-1.2.25/native/src/user.c
Examining data/tomcat-native-1.2.25/native/src/os.c
Examining data/tomcat-native-1.2.25/native/src/proc.c
Examining data/tomcat-native-1.2.25/native/src/pool.c
Examining data/tomcat-native-1.2.25/native/src/sslconf.c
Examining data/tomcat-native-1.2.25/native/src/address.c
Examining data/tomcat-native-1.2.25/native/src/bb.c
Examining data/tomcat-native-1.2.25/native/src/stdlib.c
Examining data/tomcat-native-1.2.25/native/src/multicast.c
Examining data/tomcat-native-1.2.25/native/src/poll.c
Examining data/tomcat-native-1.2.25/native/src/sslnetwork.c
Examining data/tomcat-native-1.2.25/native/src/lock.c
Examining data/tomcat-native-1.2.25/native/src/sslcontext.c
Examining data/tomcat-native-1.2.25/native/src/sslutils.c
Examining data/tomcat-native-1.2.25/native/src/mmap.c
Examining data/tomcat-native-1.2.25/native/src/network.c
Examining data/tomcat-native-1.2.25/native/src/shm.c
Examining data/tomcat-native-1.2.25/native/src/dir.c
Examining data/tomcat-native-1.2.25/native/src/thread.c
Examining data/tomcat-native-1.2.25/native/src/jnilib.c
Examining data/tomcat-native-1.2.25/native/src/file.c
Examining data/tomcat-native-1.2.25/native/src/info.c
Examining data/tomcat-native-1.2.25/native/src/ssl.c
Examining data/tomcat-native-1.2.25/native/src/misc.c
Examining data/tomcat-native-1.2.25/native/src/sslinfo.c
Examining data/tomcat-native-1.2.25/native/src/error.c

FINAL RESULTS:

data/tomcat-native-1.2.25/native/src/file.c:506:32:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
TCN_IMPLEMENT_CALL(jint, File, gets)(TCN_STDARGS, jbyteArray buf, jint offset,
data/tomcat-native-1.2.25/native/os/unix/system.c:58:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(proc_path, "/proc/self/%s", type);
data/tomcat-native-1.2.25/native/os/unix/system.c:152:72:  [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 (sscanf(buf, "cpu %lu %*d %lu %ld", &user, &system, &idle) == 3) {
data/tomcat-native-1.2.25/native/os/unix/system.c:154:48:  [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.
                            pvals[8] = (jlong)(system * 1000 / sys_clk_tck * 1000); /* Kernel Time in microseconds */
data/tomcat-native-1.2.25/native/os/unix/system.c:178:57:  [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.
                                        "%llu", &user, &system, &starttime) == 3) {
data/tomcat-native-1.2.25/native/os/unix/system.c:180:49:  [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.
                            pvals[11] = (jlong)(system * 1000 / sys_clk_tck * 1000); /* Process System Time in microseconds */
data/tomcat-native-1.2.25/native/os/unix/system.c:413:30:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
TCN_IMPLEMENT_CALL(void, OS, syslog)(TCN_STDARGS, jint level,
data/tomcat-native-1.2.25/native/os/unix/uxpipe.c:221: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(con->uxaddr.sun_path, J2S(name));
data/tomcat-native-1.2.25/native/os/unix/uxpipe.c:225: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(con->uxaddr.sun_path, DEFNAME);
data/tomcat-native-1.2.25/native/os/win32/ntpipe.c:330: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(con->name, DEFNAME);
data/tomcat-native-1.2.25/native/os/win32/ntpipe.c:405: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(con->name, c->name);
data/tomcat-native-1.2.25/native/os/win32/system.c:194: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(event_key, domain);
data/tomcat-native-1.2.25/native/os/win32/system.c:203: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(log_domain, domain);
data/tomcat-native-1.2.25/native/os/win32/system.c:220:30:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
TCN_IMPLEMENT_CALL(void, OS, syslog)(TCN_STDARGS, jint level,
data/tomcat-native-1.2.25/native/src/error.c:67:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(fmt, "%s for [%04d@%s]", msg, line, f);
data/tomcat-native-1.2.25/native/src/file.c:87:33:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
TCN_IMPLEMENT_CALL(jlong, File, mktemp)(TCN_STDARGS, jstring templ,
data/tomcat-native-1.2.25/native/src/ssl.c:1134: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(out, J2S(o));
data/tomcat-native-1.2.25/native/os/win32/system.c:73:13:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
            InitializeCriticalSection(&dll_critical_section);
data/tomcat-native-1.2.25/native/os/win32/system.c:76:29:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
            if ((h_kernel = LoadLibrary("kernel32.dll")) != NULL)
data/tomcat-native-1.2.25/native/os/win32/system.c:83:32:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
                if ((h_ntdll = LoadLibrary("ntdll.dll")) != NULL)
data/tomcat-native-1.2.25/native/src/jnilib.c:99: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.
        char *ppid = getenv(TCN_PARENT_IDE);
data/tomcat-native-1.2.25/native/src/misc.c:27:30:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
TCN_IMPLEMENT_CALL(jint, OS, random)(TCN_STDARGS, jbyteArray buf,
data/tomcat-native-1.2.25/native/src/ssl.c:866: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.
        char *key_log_file_name = getenv("SSLKEYLOGFILE");
data/tomcat-native-1.2.25/native/include/ssl_private.h:261: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            password[SSL_MAX_PASSWORD_LEN];
data/tomcat-native-1.2.25/native/include/ssl_private.h:274: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   context_id[SHA_DIGEST_LENGTH];
data/tomcat-native-1.2.25/native/os/unix/system.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 proc_path[MAX_PROC_PATH_LEN+1];
data/tomcat-native-1.2.25/native/os/unix/system.c:59: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).
    return open(proc_path, O_RDONLY);
data/tomcat-native-1.2.25/native/os/unix/system.c:124:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            static char buf[1024];
data/tomcat-native-1.2.25/native/os/unix/system.c:147:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                fd = open("/proc/stat", O_RDONLY);
data/tomcat-native-1.2.25/native/os/unix/system.c:169:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                fd = open("/proc/self/stat", O_RDONLY);
data/tomcat-native-1.2.25/native/os/unix/uxpipe.c:66:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                name[TCN_UNIX_MAXPATH+1];
data/tomcat-native-1.2.25/native/os/win32/ntpipe.c:75:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char           name[MAX_PATH+1];
data/tomcat-native-1.2.25/native/os/win32/registry.c:175: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).
TCN_IMPLEMENT_CALL(jlong, Registry, open)(TCN_STDARGS, jint root, jstring name,
data/tomcat-native-1.2.25/native/os/win32/system.c:51: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             dll_file_name[MAX_PATH];
data/tomcat-native-1.2.25/native/os/win32/system.c:185: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 log_domain[MAX_PATH] = "Native";
data/tomcat-native-1.2.25/native/os/win32/system.c:191: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 event_key[MAX_PATH];
data/tomcat-native-1.2.25/native/os/win32/system.c:193: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(event_key, "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\");
data/tomcat-native-1.2.25/native/os/win32/system.c:227:11:  [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 *messages[1];
data/tomcat-native-1.2.25/native/src/address.c:41:24:  [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).
            scope_id = atoi(sp);
data/tomcat-native-1.2.25/native/src/dir.c:72:38:  [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).
TCN_IMPLEMENT_CALL(jlong, Directory, open)(TCN_STDARGS, jstring path,
data/tomcat-native-1.2.25/native/src/error.c:59: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 fmt[TCN_BUFFER_SZ];
data/tomcat-native-1.2.25/native/src/error.c:79: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 msg[TCN_BUFFER_SZ] = {'\0'};
data/tomcat-native-1.2.25/native/src/error.c:98: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 serr[512] = {0};
data/tomcat-native-1.2.25/native/src/error.c:153: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 serr[512] = {0};
data/tomcat-native-1.2.25/native/src/file.c:70:33:  [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).
TCN_IMPLEMENT_CALL(jlong, File, open)(TCN_STDARGS, jstring fname,
data/tomcat-native-1.2.25/native/src/jnilib.c:101:30:  [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).
            tcn_parent_pid = atoi(ppid);
data/tomcat-native-1.2.25/native/src/jnilib.c:508: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 unmapped[540];
data/tomcat-native-1.2.25/native/src/misc.c:59: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 ts[APR_RFC822_DATE_LEN];
data/tomcat-native-1.2.25/native/src/misc.c:69: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 ts[APR_CTIME_LEN];
data/tomcat-native-1.2.25/native/src/network.c:753: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 sb[TCN_BUFFER_SZ];
data/tomcat-native-1.2.25/native/src/proc.c:196: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 *s_args[MAX_ARGS_SIZE];
data/tomcat-native-1.2.25/native/src/proc.c:197: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 *s_env[MAX_ENV_SIZE];
data/tomcat-native-1.2.25/native/src/proc.c:236: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 pps[32];
data/tomcat-native-1.2.25/native/src/ssl.c:614: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[50];
data/tomcat-native-1.2.25/native/src/ssl.c:618:9:  [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).
    i = atoi(buf)+1;
data/tomcat-native-1.2.25/native/src/ssl.c:626: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[APR_PATH_MAX];
data/tomcat-native-1.2.25/native/src/ssl.c:657: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[APR_PATH_MAX];
data/tomcat-native-1.2.25/native/src/ssl.c:677: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 stackdata[256];
data/tomcat-native-1.2.25/native/src/ssl.c:729:18:  [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 buf[4096];
data/tomcat-native-1.2.25/native/src/ssl.c:868:26:  [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).
            FILE *file = fopen(key_log_file_name, "a");
data/tomcat-native-1.2.25/native/src/ssl.c:946: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 msg[256];
data/tomcat-native-1.2.25/native/src/ssl.c:1094: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(out, jout, ret);
data/tomcat-native-1.2.25/native/src/ssl.c:1280:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/tomcat-native-1.2.25/native/src/ssl.c:1807:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/tomcat-native-1.2.25/native/src/ssl.c:1978: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 err[256];
data/tomcat-native-1.2.25/native/src/sslconf.c:99: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 err[256];
data/tomcat-native-1.2.25/native/src/sslconf.c:172: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 err[256];
data/tomcat-native-1.2.25/native/src/sslconf.c:256: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(buf, SSL_CIPHERS_ALWAYS_DISABLED, strlen(SSL_CIPHERS_ALWAYS_DISABLED));
data/tomcat-native-1.2.25/native/src/sslconf.c:257: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(buf + strlen(SSL_CIPHERS_ALWAYS_DISABLED), J2S(value), strlen(J2S(value)));
data/tomcat-native-1.2.25/native/src/sslconf.c:275: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 err[256];
data/tomcat-native-1.2.25/native/src/sslconf.c:307: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:221: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:509: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(buf, SSL_CIPHERS_ALWAYS_DISABLED, strlen(SSL_CIPHERS_ALWAYS_DISABLED));
data/tomcat-native-1.2.25/native/src/sslcontext.c:510: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(buf + strlen(SSL_CIPHERS_ALWAYS_DISABLED), J2S(ciphers), strlen(J2S(ciphers)));
data/tomcat-native-1.2.25/native/src/sslcontext.c:516: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:596: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:684: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:749: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:759: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:767: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:808: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:929: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        buff[PEM_BUFSIZE];
data/tomcat-native-1.2.25/native/src/sslcontext.c:996: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:1138: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:1144: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(key, bufferPtr, lengthOfKey);
data/tomcat-native-1.2.25/native/src/sslcontext.c:1150: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(cert, bufferPtr, lengthOfCert);
data/tomcat-native-1.2.25/native/src/sslcontext.c:1247: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:1253: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(cert, bufferPtr, lengthOfCert);
data/tomcat-native-1.2.25/native/src/sslcontext.c:1290: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 err[256];
data/tomcat-native-1.2.25/native/src/sslcontext.c:1296: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(charCert, bufferPtr, lengthOfCert);
data/tomcat-native-1.2.25/native/src/sslcontext.c:1520: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(p_data, proto_chars, proto_chars_len);
data/tomcat-native-1.2.25/native/src/sslinfo.c:186:21:  [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(result, ASN1_STRING_data(adata), len);
data/tomcat-native-1.2.25/native/src/sslinfo.c:188:21:  [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(result, ASN1_STRING_get0_data(adata), len);
data/tomcat-native-1.2.25/native/src/sslinfo.c:325: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 buf[256];
data/tomcat-native-1.2.25/native/src/sslnetwork.c:129: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 err[256];
data/tomcat-native-1.2.25/native/src/sslnetwork.c:623: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 peekbuf[1];
data/tomcat-native-1.2.25/native/src/sslutils.c:587: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(newp, buf, oldlen);
data/tomcat-native-1.2.25/native/src/sslutils.c:667: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(ocsp_url, asn1, len);
data/tomcat-native-1.2.25/native/src/sslutils.c:737: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(ocsp_urls,os->data, len);
data/tomcat-native-1.2.25/native/src/sslutils.c:827: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[TCN_BUFFER_SZ];
data/tomcat-native-1.2.25/native/src/sslutils.c:856: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 tmpbuf[1024];
data/tomcat-native-1.2.25/native/src/sslutils.c:940: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, tmpbuf[ADDLEN];
data/tomcat-native-1.2.25/native/src/sslutils.c:965: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(buf + totalread, tmpbuf, readlen); /* the copy to the buffer */
data/tomcat-native-1.2.25/native/src/stdlib.c:67: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(dest, s, (size_t)sz);
data/tomcat-native-1.2.25/native/src/stdlib.c:83: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(dest, s, (size_t)sz);
data/tomcat-native-1.2.25/native/include/tcn.h:269:9:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        wcsncpy(w##V, ws##V, wl##V);                        \
data/tomcat-native-1.2.25/native/os/unix/system.c:149:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    len = read(fd, buf, sizeof buf - 1);
data/tomcat-native-1.2.25/native/os/unix/system.c:171:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    len = read(fd, buf, sizeof buf - 1);
data/tomcat-native-1.2.25/native/os/win32/ntpipe.c:325:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(con->name, J2S(name), MAX_PATH);
data/tomcat-native-1.2.25/native/os/win32/registry.c:595:9:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        wcsncpy(p, (*e)->GetStringChars(e, s, 0), l);
data/tomcat-native-1.2.25/native/os/win32/system.c:462:17:  [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 (int)strlen(data->password);
data/tomcat-native-1.2.25/native/src/address.c:119:39:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
TCN_IMPLEMENT_CALL(jboolean, Address, equal)(TCN_STDARGS,
data/tomcat-native-1.2.25/native/src/error.c:60: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).
        char *f = (char *)(file + strlen(file) - 1);
data/tomcat-native-1.2.25/native/src/file.c:247:32:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
TCN_IMPLEMENT_CALL(jint, File, getc)(TCN_STDARGS, jlong file)
data/tomcat-native-1.2.25/native/src/file.c:426:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
TCN_IMPLEMENT_CALL(jint, File, read)(TCN_STDARGS, jlong file,
data/tomcat-native-1.2.25/native/src/info.c:294:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
TCN_IMPLEMENT_CALL(jint, Directory, read)(TCN_STDARGS, jobject finfo,
data/tomcat-native-1.2.25/native/src/ssl.c:1132: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).
                int l = (int)strlen(J2S(o));
data/tomcat-native-1.2.25/native/src/ssl.c:1272:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(tcn_password_callback.password, J2S(password), SSL_MAX_PASSWORD_LEN);
data/tomcat-native-1.2.25/native/src/sslconf.c:250: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(J2S(value)) + strlen(SSL_CIPHERS_ALWAYS_DISABLED) + 1;
data/tomcat-native-1.2.25/native/src/sslconf.c:250: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).
        len = strlen(J2S(value)) + strlen(SSL_CIPHERS_ALWAYS_DISABLED) + 1;
data/tomcat-native-1.2.25/native/src/sslconf.c:256:50:  [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).
        memcpy(buf, SSL_CIPHERS_ALWAYS_DISABLED, strlen(SSL_CIPHERS_ALWAYS_DISABLED));
data/tomcat-native-1.2.25/native/src/sslconf.c:257: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).
        memcpy(buf + strlen(SSL_CIPHERS_ALWAYS_DISABLED), J2S(value), strlen(J2S(value)));
data/tomcat-native-1.2.25/native/src/sslconf.c:257: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).
        memcpy(buf + strlen(SSL_CIPHERS_ALWAYS_DISABLED), J2S(value), strlen(J2S(value)));
data/tomcat-native-1.2.25/native/src/sslcontext.c:410: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).
                   (unsigned long)strlen(J2S(id)),
data/tomcat-native-1.2.25/native/src/sslcontext.c:505: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(J2S(ciphers)) + strlen(SSL_CIPHERS_ALWAYS_DISABLED) + 1;
data/tomcat-native-1.2.25/native/src/sslcontext.c:505: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).
    len = strlen(J2S(ciphers)) + strlen(SSL_CIPHERS_ALWAYS_DISABLED) + 1;
data/tomcat-native-1.2.25/native/src/sslcontext.c:509:46:  [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).
    memcpy(buf, SSL_CIPHERS_ALWAYS_DISABLED, strlen(SSL_CIPHERS_ALWAYS_DISABLED));
data/tomcat-native-1.2.25/native/src/sslcontext.c:510: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).
    memcpy(buf + strlen(SSL_CIPHERS_ALWAYS_DISABLED), J2S(ciphers), strlen(J2S(ciphers)));
data/tomcat-native-1.2.25/native/src/sslcontext.c:510:69:  [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).
    memcpy(buf + strlen(SSL_CIPHERS_ALWAYS_DISABLED), J2S(ciphers), strlen(J2S(ciphers)));
data/tomcat-native-1.2.25/native/src/sslcontext.c:1015:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(c->cb_data->password, J2S(password), SSL_MAX_PASSWORD_LEN - 1);
data/tomcat-native-1.2.25/native/src/sslcontext.c:1429: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((const char*)*out);
data/tomcat-native-1.2.25/native/src/sslcontext.c:1501: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).
         proto_chars_len = strlen(proto_chars);
data/tomcat-native-1.2.25/native/src/sslutils.c:140:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(data->password, J2S(o), SSL_MAX_PASSWORD_LEN);
data/tomcat-native-1.2.25/native/src/sslutils.c:142:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                rv = (int)strlen(data->password);
data/tomcat-native-1.2.25/native/src/sslutils.c:154: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).
        rv = (int)strlen(data->password);
data/tomcat-native-1.2.25/native/src/sslutils.c:187:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, cb_data->password, bufsiz);
data/tomcat-native-1.2.25/native/src/sslutils.c:189: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).
        return (int)strlen(buf);
data/tomcat-native-1.2.25/native/src/sslutils.c:193:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, cb_data->password, bufsiz);
data/tomcat-native-1.2.25/native/src/sslutils.c:196:17:  [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 (int)strlen(buf);
data/tomcat-native-1.2.25/native/src/sslutils.c:907: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).
        for(r = q + strlen(q) - 1; apr_isspace(*r); r--) *r = 0;

ANALYSIS SUMMARY:

Hits = 140
Lines analyzed = 16883 in approximately 0.41 seconds (40734 lines/second)
Physical Source Lines of Code (SLOC) = 13282
Hits@level = [0]  79 [1]  35 [2]  82 [3]   6 [4]  16 [5]   1
Hits@level+ = [0+] 219 [1+] 140 [2+] 105 [3+]  23 [4+]  17 [5+]   1
Hits/KSLOC@level+ = [0+] 16.4885 [1+] 10.5406 [2+] 7.90544 [3+] 1.73167 [4+] 1.27993 [5+] 0.0752899
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.