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/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/GC.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/common_functions.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Stacks.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/org_graalvm_visualvm_lib_jfluid_server_system_HeapDump.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/org_graalvm_visualvm_lib_jfluid_server_system_Classes_RedefineException.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/class_file_cache.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/org_graalvm_visualvm_lib_jfluid_server_system_Timers.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/org_graalvm_visualvm_lib_jfluid_server_system_Stacks.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/org_graalvm_visualvm_lib_jfluid_server_system_GC.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Threads.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/windows/version.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/org_graalvm_visualvm_lib_jfluid_server_system_Classes.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/common_functions.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Timers.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Threads.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/HeapDump.c Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/org_graalvm_visualvm_lib_jfluid_server_system_Threads.h Examining data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Classes.c Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.h Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.h Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/nbexecloader.h Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/argnames.h Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/jvmfinder.h Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/cmdargs.h Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/jvmfinder.cpp Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/version.h Examining data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvm.cpp FINAL RESULTS: data/visualvm-2.0.4/visualvm/launcher/windows-src/cmdargs.h:59: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(args[used++], arg); data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:222:5: [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, 4096, format, args); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c:107: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(jfluid_added_boot_path, _jfluid_dir); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c:108: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(jfluid_added_boot_path + path_len, jfluid_boot_class_subpaths[i]); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/class_file_cache.c:211: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(_ctable_classnames[pos], name); data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/nbexecloader.h:51:20: [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. hLib = LoadLibrary(path); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:367:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *userProfile = getenv(ENV_USER_PROFILE); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:394:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *userProfile = getenv(ENV_USER_PROFILE); data/visualvm-2.0.4/visualvm/launcher/windows-src/cmdargs.h:52: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(newArgs, args, size * sizeof (char*)); data/visualvm-2.0.4/visualvm/launcher/windows-src/cmdargs.h:63: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 arg[1024] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:77: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 val[4096] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:143:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[MAX_PATH] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:155: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 dir[MAX_PATH] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:221: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[4096] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:225: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 sysErr[512] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:231:22: [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(gLogFileName.c_str(), "a"); data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:368:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *console = fopen("CON", "a"); data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:446:9: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if (MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, ansi, -1, tmp, len) == 0) data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:146:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[16] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:153: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 olddir[MAX_PATH]; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:171:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[MAX_PATH] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:238: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 oldCurDir[MAX_PATH]; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:243: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 clusterPath[MAX_PATH + 1] = {0}; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:274:18: [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(clusterFile.c_str(), "r"); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:280: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 line[4096] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:334:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[MAX_PATH + 1] = {0}; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:346:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[MAX_PATH + 1] = {0}; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:371:17: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR userHomeChar[MAX_PATH]; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:398:17: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR userHomeChar[MAX_PATH]; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:418:5: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR defUserDirRootChar[MAX_PATH]; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:429:5: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR defCacheDirRootChar[MAX_PATH]; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:457:18: [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(path, "r"); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:463: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 line[4096] = ""; data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:541:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[32]; data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Classes.c:292: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((jbyte*) classDef->class_bytes, tmpClassBytes, classBytesLen); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Stacks.c:220: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(byteData, oldByteData, dataOfs); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Timers.c:141: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 procname[1024]; data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Timers.c:143:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(procname, "/proc/%d/ctl", getpid()); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Timers.c:144: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). ctlfd = open(procname, O_WRONLY); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c:76: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 *jfluid_boot_class_subpaths[2]; data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c:91:21: [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). _time_out = atoi(timeout_str+1); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/class_file_cache.c:218: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(_ctable_classdata[pos], class_data, class_data_len); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/class_file_cache.c:261: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(*class_data, _ctable_classdata[pos], len); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/class_file_cache.c:321: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(*new_class_data,BOGUS_CLASSFILE,sizeof(BOGUS_CLASSFILE)); data/visualvm-2.0.4/visualvm/launcher/windows-src/cmdargs.h:58: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). args[used] = new char[strlen(arg) + 1]; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:158:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dir, path, sep - path); data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:186:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = str + strlen(str) - 1; data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:227:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(msg, sysErr, 4096 - strlen(msg)); data/visualvm-2.0.4/visualvm/launcher/windows-src/o.n.bootstrap/utilsfuncs.cpp:227:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncat(msg, sysErr, 4096 - strlen(msg)); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:244:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(clusterPath, cluster, MAX_PATH); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:298:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(dir, "platform", strlen("platform")) == 0) { data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:335:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, argv[++i], MAX_PATH); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:347:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, argv[++i], MAX_PATH); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:365: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). if (strncmp(str, HOME_TOKEN, strlen(HOME_TOKEN)) == 0) { data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:380:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). userDir = userHome + (str + strlen(HOME_TOKEN)); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:381:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strncmp(str, DEFAULT_USERDIR_ROOT_TOKEN, strlen(DEFAULT_USERDIR_ROOT_TOKEN)) == 0) { data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:382:52: [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). userDir = getDefaultUserDirRoot() + (str + strlen(DEFAULT_USERDIR_ROOT_TOKEN)); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:392: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). if (strncmp(str, HOME_TOKEN, strlen(HOME_TOKEN)) == 0) { data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:407:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cacheDir = userHome + (str + strlen(HOME_TOKEN)); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:408:58: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strncmp(str, DEFAULT_CACHEDIR_ROOT_TOKEN, strlen(DEFAULT_CACHEDIR_ROOT_TOKEN)) == 0) { data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:409:54: [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). cacheDir = getDefaultCacheDirRoot() + (str + strlen(DEFAULT_CACHEDIR_ROOT_TOKEN)); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:440: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). if (strncmp(str, opt, strlen(opt)) == 0) { data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:441: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). str += strlen(opt); data/visualvm-2.0.4/visualvm/launcher/windows-src/visualvmlauncher.cpp:477:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(str); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Classes.c:171: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). class_sig[strlen(class_sig) - 1] = 0; data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Stacks.c:211: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). int len = strlen(s); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Stacks.c:225:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char*)(byteData + dataOfs), s, len); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/Stacks.c:313: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(className); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c:90:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(timeout_str) > 1) { data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c:99:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(_jfluid_dir, options, path_len); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/attach.c:106:60: [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). jfluid_added_boot_path = (char*) malloc(path_len + strlen(jfluid_boot_class_subpaths[i]) + 1); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/class_file_cache.c:135: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). int len = strlen(name); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/class_file_cache.c:210:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). _ctable_classnames[pos] = malloc(strlen(name) + 1); data/visualvm-2.0.4/visualvm/libs.profiler/lib.profiler/native/src-jdk15/common_functions.c:163:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (options != NULL && strlen(options) > 0) { /* The spec says no options means options == "", but in reality it's NULL */ ANALYSIS SUMMARY: Hits = 74 Lines analyzed = 5492 in approximately 0.51 seconds (10753 lines/second) Physical Source Lines of Code (SLOC) = 3163 Hits@level = [0] 56 [1] 30 [2] 36 [3] 3 [4] 5 [5] 0 Hits@level+ = [0+] 130 [1+] 74 [2+] 44 [3+] 8 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 41.1002 [1+] 23.3955 [2+] 13.9108 [3+] 2.52924 [4+] 1.58078 [5+] 0 Dot directories skipped = 5 (--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.