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/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/dmi_util.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/expr.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/hardinfo.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/info.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/socket.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/util.c
Examining data/hardinfo-0.5.1+git20180227/hardinfo/vendor.c
Examining data/hardinfo-0.5.1+git20180227/includes/alpha/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/arm/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/binreloc.h
Examining data/hardinfo-0.5.1+git20180227/includes/blowfish.h
Examining data/hardinfo-0.5.1+git20180227/includes/callbacks.h
Examining data/hardinfo-0.5.1+git20180227/includes/computer.h
Examining data/hardinfo-0.5.1+git20180227/includes/cpu_util.h
Examining data/hardinfo-0.5.1+git20180227/includes/devices.h
Examining data/hardinfo-0.5.1+git20180227/includes/dmi_util.h
Examining data/hardinfo-0.5.1+git20180227/includes/dt_util.h
Examining data/hardinfo-0.5.1+git20180227/includes/egg-markdown.h
Examining data/hardinfo-0.5.1+git20180227/includes/expr.h
Examining data/hardinfo-0.5.1+git20180227/includes/fftbench.h
Examining data/hardinfo-0.5.1+git20180227/includes/gettext.h
Examining data/hardinfo-0.5.1+git20180227/includes/guibench.h
Examining data/hardinfo-0.5.1+git20180227/includes/hardinfo.h
Examining data/hardinfo-0.5.1+git20180227/includes/help-viewer.h
Examining data/hardinfo-0.5.1+git20180227/includes/ia64/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/iconcache.h
Examining data/hardinfo-0.5.1+git20180227/includes/info.h
Examining data/hardinfo-0.5.1+git20180227/includes/loadgraph.h
Examining data/hardinfo-0.5.1+git20180227/includes/m68k/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/markdown-text-view.h
Examining data/hardinfo-0.5.1+git20180227/includes/md5.h
Examining data/hardinfo-0.5.1+git20180227/includes/menu.h
Examining data/hardinfo-0.5.1+git20180227/includes/mips/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/network.h
Examining data/hardinfo-0.5.1+git20180227/includes/nqueens.h
Examining data/hardinfo-0.5.1+git20180227/includes/parisc/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/ppc/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/remote.h
Examining data/hardinfo-0.5.1+git20180227/includes/report.h
Examining data/hardinfo-0.5.1+git20180227/includes/riscv/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/s390/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/sh/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/sha1.h
Examining data/hardinfo-0.5.1+git20180227/includes/shell.h
Examining data/hardinfo-0.5.1+git20180227/includes/socket.h
Examining data/hardinfo-0.5.1+git20180227/includes/sparc/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/ssh-conn.h
Examining data/hardinfo-0.5.1+git20180227/includes/stock.h
Examining data/hardinfo-0.5.1+git20180227/includes/syncmanager.h
Examining data/hardinfo-0.5.1+git20180227/includes/test-utils.h
Examining data/hardinfo-0.5.1+git20180227/includes/uidefs.h
Examining data/hardinfo-0.5.1+git20180227/includes/vendor.h
Examining data/hardinfo-0.5.1+git20180227/includes/x86/processor-platform.h
Examining data/hardinfo-0.5.1+git20180227/includes/xmlrpc-client.h
Examining data/hardinfo-0.5.1+git20180227/includes/xmlrpc-server.h
Examining data/hardinfo-0.5.1+git20180227/includes/benchmark.h
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/benches.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/blowfish.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/cryptohash.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/drawing.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/fbench.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/fft.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/fftbench.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/fib.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/nqueens.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/raytrace.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/sha1.c
Examining data/hardinfo-0.5.1+git20180227/modules/benchmark/zlib.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/alsa.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/boots.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/display.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/environment.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/filesystem.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/groups.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/languages.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/loadavg.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/memory.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/modules.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/os.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/uptime.c
Examining data/hardinfo-0.5.1+git20180227/modules/computer/users.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/alpha/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.h
Examining data/hardinfo-0.5.1+git20180227/modules/devices/arm/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/battery.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/devicetree.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/devicetree/pmac_data.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/devicetree/rpi_data.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/devmemory.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/dmi.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/ia64/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/inputdevices.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/m68k/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/mips/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/parisc/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/pci.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/ppc/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/printers.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/resources.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/riscv/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.h
Examining data/hardinfo-0.5.1+git20180227/modules/devices/s390/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/sensors.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/sh/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/sparc/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/spd-decode.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/storage.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/usb.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/x86/processor.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/x86/x86_data.c
Examining data/hardinfo-0.5.1+git20180227/modules/devices/x86/x86_data.h
Examining data/hardinfo-0.5.1+git20180227/modules/network.c
Examining data/hardinfo-0.5.1+git20180227/modules/network/net.c
Examining data/hardinfo-0.5.1+git20180227/modules/network/nfs.c
Examining data/hardinfo-0.5.1+git20180227/modules/network/samba.c
Examining data/hardinfo-0.5.1+git20180227/shell/callbacks.c
Examining data/hardinfo-0.5.1+git20180227/shell/iconcache.c
Examining data/hardinfo-0.5.1+git20180227/shell/loadgraph-uber.c
Examining data/hardinfo-0.5.1+git20180227/shell/loadgraph.c
Examining data/hardinfo-0.5.1+git20180227/shell/menu.c
Examining data/hardinfo-0.5.1+git20180227/shell/report.c
Examining data/hardinfo-0.5.1+git20180227/shell/shell.c
Examining data/hardinfo-0.5.1+git20180227/shell/stock.c
Examining data/hardinfo-0.5.1+git20180227/shell/syncmanager.c

