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/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar_fileinfo.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar_format.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar_log.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar_ptql.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/vmware/javavmware.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/vmware/vmcontrol_wrapper.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/vmware/vmcontrol_wrapper.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/pdh.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/util.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/win32bindings.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/php/php_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/php/php_sigar.h Examining data/hyperic-sigar-1.6.4+dfsg/bindings/python/_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/bindings/ruby/rbsigar.c Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar.h Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar_fileinfo.h Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar_format.h Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar_getline.h Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar_log.h Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar_ptql.h Examining data/hyperic-sigar-1.6.4+dfsg/include/sigar_util.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/aix/sigar_os.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/sigar_os.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/hpux/hpux_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/hpux/sigar_os.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/linux/sigar_os.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/kstats.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/procfs.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/sigar_os.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/win32/peb.c Examining data/hyperic-sigar-1.6.4+dfsg/src/os/win32/sigar_os.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/win32/sigar_pdh.h Examining data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar_cache.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar_signal.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c Examining data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c FINAL RESULTS: data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:762:20: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. sigar_uint64_t readlink; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:794:20: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. sigar_uint64_t readlink; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:762:20: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. sigar_uint64_t readlink; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:794:20: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. sigar_uint64_t readlink; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:971:16: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((len = readlink(buffer, procexe->cwd, data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1702:40: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. nfs->readlink = proto.u.nfsv2.type.readlink; \ data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1756:40: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. nfs->readlink = proto.u.nfsv3.type.readlink; \ data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1953:16: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((len = readlink(name, procexe->name, data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:970:16: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((len = readlink(name, procexe->cwd, data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:980:16: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((len = readlink(name, procexe->name, data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:990:16: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((len = readlink(name, procexe->root, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:599:16: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. if ((len = readlink(name, buffer, size-1)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1514:23: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. int len = readlink(fsp->dev_name, device, sizeof(device)-1); data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:793:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. sigar_uint64_t access; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:1512: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(buffer, line); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:78:5: [4] (buffer) wcscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. wcscpy(buf, REG_MSGFILE_ROOT); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:79:5: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(buf, app); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:81:5: [4] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). wcscat(buf, source); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/pdh.c:146:9: [4] (buffer) lstrcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. lstrcpy(counter_sec, counter_path); data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:793:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. sigar_uint64_t access; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1755:38: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. nfs->access = proto.u.nfsv3.type.access; \ data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1182:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(stat, sizeof(stat), data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1701:15: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. num = sscanf(buffer, ROUTE_FMT, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:75:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, "close_mib2: %s", strerror(errno)); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:154:20: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:171:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, "get_mib2: getmsg(reply): %s", data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:245:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, "get_mib2: getmsg(data): %s", data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:250:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:288:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, "open_mib2: %s: %s", GET_MIB2_ARPDEV, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:293:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, "open_mib2: push %s: %s", data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:298:16: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. (void) sprintf(mib2->errmsg, "open_mib2: push %s: %s", data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/sigar_os.h:144:18: [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. kstat_t *system; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/sigar_os.h:150:13: [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. int system[KSTAT_SYSTEM_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/sigar_os.h:198:34: [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. #define kSYSTEM(v) kSTAT_ui32(v, system) data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/sigar_os.h:209:37: [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. sigar_koffsets_init(sigar, ksp, system) data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:117:21: [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. sigar->koffsets.system[0] = -1; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:127:26: [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 ((ksp = sigar->ks.system) && data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:566:27: [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 (!(ksp = sigar->ks.system)) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:866:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buffer, sizeof(buffer), data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:869:20: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!(fp = popen(buffer, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1118:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(exe, procexe->name); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1119:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(exe, X_OK) == 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2690:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(name, NETIF_LA "%d", la++); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3247:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(key_name, "%s\\Volatile Environment", username); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3578:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sysinfo->description, "%s %s", data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3786:17: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "\\StringFileInfo\\%04x%04x\\%s", data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:486: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(fsp->type_name, fstype_names[fsp->type]); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1021:14: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. static char *getpass(const char *prompt) data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2211:12: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. # define getpass termios_getpass data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2213:12: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. # define getpass getpassphrase data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2280:15: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. buf = getpass(tty ? "" : prompt); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:204:9: [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. #define vsnprintf _vsnprintf data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:212: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(sigar->errbuf, sizeof(sigar->errbuf), format, args); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:276:19: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. offset += sprintf(ptr + offset, "%d day%s, ", data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:555:13: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(ptr, "%s%d/%s", name, &port, proto) != 3) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:894:18: [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(gl_buf, hist_next()); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:902:18: [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(gl_buf, hist_prev()); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:937:28: [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(gl_buf, hist_prev()); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:943:28: [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(gl_buf, hist_next()); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1149: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(gl_killbuf, gl_buf + gl_pos); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1215: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(last_prompt, prompt); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1222: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(last_prompt, prompt); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1370:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(gl_histfile, "%s", file); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1509:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s, p); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1569: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(gl_buf, hist_buf[hist_pos]); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1616:16: [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(gl_buf, p); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1649:16: [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(gl_buf, p); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:567:9: [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. #define vsnprintf _vsnprintf data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:579:9: [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(error->message, sizeof(error->message), format, args); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:720:16: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!(fp = popen(buffer, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:366:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(dev_name, sizeof(dev_name), data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:695: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(info->model, ptr); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:854:9: [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. #define vsnprintf _vsnprintf data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:996: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(buffer, sizeof(buffer), format, args); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:90: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. getenv("DMALLOC_OPTIONS"); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:1205: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("NO_NATIVE_GETPASS")) { data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/vmware/javavmware.c:113:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib = getenv("VMCONTROL_SHLIB"); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/vmware/vmcontrol_wrapper.c:33:23: [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. #define DL_LOAD(lib) LoadLibrary(lib) data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/vmware/vmcontrol_wrapper.c:132:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. int dl_debug = getenv("VMCONTROL_DEBUG") != NULL; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:137:16: [3] (misc) LoadLibraryEx: 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 = LoadLibraryEx(ptr, NULL, data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h:313:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *value = getenv(procenv->key); \ data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:204:26: [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. (*sigar)->proc_net = getenv("SIGAR_PROC_NET"); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:213:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. has_nptl = getenv("SIGAR_HAS_NPTL") ? 1 : 0; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2511:32: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *release_file = getenv("SIGAR_OS_RELEASE_FILE"); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2512:32: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *vendor_name = getenv("SIGAR_OS_VENDOR_NAME"); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:84: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. if ((ptr = getenv("SIGAR_USE_UCB_PS"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1104:18: [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 *path = getenv("PATH"); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:408:22: [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. module->handle = LoadLibrary(module->name); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:46:36: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. (*sigar)->cpu_list_cores = getenv("SIGAR_CPU_LIST_SOCKETS") ? 0 : 1; data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:535:18: [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 (!(file = getenv("SIGAR_NET_SERVICES_FILE"))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1426:19: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). tmpnam(tname); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:1575: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. if ((ptr = getenv(parsed->value+1))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:892:27: [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 *self_path = getenv("SIGAR_PATH"); data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:186: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 vendor[128]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:187: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 model[128]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:300:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char user[SIGAR_CRED_NAME_MAX]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:301: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 group[SIGAR_CRED_NAME_MAX]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:342: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[SIGAR_PROC_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:394: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[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:395:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cwd[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:396: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 root[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:436: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_name[SIGAR_FS_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:437: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 dev_name[SIGAR_FS_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:438: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 type_name[SIGAR_FS_INFO_LEN]; /* e.g. "local" */ data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:439: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 sys_type_name[SIGAR_FS_INFO_LEN]; /* e.g. "ext3" */ data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:440: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 options[SIGAR_FS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:517: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 mac[8]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:527: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 default_gateway[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:528: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 host_name[SIGAR_MAXHOSTNAMELEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:529: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 domain_name[SIGAR_MAXDOMAINNAMELEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:530: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 primary_dns[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:531: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 secondary_dns[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:554: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 ifname[16]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:589: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[16]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:590: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 type[64]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:591: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 description[256]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:830: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 user[32]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:831: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 device[32]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:832: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 host[256]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:868: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[SIGAR_SYS_INFO_LEN]; /* canonicalized sysname */ data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:869: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 version[SIGAR_SYS_INFO_LEN]; /* utsname.release */ data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:870: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 arch[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:871: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 machine[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:872: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 description[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:873: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 patch_level[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:874: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 vendor[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:875: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 vendor_version[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:876: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 vendor_name[SIGAR_SYS_INFO_LEN]; /* utsname.sysname */ data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:877: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 vendor_code_name[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar_ptql.h:27: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 message[SIGAR_PTQL_ERRMSG_SIZE]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:268: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[56]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:294:27: [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). JNIEXPORT void SIGAR_JNIx(open) data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:390: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 addr_str[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:895:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:993: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(&tcp_states[0], &netstat.tcp_states[0], data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:1111: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 str[24]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:1222: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 fqdn[SIGAR_FQDN_LEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/javasigar.c:1664: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 exe[MAX_PATH]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:200: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 buf[MAX_ERROR_LENGTH]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:203:9: [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(buf, "Unable to open event log: %d", lastError); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:280: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 buf[MAX_ERROR_LENGTH]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:285:13: [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(buf, "Buffer size (%d) too small (%d needed)", data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:289:13: [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(buf, "Error reading from the event log: %d", lastError); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:397: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 buf[MAX_ERROR_LENGTH]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:398:9: [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(buf, "Error registering for event log to change: %d", data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:406: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 buf[MAX_ERROR_LENGTH]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:407:9: [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(buf, "Error waiting for event log change: %d", data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/pdh.c:145:9: [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 counter_sec[MAX_PATH]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/pdh.c:147:9: [2] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant string. lstrcat(counter_sec, _T("/sec")); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/pdh.c:506: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 path[MAX_PATH + 1]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/util.c:48:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[8192]; data/hyperic-sigar-1.6.4+dfsg/bindings/php/php_sigar.c:32: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 addr_str[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/python/_sigar.c:72: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 addr_str[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/python/_sigar.c:142: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(ent, data, size); data/hyperic-sigar-1.6.4+dfsg/bindings/python/_sigar.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 buffer[56]; data/hyperic-sigar-1.6.4+dfsg/bindings/ruby/rbsigar.c:52:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[56]; data/hyperic-sigar-1.6.4+dfsg/bindings/ruby/rbsigar.c:58: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[1024]; data/hyperic-sigar-1.6.4+dfsg/bindings/ruby/rbsigar.c:74:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr_str[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/bindings/ruby/rbsigar.c:90: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(ent, data, size); data/hyperic-sigar-1.6.4+dfsg/bindings/ruby/rbsigar.c:155: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(RSTRING(bytes)->ptr, &address->addr.in6, len); data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:186: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 vendor[128]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:187: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 model[128]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:300:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char user[SIGAR_CRED_NAME_MAX]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:301: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 group[SIGAR_CRED_NAME_MAX]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:342: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[SIGAR_PROC_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:394: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[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:395:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cwd[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:396: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 root[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:436: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_name[SIGAR_FS_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:437: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 dev_name[SIGAR_FS_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:438: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 type_name[SIGAR_FS_INFO_LEN]; /* e.g. "local" */ data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:439: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 sys_type_name[SIGAR_FS_INFO_LEN]; /* e.g. "ext3" */ data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:440: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 options[SIGAR_FS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:517: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 mac[8]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:527: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 default_gateway[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:528: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 host_name[SIGAR_MAXHOSTNAMELEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:529: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 domain_name[SIGAR_MAXDOMAINNAMELEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:530: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 primary_dns[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:531: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 secondary_dns[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:554: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 ifname[16]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:589: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[16]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:590: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 type[64]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:591: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 description[256]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:830: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 user[32]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:831: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 device[32]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:832: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 host[256]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:868: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[SIGAR_SYS_INFO_LEN]; /* canonicalized sysname */ data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:869: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 version[SIGAR_SYS_INFO_LEN]; /* utsname.release */ data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:870: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 arch[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:871: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 machine[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:872: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 description[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:873: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 patch_level[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:874: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 vendor[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:875: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 vendor_version[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:876: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 vendor_name[SIGAR_SYS_INFO_LEN]; /* utsname.sysname */ data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:877: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 vendor_code_name[SIGAR_SYS_INFO_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h:60:4: [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 errbuf[256]; \ data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h:279: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(&((a).addr.in6), val, sizeof((a).addr.in6)); \ data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h:285: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(&((a).addr.mac), val, len); \ data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h:353: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[SIGAR_HOSTENT_LEN]; data/hyperic-sigar-1.6.4+dfsg/include/sigar_ptql.h:27: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 message[SIGAR_PTQL_ERRMSG_SIZE]; data/hyperic-sigar-1.6.4+dfsg/include/sigar_util.h:135: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[256]; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:160: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). kmem = open("/dev/kmem", O_RDONLY); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:194:29: [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). (*sigar)->aix_version = atoi(name.version); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:292: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[512]; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:310:16: [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). if (!(fp = fopen(SWAPSPACES, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:341: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(swaps->devs[swaps->num], ptr, len); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:562:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(UTMP_FILE, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:611:16: [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). if (!(fp = fopen(UTMP_FILE, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:843: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[8192], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:861: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(arg, ptr, alen); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:875: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[8192], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:891: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 key[128]; /* XXX is there a max key size? */ data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:955: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[8192]; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1169: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(ptr, hostname, hostname_len); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1174: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(ptr, devname, devname_len); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1197: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[IDENTIFIER_LENGTH]; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1226: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 query[256]; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/sigar_os.h:60: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 model[128]; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:593: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 swapfile[SSTRLEN(VM_DIR) + SSTRLEN("/") + SSTRLEN(SWAPFILE) + 12]; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:620: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(ptr, VM_DIR, SSTRLEN(VM_DIR)); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:625: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(ptr, ent->d_name, ent->d_namlen+1); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1576: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(exe, kargs->ptr, len+1); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1660: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(arg, ptr, slen); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1671: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[SIGAR_ARG_MAX+1], *ptr=buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1697: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(arg, ptr, alen); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1709: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[SIGAR_ARG_MAX+1], **ptr=(char **)buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1728: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(arg, *ptr, alen); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1766: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 key[256]; /* XXX is there a max key size? */ data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1818: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 key[128]; /* XXX is there a max key size? */ data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1933: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(procexe->cwd, ptr+4, len-3); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1946: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[1024]; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2207: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 dname[256], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2322: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 model[128], vendor[128], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2359:13: [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(model, "powerpc"); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2361:13: [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(model, "Unknown"); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2638: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(name, sdl->sdl_data, sdl->sdl_nlen); data/hyperic-sigar-1.6.4+dfsg/src/os/hpux/hpux_sigar.c:393:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; /* kernel limit */ data/hyperic-sigar-1.6.4+dfsg/src/os/hpux/hpux_sigar.c:885: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(mib, &stat->if_entry, sizeof(*mib)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:101: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[BUFSIZ], *ptr=buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:132: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:135:16: [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). if (!(fp = fopen(PROC_STAT, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:208:18: [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). kernel_rev = atoi(&name.release[2]); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:241: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:263:16: [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). if (!(fp = fopen(PROC_MTRR, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:281:18: [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). total += atoi(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:330: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:361: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:432: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:448: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[BUFSIZ], cpu_total[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:452:16: [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). if (!(fp = fopen(PROC_STAT, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:497: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[BUFSIZ], *ptr = buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:512: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[BUFSIZ], *ptr = buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:542: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[BUFSIZ], *ptr=buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:546: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(ptr, PROCP_FS_ROOT, SSTRLEN(PROCP_FS_ROOT)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:549: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(ptr, pidstr, len); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:552: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(ptr, PROC_PSTAT, SSTRLEN(PROC_PSTAT)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:557:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:651: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[BUFSIZ], *ptr=buffer, *tmp; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:690: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(pstat->name, ptr, len); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:753: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[BUFSIZ], *ptr=buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:780: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:835: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:898: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[ARG_MAX]; /* XXX: ARG_MAX == 130k */ data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:899: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:908:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(name, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:926: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 key[128]; /* XXX is there a max key size? */ data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:966: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1005: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1010:16: [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). if (!(fp = fopen(buffer, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1125: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[1025]; /* buffer for strings within ent */ data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1161: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 stat[1025], dev[1025]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1210: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[1025]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1232:16: [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). if (!(fp = fopen(PROC_DISKSTATS, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1299: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(device_usage, disk, sizeof(*device_usage)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1315: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[1025]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1334:16: [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). if (!(fp = fopen(PROC_PARTITIONS, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1509: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1556:29: [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). info->mhz = atoi(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1571:29: [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). info->mhz = atoi(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1596: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 max_freq[PATH_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1605:25: [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). cpu_info->mhz = atoi(max_freq) / 1000; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1615:16: [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). if (!(fp = fopen(PROC_FS_ROOT "cpuinfo", "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1680: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[1024]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1681: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 net_addr[128], gate_addr[128], mask_addr[128]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1687:16: [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). if (!(fp = fopen(PROC_FS_ROOT "net/route", "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1728: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1729:16: [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 *fp = fopen(PROC_FS_ROOT "net/dev", "r"); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1819: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(&getter->connlist->data[getter->connlist->number++], data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1826: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(getter->conn, conn, sizeof(*conn)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1844: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[8192]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1854:19: [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). if ((fp = fopen(buffer, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1868:23: [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). if (!(fp || (fp = fopen(fname, "r")))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2077: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[1024], *ptr=buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2080:16: [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). if (!(fp = fopen(PROC_FS_ROOT "net/snmp", "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2119:16: [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 *fp = fopen(file, "r"); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2139: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[BUFSIZ], *ptr=buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2188: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[BUFSIZ], *ptr=buffer; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2269: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 fd_name[BUFSIZ], pid_name[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2281: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(&pid_name[0], PROCP_FS_ROOT, SSTRLEN(PROCP_FS_ROOT)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2286: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(&pid_name[len], ent->d_name, slen); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2298: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(&fd_name[0], pid_name, len); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2299: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(&fd_name[len], "/fd", 3); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2307: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 fd_ent_name[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2319: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(&fd_ent_name[0], fd_name, len); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2321: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(&fd_ent_name[len+1], fd_ent->d_name, slen); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2368: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(info->vendor_version, line, len);/*XXX*/ data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2385: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(info->vendor_code_name, start, len);/*XXX*/ data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2420: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 key[256], *ix; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2513: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[8192], *data; data/hyperic-sigar-1.6.4+dfsg/src/os/linux/sigar_os.h: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 name[SIGAR_PROC_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:71:16: [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. (void) strcpy(mib2->errmsg, "close_mib2: socket not open"); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:196:16: [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. (void) sprintf(mib2->errmsg, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:211:16: [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. (void) sprintf(mib2->errmsg, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:231:20: [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. (void) sprintf(mib2->errmsg, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:281:16: [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. (void) strcpy(mib2->errmsg, "open_mib2: MIB2 access already open"); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:287:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((mib2->sd = open(GET_MIB2_ARPDEV, O_RDWR, 0600)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.c:313:16: [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. (void) strcpy(mib2->errmsg, data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/get_mib2.h:100: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 errmsg[GET_MIB2_ERRMSGL]; /* error message buffer */ data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/procfs.c:28:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/procfs.c:46:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/procfs.c:62: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/procfs.c:66:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/procfs.c:82: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/procfs.c:86:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:78:34: [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). sigar->solaris_version = atoi(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:252:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX+1]; /* {un,re}used */ data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:495: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(&cpuinfo[0], buf, sizeof(cpuinfo)); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:834: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[9086], *args=NULL, *arg; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:886: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(pargs->args, args, len); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:909: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[9086]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:910: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 *argvb[56]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:944:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:981: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(arg, buffer, alen); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1001: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[BUFSIZ], *offsets[512]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1012:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1026: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 key[128]; /* XXX is there a max key size? */ data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1075: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1105: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 exe[PATH_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1133: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1196: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1235: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1239:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1361:16: [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 *fp = fopen(MNTTAB, "r"); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1391: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 device[PATH_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1392: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[8]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1397: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[256]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1406: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1409:16: [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 *fp = fopen("/etc/path_to_inst", "r"); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1469:27: [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). paths->instance = atoi(inst); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1513: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 device[PATH_MAX+1], *ptr=device; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:2473: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 pname[PATH_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:2477: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(pname, "/proc/%d/fd", (int)pid); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:2489:14: [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). fd = atoi(ent->d_name); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/peb.c:133: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 arg[SIGAR_CMDLINE_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/sigar_os.h:51:18: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). (lpw[0] = 0, MultiByteToWideChar(CP_ACP, 0, \ data/hyperic-sigar-1.6.4+dfsg/src/os/win32/sigar_os.h:315: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[SIGAR_PROC_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:376: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(&(sigar->##name), &sigar_##name, sizeof(sigar_##name)) data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1202: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 domain[SIGAR_CRED_NAME_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1457: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 cmdline[SIGAR_CMDLINE_MAX], *ptr = cmdline, *arg; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1495: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 key[128]; /* XXX is there a max key size? */ data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1585: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 value[32767]; /* max size from msdn docs */ data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1705: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 name[MAX_PATH]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1803: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[256]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1819: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 fsname[1024]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1865: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 drive[3] = {'\0', ':', '\0'}; /* e.g. "X:" w/o trailing "\" */ data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1985: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 drive[MAX_PATH]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2060: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 id[MAX_PATH + 1]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2147: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(&cpu_infos->data[cpu_infos->number++], data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2261: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(entry->value, info, sizeof(*info)); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2410: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(entry->value, row, sizeof(*row)); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2683: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 name[16]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2693:13: [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(name, "lo%d", lo++); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2698:13: [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(name, "eth%d", eth++); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:2713: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(entry->value, ifr, sizeof(*ifr)); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3241: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 key_name[MAX_PATH]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3242: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 value[256]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3302: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 subkey[MAX_PATH]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3303: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 username[SIGAR_CRED_NAME_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3304: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 domain[SIGAR_CRED_NAME_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3429:13: [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(who->host, "%u.%u.%u.%u", data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3571: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(sysinfo->version, "%d.%d", data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3781: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 buf[1024]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:138: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(proccpu, prev, sizeof(*proccpu)); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:152: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(prev, proccpu, sizeof(*prev)); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:714: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(&connlist->data[connlist->number++], data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:760: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(entry->value, &conn->local_address, data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:784: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(address, value, sizeof(*address)); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:929: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 name[SIGAR_FQDN_LEN]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1013: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 ut_line[UT_LINESIZE]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1014: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 ut_id[UT_IDLEN]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1016: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 ut_user[UT_NAMESIZE]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1017: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 ut_host[UT_HOSTSIZE]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1023:12: [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 password[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1053: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 ut_user[_UTX_USERSIZE]; /* login name */ data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1054: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 ut_id[_UTX_IDSIZE]; /* id */ data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1055: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 ut_line[_UTX_LINESIZE]; /* tty name */ data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1059: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 ut_host[_UTX_HOSTSIZE]; /* host name */ data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1082:16: [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). if (!(fp = fopen(SIGAR_UTMPX_FILE, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1125:16: [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). if (!(fp = fopen(SIGAR_UTMP_FILE, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1264: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[BUFSIZ], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1269:15: [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). if ((fp = fopen("/etc/resolv.conf", "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1683: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1684:16: [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 *fp = fopen("/proc/net/dev", "r"); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1835: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(&possible_config, ifconfig, sizeof(*ifconfig)); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1854: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(ifconfig, &possible_config, sizeof(*ifconfig)); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1959: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 domain[SIGAR_FQDN_LEN + 1]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2036: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 addr[SIGAR_INET6_ADDRSTRLEN]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2136:12: [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 password[MAX_STRING_LEN]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2220:12: [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 password[MAX_STRING_LEN]; data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2276:16: [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). if ((tty = fopen("/dev/tty", "w"))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:473: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[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:709: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[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:49: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[R_SIZE_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.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 buffer[R_SIZE_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:96:9: [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(buf, "%d", gid); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:110: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[R_SIZE_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:230:9: [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(buf, "%3d ", (int) size); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:248:13: [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(buf, "%d.%d%c", (int) size, remain, *o); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:256:9: [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(buf, "%3d%c", (int) size, *o); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:286:19: [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. offset += sprintf(ptr + offset, "%2d:%02d", data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:290:19: [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. offset += sprintf(ptr + offset, "%d min", minutes); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:330: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(buff, "%02X:%02X:%02X:%02X:%02X:%02X", data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:483:9: [2] (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 string. strcat(buf, "[NO FLAGS] "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:486:9: [2] (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 string. strcat(buf, "UP "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:489:9: [2] (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 string. strcat(buf, "BROADCAST "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:492:9: [2] (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 string. strcat(buf, "DEBUG "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:495:9: [2] (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 string. strcat(buf, "LOOPBACK "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:498:9: [2] (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 string. strcat(buf, "POINTOPOINT "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:501:9: [2] (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 string. strcat(buf, "NOTRAILERS "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:504:9: [2] (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 string. strcat(buf, "RUNNING "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:507:9: [2] (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 string. strcat(buf, "NOARP "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:510:9: [2] (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 string. strcat(buf, "PROMISC "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:513:9: [2] (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 string. strcat(buf, "ALLMULTI "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:516:9: [2] (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 string. strcat(buf, "MULTICAST "); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:531: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[8192], *ptr; data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:539:16: [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). if (!(fp = fopen(file, "r"))) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:545: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 name[256], proto[56]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:271: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 gl_buf[BUF_SIZE]; /* input buffer */ data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:272: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 gl_killbuf[BUF_SIZE]=""; /* killed text */ data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:281: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 gl_histfile[256]; /* name of history file */ data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:760: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. static char lenv[32], cenv[32]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:769:7: [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(lenv, "LINES=%d", wins.ws_row); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:771:7: [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(cenv, "COLUMNS=%d", wins.ws_col); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1200:12: [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 last_prompt[BUF_SIZE] = ""; data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1333: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 *hist_buf[HIST_SIZE]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1360:4: [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[256]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1372:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(gl_histfile, "r"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1379:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(gl_histfile, "w"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1412: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). fp = fopen(gl_histfile, "a+"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1422:19: [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 tname[L_tmpnam]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1423:19: [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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1425:24: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(gl_histfile, "r"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1427: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). ftmp = fopen(tname, "w"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1443: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). fp = fopen(gl_histfile, "w"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1444: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). ftmp = fopen(tname, "r"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1519: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 search_prompt[101]; /* prompt includes search string */ data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1520: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 search_string[100]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:160: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 chr[4]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.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 buffer[QUERY_SC_SIZE]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:828: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 exe[SIGAR_CMDLINE_MAX]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:984: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 *ptr, buffer[SIGAR_PATH_MAX+1]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:1561:34: [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). branch->value.ui32 = atoi(parsed->value+1) - 1; data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:87: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(res, *line, len); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:110: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 pid_buf[UITOA_BUFFER_SIZE]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:116: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(ptr, PROCP_FS_ROOT, SSTRLEN(PROCP_FS_ROOT)); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:119: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(ptr, pid_str, len); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:122: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(ptr, fname, fname_len); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:199: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[BUFSIZ]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:232: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[9086], *buf=NULL, *ptr; data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:237:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(buffer, O_RDONLY)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:255: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+total, buffer, len); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:275: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(arg, ptr, alen); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:359: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 dev_name[SIGAR_FS_NAME_LEN]; data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:534: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(id, &info[0], sizeof(info)); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:662: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 model[128], *ptr=model, *end; data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:690: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(info->model, cpu_model->rname, cpu_model->rlen); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:770: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(&addr->sin_addr, hp->h_addr, hp->h_length); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:835:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(fname, O_RDONLY); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:985: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[8192]; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:763:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sigar_uint64_t read; data/hyperic-sigar-1.6.4+dfsg/bindings/java/sigar-bin/include/sigar.h:795:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sigar_uint64_t read; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:34:54: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). value = JENV->NewString(env, (const jchar *)str, wcslen(str)); \ data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:80:5: [1] (buffer) wcscat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Risk is low because the source is a constant character. wcscat(buf, L"\\"); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:96:5: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). wcsncpy(dllfile, buf, MAX_MSG_LENGTH); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:129:20: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ptr += wcslen(ptr) + 1; data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:157:9: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). wcsncpy(msg, msgbuf, MAX_MSG_LENGTH); data/hyperic-sigar-1.6.4+dfsg/bindings/java/src/jni/win32/eventlog.c:354:29: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (wcslen(source) + 1) * sizeof(WCHAR)); data/hyperic-sigar-1.6.4+dfsg/bindings/php/php_sigar.c:129:29: [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). zend_lookup_class(name, strlen(name), &ce TSRMLS_CC); data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:763:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sigar_uint64_t read; data/hyperic-sigar-1.6.4+dfsg/include/sigar.h:795:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). sigar_uint64_t read; data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h:95:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, src, len); \ data/hyperic-sigar-1.6.4+dfsg/include/sigar_private.h:318:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). value, strlen(value)); \ data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:132:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(sigar->kmem, data, size) != size) { data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:336: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). len = strlen(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:567:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, &data, sizeof(data)) != sizeof(data)) { data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:857:20: [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 alen = strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:895:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). procenv->env_getter(procenv->data, ptr, strlen(ptr), NULL, 0); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:904: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). vlen = strlen(val); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:966: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(buffer); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1005:59: [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). procmods->module_getter(procmods->data, name, strlen(name)); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1156:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int hostname_len = strlen(hostname); data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1157: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). int devname_len = strlen(devname) + 1; data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1703:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nfs->read = proto.u.nfsv2.type.read; \ data/hyperic-sigar-1.6.4+dfsg/src/os/aix/aix_sigar.c:1757:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nfs->read = proto.u.nfsv3.type.read; \ data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1574: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(kargs->ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1607:20: [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 alen = strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1642:20: [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 slen = strlen(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1693:20: [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 alen = strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1724:20: [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 alen = strlen(*ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1778: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). vlen = strlen(val); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1822:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). procenv->env_getter(procenv->data, ptr, strlen(ptr), NULL, 0); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1831: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). vlen = strlen(val); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1925: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(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:1980:51: [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 *)name, strlen(name)); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2075:37: [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. Risk is low because the source is a constant string. if (flags & MNT_RDONLY) strncat(opts, "ro", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2076:37: [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. Risk is low because the source is a constant string. else strncat(opts, "rw", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2077:37: [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. Risk is low because the source is a constant string. if (flags & MNT_SYNCHRONOUS) strncat(opts, ",sync", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2078:37: [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. Risk is low because the source is a constant string. if (flags & MNT_NOEXEC) strncat(opts, ",noexec", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2079:37: [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. Risk is low because the source is a constant string. if (flags & MNT_NOSUID) strncat(opts, ",nosuid", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2081:37: [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. Risk is low because the source is a constant string. if (flags & MNT_NODEV) strncat(opts, ",nodev", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2084:37: [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. Risk is low because the source is a constant string. if (flags & MNT_UNION) strncat(opts, ",union", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2086:37: [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. Risk is low because the source is a constant string. if (flags & MNT_ASYNC) strncat(opts, ",async", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2088:37: [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. Risk is low because the source is a constant string. if (flags & MNT_NOATIME) strncat(opts, ",noatime", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2091:37: [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. Risk is low because the source is a constant string. if (flags & MNT_NOCLUSTERR) strncat(opts, ",noclusterr", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2094:37: [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. Risk is low because the source is a constant string. if (flags & MNT_NOCLUSTERW) strncat(opts, ",noclusterw", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2097:37: [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. Risk is low because the source is a constant string. if (flags & MNT_NOSYMFOLLOW) strncat(opts, ",nosymfollow", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2100:37: [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. Risk is low because the source is a constant string. if (flags & MNT_SUIDDIR) strncat(opts, ",suiddir", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2103:37: [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. Risk is low because the source is a constant string. if (flags & MNT_SOFTDEP) strncat(opts, ",soft-updates", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2105:37: [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. Risk is low because the source is a constant string. if (flags & MNT_LOCAL) strncat(opts, ",local", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2106:37: [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. Risk is low because the source is a constant string. if (flags & MNT_QUOTA) strncat(opts, ",quota", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2107:37: [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. Risk is low because the source is a constant string. if (flags & MNT_ROOTFS) strncat(opts, ",rootfs", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2109:37: [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. Risk is low because the source is a constant string. if (flags & MNT_USER) strncat(opts, ",user", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2112:37: [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. Risk is low because the source is a constant string. if (flags & MNT_IGNORE) strncat(opts, ",ignore", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2114:37: [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. Risk is low because the source is a constant string. if (flags & MNT_EXPORTED) strncat(opts, ",nfs", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2573:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, name, MIN(sizeof(ifr.ifr_name) - 1, name_len)); data/hyperic-sigar-1.6.4+dfsg/src/os/darwin/darwin_sigar.c:2645: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). if (strlen(iter->name) == sdl->sdl_nlen && 0 == memcmp(iter->name, sdl->sdl_data, sdl->sdl_nlen)) { data/hyperic-sigar-1.6.4+dfsg/src/os/hpux/hpux_sigar.c:795:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, stat->nm_device, SIGAR_IF_NAMESIZE); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:562:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(fd, buffer, sizeof(buffer)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:631:47: [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). proc_isthread(sigar, ent->d_name, strlen(ent->d_name))) data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:915:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, buffer, sizeof(buffer)); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:938: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). vlen = strlen(val); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1027: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(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1498:12: [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(ptr); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:1499:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, ptr, len); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2118: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(tok); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2285: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). slen = strlen(ent->d_name); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2318:20: [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(fd_ent->d_name); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2414: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(data); data/hyperic-sigar-1.6.4+dfsg/src/os/linux/linux_sigar.c:2433: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). vlen = strlen(val); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:880: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). len = strlen(args); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:979: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). alen = strlen(buffer)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1046: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). vlen = strlen(val); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1116: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(exe, path, ptr-path); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1117: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. Risk is low because the source is a constant character. strncat(exe, "/", 1); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1215:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). procmods->module_getter(procmods->data, buffer, strlen(buffer)); data/hyperic-sigar-1.6.4+dfsg/src/os/solaris/solaris_sigar.c:1542:48: [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 (strnEQ(paths->device, ptr, strlen(paths->device))) { data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1498:20: [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). ptr += strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1513: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). vlen = strlen(val); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1566:26: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). DWORD len = (wcslen((LPWSTR)ptr) + 1) * sizeof(WCHAR); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1652: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). int len = strlen(procexe->cwd); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1659:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(procexe->root, procexe->cwd, 3); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1714:48: [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). name, strlen(name)); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1777:47: [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. Risk is low because the source is a constant string. if (flags & FILE_READ_ONLY_VOLUME) strncat(opts, "ro", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1778:47: [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. Risk is low because the source is a constant string. else strncat(opts, "rw", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1780:47: [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. Risk is low because the source is a constant string. if (flags & FILE_CASE_PRESERVED_NAMES) strncat(opts, ",casepn", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1781:47: [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. Risk is low because the source is a constant string. if (flags & FILE_CASE_SENSITIVE_SEARCH) strncat(opts, ",casess", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1782:47: [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. Risk is low because the source is a constant string. if (flags & FILE_FILE_COMPRESSION) strncat(opts, ",fcomp", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1783:47: [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. Risk is low because the source is a constant string. if (flags & FILE_NAMED_STREAMS) strncat(opts, ",streams", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1784:47: [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. Risk is low because the source is a constant string. if (flags & FILE_PERSISTENT_ACLS) strncat(opts, ",acls", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1785:47: [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. Risk is low because the source is a constant string. if (flags & FILE_SEQUENTIAL_WRITE_ONCE) strncat(opts, ",wronce", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1786:47: [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. Risk is low because the source is a constant string. if (flags & FILE_SUPPORTS_ENCRYPTION) strncat(opts, ",efs", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1787:47: [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. Risk is low because the source is a constant string. if (flags & FILE_SUPPORTS_OBJECT_IDS) strncat(opts, ",oids", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1788:47: [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. Risk is low because the source is a constant string. if (flags & FILE_SUPPORTS_REPARSE_POINTS) strncat(opts, ",reparse", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1789:47: [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. Risk is low because the source is a constant string. if (flags & FILE_SUPPORTS_SPARSE_FILES) strncat(opts, ",sparse", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1790:47: [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. Risk is low because the source is a constant string. if (flags & FILE_SUPPORTS_TRANSACTIONS) strncat(opts, ",trans", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1791:47: [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. Risk is low because the source is a constant string. if (flags & FILE_UNICODE_ON_DISK) strncat(opts, ",unicode", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1792:47: [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. Risk is low because the source is a constant string. if (flags & FILE_VOLUME_IS_COMPRESSED) strncat(opts, ",vcomp", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1793:47: [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. Risk is low because the source is a constant string. if (flags & FILE_VOLUME_QUOTAS) strncat(opts, ",quota", osize); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1838:20: [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). ptr += strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1851:20: [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). ptr += strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:1883: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). ptr += strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3687:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, path, SIGAR_CMDLINE_MAX); data/hyperic-sigar-1.6.4+dfsg/src/os/win32/win32_sigar.c:3794:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key, strlen(key), data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1282: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). len = strlen(ptr); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:1949: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). (IS_FQDN(lookup) && strnEQ(lookup, name, strlen(name))) data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2106: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). int len = strlen(name); data/hyperic-sigar-1.6.4+dfsg/src/sigar.c:2236:27: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((password[n] = getchar()) != '\n') { data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:474: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(dir); data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:486:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, dir, sizeof(name)); data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:520:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ptr, data.cFileName, max); data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:710: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(dir); data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:724:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, dir, sizeof(name)); data/hyperic-sigar-1.6.4+dfsg/src/sigar_fileinfo.c:745:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ptr, ent->d_name, max); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:63:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, pw->pw_name, buflen); data/hyperic-sigar-1.6.4+dfsg/src/sigar_format.c:88:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, gr->gr_name, buflen); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:472:29: [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). descrip.dsc$w_length = strlen("tt:"); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:599:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = (read(0, &ch, 1) > 0) ? ch : -1) == -1 && errno == EINTR) data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:604:9: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:680: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(buf); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:698: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(buf); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:884:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). loc = gl_tab_hook(gl_buf, strlen(gl_prompt), &tmp); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1048: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(gl_killbuf); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1105: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(gl_buf); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1217: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). gl_width = gl_termw - strlen(prompt); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1219:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l1 = strlen(last_prompt); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1220:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l2 = strlen(prompt); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1236: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). gl_cnt = strlen(gl_buf); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1315: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(buf); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1396: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(buf); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1399:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (prev == 0 || strlen(prev) != len || data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1499: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). int len = strlen(p); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1504:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s, p, len-1); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1672: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). l = strlen(s); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1693:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(r, t1, (size_t) (t2-t1+1)); data/hyperic-sigar-1.6.4+dfsg/src/sigar_getline.c:1770:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( gl_killbuf, gl_buf+i, j-i+1 ); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:414: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). int nlen = strlen(needle); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:415: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). int hlen = strlen(haystack); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:426: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). return branch_strnEQ(branch, haystack, needle, strlen(needle)); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:434: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(haystack); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:591:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). branch->data_size = strlen(parsed->attr); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:756:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). branch->data_size = strlen(parsed->value); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:788:29: [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). branch->data_size = strlen(parsed->value); data/hyperic-sigar-1.6.4+dfsg/src/sigar_ptql.c:1634: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). if (strlen(parsed->value) != 1) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:250:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((len = read(fd, buffer, sizeof(buffer)-1)) > 0) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:271:20: [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 alen = strlen(ptr)+1; data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:667: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(model); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:673: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(info->vendor); data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:841:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((len = read(fd, buffer, buflen)) < 0) { data/hyperic-sigar-1.6.4+dfsg/src/sigar_util.c:967: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). strlen(map->l_name)); ANALYSIS SUMMARY: Hits = 630 Lines analyzed = 35020 in approximately 0.82 seconds (42731 lines/second) Physical Source Lines of Code (SLOC) = 26731 Hits@level = [0] 39 [1] 150 [2] 387 [3] 19 [4] 61 [5] 13 Hits@level+ = [0+] 669 [1+] 630 [2+] 480 [3+] 93 [4+] 74 [5+] 13 Hits/KSLOC@level+ = [0+] 25.0271 [1+] 23.5681 [2+] 17.9567 [3+] 3.47911 [4+] 2.76832 [5+] 0.486327 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.