FINAL RESULTS:

data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:66:9:  [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.
	size = readlink(path2, path, buf_size - 1);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:210:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(sock_str, "%s=%d\n", _("Socket"), cputd->socket_id);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:212:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(sock_str, "%s=%s\n", _("Socket"), na);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:215:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(core_str, "%s=%d\n", _("Core"), cputd->core_id);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:217:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(core_str, "%s=%s\n", _("Core"), na);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:220:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(core_str, "%s=%d\n", _("Book"), cputd->book_id);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:222:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(core_str, "%s=%d\n", _("Drawer"), cputd->drawer_id);
data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c:96:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(buffer + l, "%s%d", l ? "," : "", i);
data/hardinfo-0.5.1+git20180227/hardinfo/dmi_util.c:32:12:  [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(candidates[i], F_OK) != -1)
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:220:12:  [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(candidates[i], F_OK) != -1)
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:574:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buff, "%s%02x", (i) ? " " : "", v);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:591:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(buff, "%s0x%x", (i) ? " " : "", be32toh(list[i]));
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:613:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(tmp, "%s\"%s\"",
data/hardinfo-0.5.1+git20180227/includes/info.h:62:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf, 2, 3)));
data/hardinfo-0.5.1+git20180227/modules/computer/languages.c:31:14:  [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.
    locale = popen("locale -va && echo", "r");
data/hardinfo-0.5.1+git20180227/modules/computer/languages.c:48:6:  [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.
	    sscanf(buf, "locale: %s", name);
data/hardinfo-0.5.1+git20180227/modules/computer/modules.c:53:13:  [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.
    lsmod = popen(lsmod_path, "r");
data/hardinfo-0.5.1+git20180227/modules/computer/modules.c:74:2:  [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.
	sscanf(buf, "%s %ld", modname, &memory);
data/hardinfo-0.5.1+git20180227/modules/computer/modules.c:79:9:  [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.
	modi = popen(buf, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:137:24:  [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).
#define APPEND_FLAG(f) strcat(all_flags, f); strcat(all_flags, " ");
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:237:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(dnbuff, "%s %s r%dp%d (%s)",
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:242:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(dnbuff, "%s %s r%dp%d (arch:%s)",
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:248:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(dnbuff, "%s [imp:%s part:%s r%dp%d arch:%s]",
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:257:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(dnbuff, "%s", model_name);
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:63:40:  [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 (apcaccess_path && (apcaccess = popen(apcaccess_path, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:318:15:  [4] (buffer) fscanf:
  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.
        (void)fscanf(procapm, "%s %s %s 0x%x %s %s %d%%",
data/hardinfo-0.5.1+git20180227/modules/devices/pci.c:58:21:  [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 (!(lspci = popen(command_line, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/pci.c:69:21:  [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 (!(lspci = popen(tmp, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:60:23:  [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).
#define APPEND_EXT(f) strcat(all_extensions, f); strcat(all_extensions, " ");
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:157:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(flag, "%s:%s", ext_str, ver_str);
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:166:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(flag, "%s", ext_str);
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:208: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 ((prcap = popen(tmp, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/usb.c:386:19:  [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 (!(lsusb = popen(temp, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/x86/processor.c:594:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(tmp_flag, "%s%s", lookup_prefix, flags[j]);
data/hardinfo-0.5.1+git20180227/modules/devices/x86/x86_data.c:304:24:  [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).
#define APPEND_FLAG(f) strcat(all_flags, f); strcat(all_flags, " ");
data/hardinfo-0.5.1+git20180227/modules/network.c:93:22:  [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 ((netstat = popen(command_line, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/network.c:191: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 ((route = popen(command_line, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/network.c:267:22:  [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 ((netstat = popen("netstat -an", "r"))) {
data/hardinfo-0.5.1+git20180227/modules/network/net.c:183: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(ifr.ifr_name, if_name);
data/hardinfo-0.5.1+git20180227/modules/network/net.c:191: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(ifr.ifr_name, if_name);
data/hardinfo-0.5.1+git20180227/modules/network/net.c:199: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(ifr.ifr_name, if_name);
data/hardinfo-0.5.1+git20180227/modules/network/net.c:209: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(ifr.ifr_name, if_name);
data/hardinfo-0.5.1+git20180227/modules/network/net.c:219: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(ifr.ifr_name, if_name);
data/hardinfo-0.5.1+git20180227/hardinfo/util.c:486:39:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
    gchar *confdir = g_build_filename(g_get_home_dir(), ".hardinfo", NULL);
data/hardinfo-0.5.1+git20180227/hardinfo/vendor.c:136:29:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
    path = g_build_filename(g_get_home_dir(), ".hardinfo", "vendor.conf", NULL);
data/hardinfo-0.5.1+git20180227/modules/benchmark.c:356:29:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
    path = g_build_filename(g_get_home_dir(), ".hardinfo", "benchmark.conf", NULL);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:119:9:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    x = g_rand_int_range(rand, 0, 800);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:120:9:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    y = g_rand_int_range(rand, 0, 600);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:167:9:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    x = g_rand_int_range(rand, 0, 800);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:168:9:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    y = g_rand_int_range(rand, 0, 600);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:169:12:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    size = g_rand_int_range(rand, 1, 96) * PANGO_SCALE;
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:214:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    x1 = g_rand_int_range(rand, 0, 800);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:215:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    y1 = g_rand_int_range(rand, 0, 600);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:221:24:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                       g_rand_int_range(rand, 0, 400),
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:222:24:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                       g_rand_int_range(rand, 0, 300));
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:258:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    x1 = g_rand_int_range(rand, 0, 800);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:259:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    y1 = g_rand_int_range(rand, 0, 600);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:265:24:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                       g_rand_int_range(rand, 0, 400),
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:266:24:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                       g_rand_int_range(rand, 0, 300));
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:301:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    x1 = g_rand_int_range(rand, 0, 800);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:302:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    y1 = g_rand_int_range(rand, 0, 600);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:303:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    x2 = g_rand_int_range(rand, 0, 800);
data/hardinfo-0.5.1+git20180227/modules/benchmark/guibench.c:304:10:  [3] (random) g_rand_int_range:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    y2 = g_rand_int_range(rand, 0, 600);
data/hardinfo-0.5.1+git20180227/modules/computer/os.c:380:28:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
    os->homedir = g_strdup(g_get_home_dir());
data/hardinfo-0.5.1+git20180227/modules/devices/pci.c:54:28:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
    buf = g_build_filename(g_get_home_dir(), ".hardinfo", "pci.ids", NULL);
data/hardinfo-0.5.1+git20180227/shell/syncmanager.c:310:37:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	gchar *filename = g_build_filename(g_get_home_dir(), ".hardinfo",
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:110: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).
    f = fopen("/proc/self/maps", "r");
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:170: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 *address_string, line[SIZE], *found;
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:175: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).
    f = fopen("/proc/self/maps", "r");
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:236:2:  [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_string, "0x", 2);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:237:2:  [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_string + 2, start_addr, len);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:241:2:  [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_string, "0x", 2);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:242:2:  [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_string + 2, end_addr, len);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:62:15:  [2] (integer) atol:
  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).
        ret = atol(fc);
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:203: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 sock_str[64] = "", core_str[64] = "";
data/hardinfo-0.5.1+git20180227/hardinfo/cpu_util.c:204: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 book_str[64] = "", drawer_str[64] = "";
data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c:84: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[65536] = "";
data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c:101:17:  [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(buffer + l, "-%d", seq_last);
data/hardinfo-0.5.1+git20180227/hardinfo/dmi_util.c:144:28:  [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).
            chassis_type = atoi(chassis);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:564:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buff[4] = "";  /* max element: " 00\0" */
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:585:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buff[12] = "";  /* max element: " 0x00000000\0" */
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:602: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 ret[1024] = "";
data/hardinfo-0.5.1+git20180227/hardinfo/util.c:1195: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).
		return_value = atoi(buffer);
data/hardinfo-0.5.1+git20180227/includes/computer.h:119:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    ptr = atoi(tmp[1]);                       \
data/hardinfo-0.5.1+git20180227/includes/devices.h:27:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    ptr = atoi(tmp[1]);                       \
data/hardinfo-0.5.1+git20180227/includes/gettext.h:16:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char msg_ctxt_id[msgctxt_len + msgid_len];
data/hardinfo-0.5.1+git20180227/includes/gettext.h:18:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/hardinfo-0.5.1+git20180227/includes/gettext.h:27:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/hardinfo-0.5.1+git20180227/includes/gettext.h:29:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/hardinfo-0.5.1+git20180227/includes/md5.h:16: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 in[64];
data/hardinfo-0.5.1+git20180227/includes/md5.h:22:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void MD5Final (unsigned char digest[16],
data/hardinfo-0.5.1+git20180227/includes/md5.h:24:50:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void MD5Transform (uint32 buf[4], const unsigned char in[64]);
data/hardinfo-0.5.1+git20180227/includes/ssh-conn.h:64:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *ssh_conn_errors[10];
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:157: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).
        m->memory_kiB = atoi(tmp);
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:210:20:  [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).
            return atoi(str);
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:261:36:  [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).
                b->bvalue.result = atoi(values[0]);
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:262:38:  [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).
            b->bvalue.threads_used = atoi(values[1]);
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:267:38:  [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).
            b->machine->memory_kiB = atoi(values[6]);
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:268:38:  [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).
            b->machine->processors = atoi(values[7]);
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:269:33:  [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).
            b->machine->cores = atoi(values[8]);
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:270:35:  [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).
            b->machine->threads = atoi(values[9]);
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:109:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(p, buf, len);
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:112:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(p, buf, t);
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:121:2:  [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(ctx->in, buf, 64);
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:129: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(ctx->in, buf, len);
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:137:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 digest[16];
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:200:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const unsigned char inraw[64];
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:297:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char checksum[16];
data/hardinfo-0.5.1+git20180227/modules/benchmark/sha1.c:61: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(block, buffer, 64);
data/hardinfo-0.5.1+git20180227/modules/benchmark/sha1.c:188:2:  [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(&context->buffer[j], data, (i = 64 - j));
data/hardinfo-0.5.1+git20180227/modules/benchmark/sha1.c:196: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(&context->buffer[j], &data[i], len - i);
data/hardinfo-0.5.1+git20180227/modules/benchmark/sha1.c:299: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 (!(file = fopen(argv[1], "rb"))) {
data/hardinfo-0.5.1+git20180227/modules/benchmark/zlib.c:36: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 uncompressed[65536];
data/hardinfo-0.5.1+git20180227/modules/computer.c:431:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
         if ((file = fopen(files[i], "r"))) {
data/hardinfo-0.5.1+git20180227/modules/computer/alsa.c:49:13:  [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).
    cards = fopen("/proc/asound/cards", "r");
data/hardinfo-0.5.1+git20180227/modules/computer/display.c:95:26:  [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).
                for (n = atoi(tmp[1]); n; n--) {
data/hardinfo-0.5.1+git20180227/modules/computer/filesystem.c:42: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).
    mtab = fopen("/etc/mtab", "r");
data/hardinfo-0.5.1+git20180227/modules/computer/loadavg.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 buf[64];
data/hardinfo-0.5.1+git20180227/modules/computer/loadavg.c:31: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).
    procloadavg = fopen("/proc/loadavg", "r");
data/hardinfo-0.5.1+git20180227/modules/computer/memory.c:29: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).
    procmem = fopen("/proc/meminfo", "r");
data/hardinfo-0.5.1+git20180227/modules/computer/uptime.c:28: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 ((procuptime = fopen("/proc/uptime", "r")) != NULL) {
data/hardinfo-0.5.1+git20180227/modules/devices/alpha/processor.c:31: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:135: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 all_flags[1024] = "";
data/hardinfo-0.5.1+git20180227/modules/devices/arm/processor.c:49: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/arm/processor.c:74:29:  [2] (integer) atol:
  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).
            processor->id = atol(tmp[1]);
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:59:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	buffer[512], *apcaccess_path;
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:127: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).
          f = fopen(path, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:150: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).
          f = fopen(path, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:312: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                 apm_bios_ver[16], apm_drv_ver[16];
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:313: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                 trash[10];
data/hardinfo-0.5.1+git20180227/modules/devices/battery.c:315:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((procapm = fopen("/proc/apm", "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/devicetree/pmac_data.c:36: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/devicetree/rpi_data.c:117: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/devmemory.c:72:50:  [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).
            trans_val = g_strdup_printf("%d %s", atoi(newkeys[1]), _("KiB") );
data/hardinfo-0.5.1+git20180227/modules/devices/ia64/processor.c:33: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/ia64/processor.c:58:29:  [2] (integer) atol:
  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).
            processor->id = atol(tmp[1]);
data/hardinfo-0.5.1+git20180227/modules/devices/inputdevices.c:46:11:  [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).
    dev = fopen("/proc/bus/input/devices", "r");
data/hardinfo-0.5.1+git20180227/modules/devices/m68k/processor.c:30: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/mips/processor.c:30: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/parisc/processor.c:33: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/parisc/processor.c:58:29:  [2] (integer) atol:
  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).
            processor->id = atol(tmp[1]);
data/hardinfo-0.5.1+git20180227/modules/devices/ppc/processor.c:33: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/ppc/processor.c:58:29:  [2] (integer) atol:
  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).
            processor->id = atol(tmp[1]);
data/hardinfo-0.5.1+git20180227/modules/devices/printers.c:77:22:  [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).
    unsigned value = atoi(strvalue);
data/hardinfo-0.5.1+git20180227/modules/devices/printers.c:123:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[255];
data/hardinfo-0.5.1+git20180227/modules/devices/resources.c:85:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if ((io = fopen(resources[i].file, "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/processor.c:39: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/processor.c:64:29:  [2] (integer) atol:
  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).
            processor->id = atol(tmp[1]);
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:58: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 all_extensions[1024] = "";
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:106: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 ext_str[32], ver_str[32];
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:177: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 flag_buf[64] = "";
data/hardinfo-0.5.1+git20180227/modules/devices/s390/processor.c:36: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/s390/processor.c:64:33:  [2] (integer) atol:
  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).
                processor->id = atol(tmp[0] + 10); /* processor n: ... */
data/hardinfo-0.5.1+git20180227/modules/devices/sensors.c:37: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).
    conf = fopen("/etc/sensors3.conf", "r");
data/hardinfo-0.5.1+git20180227/modules/devices/sensors.c:41: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).
        conf = fopen("/etc/sensors.conf", "r");
data/hardinfo-0.5.1+git20180227/modules/devices/sensors.c:134: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[64];
data/hardinfo-0.5.1+git20180227/modules/devices/sensors.c:419:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                       atoi(fields[2]),
data/hardinfo-0.5.1+git20180227/modules/devices/sh/processor.c:30: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/sparc/processor.c:30: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/spd-decode.c:606: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 const char **vendors[7] = { vendors1, vendors2, vendors3, vendors4, vendors5, vendors6,
data/hardinfo-0.5.1+git20180227/modules/devices/spd-decode.c:1307: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.
    out = (char *) vendors[ai - 1][(first & 0x7f) - 1];
data/hardinfo-0.5.1+git20180227/modules/devices/spd-decode.c:1369:13:  [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 ((spd = fopen(temp_path, "rb"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/spd-decode.c:1384:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    if ((spd = fopen(temp_path, "rb"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/spd-decode.c:1408:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char bytes[256];
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:48:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((proc_scsi = fopen("/proc/scsi/scsi", "r"))) {
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:177:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    proc_ide = fopen(device, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:191:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    proc_ide = fopen(device, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:264:14:  [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).
		proc_ide = fopen(device, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:278:14:  [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).
		proc_ide = fopen(device, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/usb.c:148:11:  [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).
    dev = fopen("/proc/bus/usb/devices", "r");
data/hardinfo-0.5.1+git20180227/modules/devices/usb.c:325: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).
        int mA = atoi(g_strstrip(max_power));
data/hardinfo-0.5.1+git20180227/modules/devices/usb.c:375: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[512], *temp;
data/hardinfo-0.5.1+git20180227/modules/devices/usb.c:393:18:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    temp_lsusb = tmpfile();
data/hardinfo-0.5.1+git20180227/modules/devices/x86/processor.c:226:22:  [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).
        cache->uid = atoi(uref);
data/hardinfo-0.5.1+git20180227/modules/devices/x86/processor.c:459: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).
    cpuinfo = fopen(PROC_CPUINFO, "r");
data/hardinfo-0.5.1+git20180227/modules/devices/x86/processor.c:484:29:  [2] (integer) atol:
  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).
            processor->id = atol(tmp[1]);
data/hardinfo-0.5.1+git20180227/modules/devices/x86/x86_data.c:302: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 all_flags[4096] = "";
data/hardinfo-0.5.1+git20180227/modules/network.c:137: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 ((resolv = fopen("/etc/resolv.conf", "r"))) {
data/hardinfo-0.5.1+git20180227/modules/network.c:142:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
          char hbuf[NI_MAXHOST];
data/hardinfo-0.5.1+git20180227/modules/network.c:231: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 ((arp = fopen("/proc/net/arp", "r"))) {
data/hardinfo-0.5.1+git20180227/modules/network/net.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 name[16];
data/hardinfo-0.5.1+git20180227/modules/network/net.c:54:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char mac[8];
data/hardinfo-0.5.1+git20180227/modules/network/net.c:55: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 ip[16];
data/hardinfo-0.5.1+git20180227/modules/network/net.c:56:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char mask[16];
data/hardinfo-0.5.1+git20180227/modules/network/net.c:57: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 broadcast[16];
data/hardinfo-0.5.1+git20180227/modules/network/net.c: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 wi_essid[IW_ESSID_MAX_SIZE + 1];
data/hardinfo-0.5.1+git20180227/modules/network/net.c:84:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char wbuf[256];
data/hardinfo-0.5.1+git20180227/modules/network/net.c:90: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 ((wrls = fopen("/proc/net/wireless", "r"))) {
data/hardinfo-0.5.1+git20180227/modules/network/net.c:163: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(&netinfo->wi_txpower, &wi_req.u.txpower, sizeof(struct iw_param));
data/hardinfo-0.5.1+git20180227/modules/network/net.c:195: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(netinfo->mac, ifr.ifr_ifru.ifru_hwaddr.sa_data, 8);
data/hardinfo-0.5.1+git20180227/modules/network/net.c:356: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).
    proc_net = fopen("/proc/net/dev", "r");
data/hardinfo-0.5.1+git20180227/modules/network/nfs.c:37:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((exports = fopen("/etc/exports", "r"))) {
data/hardinfo-0.5.1+git20180227/shell/report.c:623:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(stream = fopen(file, "w+"))) {
data/hardinfo-0.5.1+git20180227/shell/shell.c:1331:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char formatted[128];
data/hardinfo-0.5.1+git20180227/shell/shell.c:1813: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(&parent, &iter, sizeof(iter));
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:61:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
    strncpy(path2, "/proc/self/exe", buf_size - 1);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:93:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(path, path2, buf_size - 1);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:129: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).
    buf_size = strlen(line);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:211: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).
	len = strlen(file);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:218: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).
	len = strlen(file);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:223: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).
	len = strlen(start_addr);
data/hardinfo-0.5.1+git20180227/hardinfo/binreloc.c:224:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (len != strlen(end_addr))
data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c:87:9:  [1] (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 character.
        strcpy(buffer, "0");
data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c:95:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                l = strlen(buffer);
data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c:100:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                l = strlen(buffer);
data/hardinfo-0.5.1+git20180227/hardinfo/cpubits.c:110:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(str, buffer, max_len);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:490:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strncmp(obj->path, "/aliases/", strlen("/aliases/") ) == 0)
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:492: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).
    if (strncmp(obj->path, "/__symbols__/", strlen("/__symbols__/") ) == 0)
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:496: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).
    if (strncmp(obj->path, "/__overrides__/", strlen("/__overrides__/") ) == 0)
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:570:5:  [1] (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 character.
    strcpy(ret, "[");
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:575:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        l = strlen(buff);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:576:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(dest, buff, l);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:579:5:  [1] (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 character.
    strcpy(dest, "]");
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:592:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        l = strlen(buff);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:593:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(dest, buff, l);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:607:5:  [1] (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 character.
    strcpy(ret, "");
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:611:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        l = strlen(next_str);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:614: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).
                strlen(ret) ? ", " : "", esc);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:616: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).
        tmp += strlen(tmp);
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:634:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        l = strlen(src) + 1; /* consume the null */
data/hardinfo-0.5.1+git20180227/hardinfo/dt_util.c:831:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(parent) > 0)
data/hardinfo-0.5.1+git20180227/hardinfo/socket.c:102:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(s->sock, buffer, size - 1);
data/hardinfo-0.5.1+git20180227/hardinfo/socket.c:119: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).
    return write(s->sock, str, strlen(str));
data/hardinfo-0.5.1+git20180227/hardinfo/util.c:1132:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    l = 1 + strlen(string1);
data/hardinfo-0.5.1+git20180227/hardinfo/util.c:1136:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	l += strlen(s);
data/hardinfo-0.5.1+git20180227/includes/devices.h:14: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).
    ptr = g_markup_escape_text(g_strstrip(tmp[1]), strlen(tmp[1]));	\
data/hardinfo-0.5.1+git20180227/includes/dt_util.h:83:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define sp_sep(STR) (strlen(STR) ? " " : "")
data/hardinfo-0.5.1+git20180227/includes/gettext.h:12:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/hardinfo-0.5.1+git20180227/includes/gettext.h:13:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t msgid_len = strlen (msgid) + 1;
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:56:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        new_str, strlen(new_str) ? " + " : "",
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:65:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    new_str, strlen(new_str) ? " + " : "",
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:335:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (b->machine->board != NULL && strlen(b->machine->board) == 0) {
data/hardinfo-0.5.1+git20180227/modules/benchmark/bench_results.c:339: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).
        if (b->machine->cpu_desc != NULL && strlen(b->machine->cpu_desc) == 0) {
data/hardinfo-0.5.1+git20180227/modules/benchmark/md5.c:308: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).
	MD5Update(&context, argv[j], strlen(argv[j]));
data/hardinfo-0.5.1+git20180227/modules/computer/boots.c:48:39:  [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).
                    memmove(s, s + 1, strlen(s) + 1);
data/hardinfo-0.5.1+git20180227/modules/computer/loadavg.c:42:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t len = strlen(buf);
data/hardinfo-0.5.1+git20180227/modules/computer/modules.c:27: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).
    ptr = g_markup_escape_text(g_strstrip(tmp[1]), strlen(tmp[1]));	\
data/hardinfo-0.5.1+git20180227/modules/computer/modules.c:154: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 (deps && strlen(deps)) {
data/hardinfo-0.5.1+git20180227/modules/computer/os.c:99:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return tmp ? g_strdup(tmp + strlen("KDE: ")) : NULL;
data/hardinfo-0.5.1+git20180227/modules/computer/os.c:115: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).
            tmp += strlen(_("GNOME Shell "));
data/hardinfo-0.5.1+git20180227/modules/computer/os.c:126: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).
            tmp += strlen(_("Version: "));
data/hardinfo-0.5.1+git20180227/modules/computer/os.c:334:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            return g_strdup(tmp + strlen("Description:\t"));
data/hardinfo-0.5.1+git20180227/modules/devices.c:181: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).
                ret = h_strdup_cprintf("%s%s", ret, strlen(ret) ? "; " : "", cur_str);
data/hardinfo-0.5.1+git20180227/modules/devices.c:189:41:  [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).
    ret = h_strdup_cprintf("%s%s", ret, strlen(ret) ? "; " : "", cur_str);
data/hardinfo-0.5.1+git20180227/modules/devices.c:213:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                ret = h_strdup_cprintf("%s%dx %s", ret, strlen(ret) ? " + " : "", cur_count, cur_str);
data/hardinfo-0.5.1+git20180227/modules/devices.c:221: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).
    ret = h_strdup_cprintf("%s%dx %s", ret, strlen(ret) ? " + " : "", cur_count, cur_str);
data/hardinfo-0.5.1+git20180227/modules/devices.c:299:62:  [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).
                ret = h_strdup_cprintf("%s%dx %.2f %s", ret, strlen(ret) ? " + " : "", cur_count, cur_val, _("MHz") );
data/hardinfo-0.5.1+git20180227/modules/devices.c:307:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    ret = h_strdup_cprintf("%s%dx %.2f %s", ret, strlen(ret) ? " + " : "", cur_count, cur_val, _("MHz"));
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:137:46:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
#define APPEND_FLAG(f) strcat(all_flags, f); strcat(all_flags, " ");
data/hardinfo-0.5.1+git20180227/modules/devices/arm/arm_data.c:140:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    built = strlen(all_flags);
data/hardinfo-0.5.1+git20180227/modules/devices/inputdevices.c:63: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).
	    tmp = strreplacechr(tmp + strlen("N: Name="), "=", ':');
data/hardinfo-0.5.1+git20180227/modules/devices/inputdevices.c:68:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    phys = g_strdup(tmp + strlen("P: Phys="));
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:60:50:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
#define APPEND_EXT(f) strcat(all_extensions, f); strcat(all_extensions, " ");
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:63:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    built = strlen(all_extensions);
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:81: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).
            l = strlen(ext);
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:155:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ext_str, p, tag_len);
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:156:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ver_str, next_digit, ver_len);
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:165:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ext_str, p, tag_len);
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:174: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).
#define ADD_EXT_FLAG(ext) el = strlen(ext); strncpy(pd, ext, el); strncpy(pd + el, " ", 1); pd += el + 1;
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:174:45:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
#define ADD_EXT_FLAG(ext) el = strlen(ext); strncpy(pd, ext, el); strncpy(pd + el, " ", 1); pd += el + 1;
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:174:67:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant character.
#define ADD_EXT_FLAG(ext) el = strlen(ext); strncpy(pd, ext, el); strncpy(pd + el, " ", 1); pd += el + 1;
data/hardinfo-0.5.1+git20180227/modules/devices/riscv/riscv_data.c:181: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).
        isa_len = strlen(isa);
data/hardinfo-0.5.1+git20180227/modules/devices/s390/processor.c:63: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(tmp[0]) >= 10)
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:184:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    buf[strlen(buf) - 1] = 0;
data/hardinfo-0.5.1+git20180227/modules/devices/storage.c:199:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    buf[strlen(buf) - 1] = 0;
data/hardinfo-0.5.1+git20180227/modules/devices/usb.c:205:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(manuf)) {
data/hardinfo-0.5.1+git20180227/modules/devices/x86/processor.c:464: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 rlen = strlen(buffer);
data/hardinfo-0.5.1+git20180227/modules/devices/x86/x86_data.c:304:46:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
#define APPEND_FLAG(f) strcat(all_flags, f); strcat(all_flags, " ");
data/hardinfo-0.5.1+git20180227/modules/devices/x86/x86_data.c:307:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    built = strlen(all_flags);
data/hardinfo-0.5.1+git20180227/modules/network/net.c:125:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(wi_req.ifr_name, netinfo->name, 16);
data/hardinfo-0.5.1+git20180227/modules/network/net.c:133:5:  [1] (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 character.
    strcpy(netinfo->wi_essid, "");
data/hardinfo-0.5.1+git20180227/modules/network/net.c:180:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(netinfo->name, if_name, sizeof(netinfo->name));
data/hardinfo-0.5.1+git20180227/modules/network/samba.c:71: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).
                length = strlen(usershare);
data/hardinfo-0.5.1+git20180227/shell/report.c:165: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).
    g_key_file_load_from_data(key_file, text, strlen(text), 0, NULL);
data/hardinfo-0.5.1+git20180227/shell/report.c:342:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int i = strlen(text);
data/hardinfo-0.5.1+git20180227/shell/report.c:355:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int i = strlen(text);
data/hardinfo-0.5.1+git20180227/shell/report.c:378: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).
      if (strlen(value))
data/hardinfo-0.5.1+git20180227/shell/shell.c:1477: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).
    g_key_file_load_from_data(key_file, key_data, strlen(key_data), 0,
data/hardinfo-0.5.1+git20180227/shell/shell.c:1563: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).
	g_key_file_load_from_data(key_file, key_data, strlen(key_data), 0,
data/hardinfo-0.5.1+git20180227/shell/shell.c:1592:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                   strlen(value), 0, NULL)) {
data/hardinfo-0.5.1+git20180227/shell/shell.c:1744:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                  strlen(summary), 0, NULL)) {
data/hardinfo-0.5.1+git20180227/shell/syncmanager.c:261:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                 SOUP_MEMORY_TAKE, body, strlen(body));

ANALYSIS SUMMARY:

Hits = 282
Lines analyzed = 28712 in approximately 0.90 seconds (31847 lines/second)
Physical Source Lines of Code (SLOC) = 20875
Hits@level = [0]  66 [1]  87 [2] 129 [3]  23 [4]  42 [5]   1
Hits@level+ = [0+] 348 [1+] 282 [2+] 195 [3+]  66 [4+]  43 [5+]   1
Hits/KSLOC@level+ = [0+] 16.6707 [1+] 13.509 [2+] 9.34132 [3+] 3.16168 [4+] 2.05988 [5+] 0.0479042
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.