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/lshw-02.18.85/src/core/abi.cc
Examining data/lshw-02.18.85/src/core/abi.h
Examining data/lshw-02.18.85/src/core/blockio.cc
Examining data/lshw-02.18.85/src/core/blockio.h
Examining data/lshw-02.18.85/src/core/burner.cc
Examining data/lshw-02.18.85/src/core/burner.h
Examining data/lshw-02.18.85/src/core/cdrom.h
Examining data/lshw-02.18.85/src/core/config.h
Examining data/lshw-02.18.85/src/core/cpufreq.cc
Examining data/lshw-02.18.85/src/core/cpufreq.h
Examining data/lshw-02.18.85/src/core/cpuid.h
Examining data/lshw-02.18.85/src/core/cpuinfo.h
Examining data/lshw-02.18.85/src/core/db.cc
Examining data/lshw-02.18.85/src/core/db.h
Examining data/lshw-02.18.85/src/core/device-tree.cc
Examining data/lshw-02.18.85/src/core/device-tree.h
Examining data/lshw-02.18.85/src/core/disk.cc
Examining data/lshw-02.18.85/src/core/disk.h
Examining data/lshw-02.18.85/src/core/display.cc
Examining data/lshw-02.18.85/src/core/display.h
Examining data/lshw-02.18.85/src/core/dmi.cc
Examining data/lshw-02.18.85/src/core/dmi.h
Examining data/lshw-02.18.85/src/core/dump.cc
Examining data/lshw-02.18.85/src/core/dump.h
Examining data/lshw-02.18.85/src/core/fat.cc
Examining data/lshw-02.18.85/src/core/fat.h
Examining data/lshw-02.18.85/src/core/fb.h
Examining data/lshw-02.18.85/src/core/heuristics.cc
Examining data/lshw-02.18.85/src/core/heuristics.h
Examining data/lshw-02.18.85/src/core/hw.h
Examining data/lshw-02.18.85/src/core/ide.cc
Examining data/lshw-02.18.85/src/core/ide.h
Examining data/lshw-02.18.85/src/core/ideraid.h
Examining data/lshw-02.18.85/src/core/isapnp.cc
Examining data/lshw-02.18.85/src/core/isapnp.h
Examining data/lshw-02.18.85/src/core/jedec.cc
Examining data/lshw-02.18.85/src/core/jedec.h
Examining data/lshw-02.18.85/src/core/lvm.cc
Examining data/lshw-02.18.85/src/core/lvm.h
Examining data/lshw-02.18.85/src/core/main.cc
Examining data/lshw-02.18.85/src/core/main.h
Examining data/lshw-02.18.85/src/core/mem.cc
Examining data/lshw-02.18.85/src/core/mem.h
Examining data/lshw-02.18.85/src/core/mounts.h
Examining data/lshw-02.18.85/src/core/network.h
Examining data/lshw-02.18.85/src/core/options.cc
Examining data/lshw-02.18.85/src/core/options.h
Examining data/lshw-02.18.85/src/core/osutils.h
Examining data/lshw-02.18.85/src/core/parisc.cc
Examining data/lshw-02.18.85/src/core/parisc.h
Examining data/lshw-02.18.85/src/core/partitions.h
Examining data/lshw-02.18.85/src/core/pci.h
Examining data/lshw-02.18.85/src/core/pcmcia-legacy.h
Examining data/lshw-02.18.85/src/core/pcmcia.h
Examining data/lshw-02.18.85/src/core/pnp.cc
Examining data/lshw-02.18.85/src/core/pnp.h
Examining data/lshw-02.18.85/src/core/print.cc
Examining data/lshw-02.18.85/src/core/print.h
Examining data/lshw-02.18.85/src/core/s390.cc
Examining data/lshw-02.18.85/src/core/s390.h
Examining data/lshw-02.18.85/src/core/scsi.cc
Examining data/lshw-02.18.85/src/core/scsi.h
Examining data/lshw-02.18.85/src/core/smp.h
Examining data/lshw-02.18.85/src/core/spd.h
Examining data/lshw-02.18.85/src/core/sysfs.cc
Examining data/lshw-02.18.85/src/core/sysfs.h
Examining data/lshw-02.18.85/src/core/usb.h
Examining data/lshw-02.18.85/src/core/version.h
Examining data/lshw-02.18.85/src/core/vio.cc
Examining data/lshw-02.18.85/src/core/vio.h
Examining data/lshw-02.18.85/src/core/virtio.cc
Examining data/lshw-02.18.85/src/core/virtio.h
Examining data/lshw-02.18.85/src/core/volumes.h
Examining data/lshw-02.18.85/src/core/cdrom.cc
Examining data/lshw-02.18.85/src/core/cpuid.cc
Examining data/lshw-02.18.85/src/core/cpuinfo.cc
Examining data/lshw-02.18.85/src/core/fb.cc
Examining data/lshw-02.18.85/src/core/hw.cc
Examining data/lshw-02.18.85/src/core/ideraid.cc
Examining data/lshw-02.18.85/src/core/mounts.cc
Examining data/lshw-02.18.85/src/core/osutils.cc
Examining data/lshw-02.18.85/src/core/partitions.cc
Examining data/lshw-02.18.85/src/core/pci.cc
Examining data/lshw-02.18.85/src/core/pcmcia-legacy.cc
Examining data/lshw-02.18.85/src/core/pcmcia.cc
Examining data/lshw-02.18.85/src/core/smp.cc
Examining data/lshw-02.18.85/src/core/spd.cc
Examining data/lshw-02.18.85/src/core/usb.cc
Examining data/lshw-02.18.85/src/core/volumes.cc
Examining data/lshw-02.18.85/src/core/version.cc
Examining data/lshw-02.18.85/src/core/network.cc
Examining data/lshw-02.18.85/src/gui/callbacks.c
Examining data/lshw-02.18.85/src/gui/callbacks.h
Examining data/lshw-02.18.85/src/gui/engine.h
Examining data/lshw-02.18.85/src/gui/gtk-lshw.c
Examining data/lshw-02.18.85/src/gui/print-gui.h
Examining data/lshw-02.18.85/src/gui/stock.c
Examining data/lshw-02.18.85/src/gui/stock.h
Examining data/lshw-02.18.85/src/gui/support.c
Examining data/lshw-02.18.85/src/gui/support.h
Examining data/lshw-02.18.85/src/gui/engine.cc
Examining data/lshw-02.18.85/src/gui/print-gui.cc
Examining data/lshw-02.18.85/src/lshw.cc

FINAL RESULTS:

data/lshw-02.18.85/src/core/osutils.cc:424:8:  [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.
string readlink(const string & path)
data/lshw-02.18.85/src/core/osutils.cc:429:6:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
  if(readlink(path.c_str(), buffer, sizeof(buffer)-1)>0)
data/lshw-02.18.85/src/core/osutils.h:15:13:  [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.
std::string readlink(const std::string & path);
data/lshw-02.18.85/src/core/parisc.cc:546:23:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
      string driver = readlink("driver");
data/lshw-02.18.85/src/core/pci.cc:1172:31:  [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.
          string drivername = readlink(string(devices[i]->d_name)+"/driver");
data/lshw-02.18.85/src/core/pci.cc:1173:31:  [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.
          string modulename = readlink(string(devices[i]->d_name)+"/driver/module");
data/lshw-02.18.85/src/core/sysfs.cc:52:9:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        chmod(tmpdir,
data/lshw-02.18.85/src/core/sysfs.cc:235:19:  [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.
  return basename(readlink(driverlink).c_str());
data/lshw-02.18.85/src/core/abi.cc:20:24:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
bool scan_abi(hwNode & system)
data/lshw-02.18.85/src/core/abi.cc:25:14:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  if(sc!=-1) system.setWidth(sc);
data/lshw-02.18.85/src/core/abi.cc:31:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    system.addCapability("vsyscall64");
data/lshw-02.18.85/src/core/abi.cc:32:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    system.setWidth(64);
data/lshw-02.18.85/src/core/abi.cc:43:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      system.addCapability(namelist[i]->d_name);
data/lshw-02.18.85/src/core/abi.cc:52:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  system.describeCapability("vsyscall32", _("32-bit processes"));
data/lshw-02.18.85/src/core/abi.cc:53:3:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  system.describeCapability("vsyscall64", _("64-bit processes"));
data/lshw-02.18.85/src/core/cpufreq.cc:59:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    snprintf(buffer, sizeof(buffer), DEVICESCPUFREQ, i);
data/lshw-02.18.85/src/core/dmi.cc:1778:42:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
          hwNode oob("remoteaccess", hw::system);
data/lshw-02.18.85/src/core/dmi.cc:1915:7:  [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(SYSFSDMI "/smbios_entry_point", R_OK)!=0 || access(SYSFSDMI "/DMI", R_OK)!=0)
data/lshw-02.18.85/src/core/dmi.cc:1915:58:  [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(SYSFSDMI "/smbios_entry_point", R_OK)!=0 || access(SYSFSDMI "/DMI", R_OK)!=0)
data/lshw-02.18.85/src/core/fb.cc:182:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (sscanf(s, "%d %s", &n, t) == 2)
data/lshw-02.18.85/src/core/fb.cc:206:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fn, "%s/fb-%d", *p, getpid());
data/lshw-02.18.85/src/core/hw.cc:204:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      case hw::system:
data/lshw-02.18.85/src/core/hw.cc:1549:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        case hw::system:
data/lshw-02.18.85/src/core/hw.cc:1871:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        case hw::system:
data/lshw-02.18.85/src/core/hw.cc:1907:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        case hw::system:
data/lshw-02.18.85/src/core/hw.h:14:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    system,
data/lshw-02.18.85/src/core/main.cc:55:27:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
bool scan_system(hwNode & system)
data/lshw-02.18.85/src/core/main.cc:62:11:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      hw::system);
data/lshw-02.18.85/src/core/main.h:6:27:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
bool scan_system(hwNode & system);
data/lshw-02.18.85/src/core/network.cc:308: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, interface.getLogicalName().c_str());
data/lshw-02.18.85/src/core/network.cc:314:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(ifr.ifr_name, interface.getLogicalName().c_str());
data/lshw-02.18.85/src/core/network.cc:384:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(ifr.ifr_name, interfaces[i].c_str());
data/lshw-02.18.85/src/core/network.cc:418:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(ifr.ifr_name, interfaces[i].c_str());
data/lshw-02.18.85/src/core/network.cc:450:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(ifr.ifr_name, interfaces[i].c_str());
data/lshw-02.18.85/src/core/network.cc:459:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(ifr.ifr_name, interfaces[i].c_str());
data/lshw-02.18.85/src/core/network.cc:734:7:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
      strcpy(ifr.ifr_name, interfaces[i].c_str());
data/lshw-02.18.85/src/core/osutils.cc:117:10:  [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.
  return access(path.c_str(), F_OK) == 0;
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:859:9:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (sscanf(s, "%d %s", &n, t) == 2)
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:1132:15:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        cnt = sscanf(stab[i].c_str(),
data/lshw-02.18.85/src/core/pnp.cc:134:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    return hw::system;
data/lshw-02.18.85/src/core/pnp.cc:154:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    return hw::system;
data/lshw-02.18.85/src/core/print.cc:375:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        case hw::system:
data/lshw-02.18.85/src/core/print.cc:428:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        case hw::system:
data/lshw-02.18.85/src/core/usb.cc:444:16:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if(sscanf(line.c_str(), "D: Ver=%s Cls=%x(%*5c) Sub=%x Prot=%x MxPS=%u #Cfgs=%u", ver, &cls, &sub, &prot, &mxps, &numcfgs)>0)
data/lshw-02.18.85/src/core/usb.cc:481:16:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            if(sscanf(line.c_str(), "C:* #Ifs=%u Cfg#=%u Atr=%x MxPwr=%s", &numifs, &cfgnum, &atr, mxpwr)>0)
data/lshw-02.18.85/src/gui/engine.cc:253:35:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  hwNode computer("computer", hw::system);
data/lshw-02.18.85/src/gui/engine.cc:444:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
  strcat(s, extension);
data/lshw-02.18.85/src/gui/print-gui.cc:51:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      case hw::system:
data/lshw-02.18.85/src/lshw.cc:227:9:  [4] (shell) execl:
  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.
        execl(SBINDIR"/lshw-gtk", SBINDIR"/lshw-gtk", NULL);                                                                                                                                                    
data/lshw-02.18.85/src/lshw.cc:245:11:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      hw::system);
data/lshw-02.18.85/src/core/dump.cc:162:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    stm.bind(3,getenv("LANG"));
data/lshw-02.18.85/src/core/osutils.cc:436:8:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
string realpath(const string & path)
data/lshw-02.18.85/src/core/osutils.cc:441:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  if(realpath(path.c_str(), buffer))
data/lshw-02.18.85/src/core/osutils.h:16:13:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
std::string realpath(const std::string & path);
data/lshw-02.18.85/src/core/print.cc:42:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    env = getenv("LINES");
data/lshw-02.18.85/src/core/print.cc:51:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    env = getenv("COLUMNS");
data/lshw-02.18.85/src/core/sysfs.cc:170:23:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
    string firstdev = realpath(path + "/cdev0");
data/lshw-02.18.85/src/core/sysfs.cc:263:19:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  This->devpath = realpath(devpath);
data/lshw-02.18.85/src/gui/stock.c:71:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if((basedir = getenv("BASEDIR")))
data/lshw-02.18.85/src/lshw.cc:35:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if(getenv("DISPLAY") && exists(SBINDIR"/lshw-gtk"))
data/lshw-02.18.85/src/lshw.cc:266:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      computer.dump(getenv("OUTFILE"));
data/lshw-02.18.85/src/core/burner.cc:86: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 u[18];
data/lshw-02.18.85/src/core/burner.cc:201: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.
  unsigned char page[20];
data/lshw-02.18.85/src/core/burner.cc:273: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.
  unsigned char header[12], *page2A;
data/lshw-02.18.85/src/core/burner.cc:398: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.
  unsigned char header[8];
data/lshw-02.18.85/src/core/burner.cc:424: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.
  unsigned char header[32];
data/lshw-02.18.85/src/core/burner.cc:450: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.
  unsigned char header[32];
data/lshw-02.18.85/src/core/cdrom.cc:55:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(n.getLogicalName().c_str(), O_RDONLY | O_NONBLOCK);
data/lshw-02.18.85/src/core/cpufreq.cc: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).
  FILE * in = fopen(path.c_str(), "r");
data/lshw-02.18.85/src/core/cpufreq.cc:44: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 buffer[10];
data/lshw-02.18.85/src/core/cpufreq.cc:54: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 buffer[PATH_MAX];
data/lshw-02.18.85/src/core/cpuid.cc:19: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 cachename[10];
data/lshw-02.18.85/src/core/cpuid.cc:44: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 cpubusinfo[10];
data/lshw-02.18.85/src/core/cpuid.cc:93: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 cpuname[50];
data/lshw-02.18.85/src/core/cpuid.cc:95: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.
  unsigned char buffer[16];
data/lshw-02.18.85/src/core/cpuid.cc:98:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd = open(cpuname, O_RDONLY);
data/lshw-02.18.85/src/core/cpuid.cc:260: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 buffer[1024];
data/lshw-02.18.85/src/core/cpuid.cc:290:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buff[20];
data/lshw-02.18.85/src/core/cpuid.cc:425: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 buffer[1024];
data/lshw-02.18.85/src/core/cpuid.cc:497: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 buffer[1024];
data/lshw-02.18.85/src/core/cpuinfo.cc:27: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 cpubusinfo[10];
data/lshw-02.18.85/src/core/cpuinfo.cc:298:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      physicalcpu = atoi(value.c_str());
data/lshw-02.18.85/src/core/cpuinfo.cc:387: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).
    cpusdetected = atoi(value.c_str());
data/lshw-02.18.85/src/core/cpuinfo.cc:389: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).
    cpusactive = atoi(value.c_str());
data/lshw-02.18.85/src/core/cpuinfo.cc:432:16:  [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).
    siblings = atoi(value.c_str());
data/lshw-02.18.85/src/core/cpuinfo.cc:569:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int cpuinfo = open("/proc/cpuinfo", O_RDONLY);
data/lshw-02.18.85/src/core/cpuinfo.cc:582:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[1024];
data/lshw-02.18.85/src/core/device-tree.cc:41: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 serial[16];
data/lshw-02.18.85/src/core/device-tree.cc:55:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(path.c_str(), O_RDONLY);
data/lshw-02.18.85/src/core/device-tree.cc:106: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).
  FILE *f = fopen((node + "/reg").c_str(), "r");
data/lshw-02.18.85/src/core/device-tree.cc:133:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(path.c_str(), O_RDONLY);
data/lshw-02.18.85/src/core/device-tree.cc:258: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 buffer[20];
data/lshw-02.18.85/src/core/device-tree.cc:337: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 buffer[20];
data/lshw-02.18.85/src/core/device-tree.cc:824: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 dimmversion[20];
data/lshw-02.18.85/src/core/device-tree.cc:838:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fd = open(path.c_str(), O_RDONLY);
data/lshw-02.18.85/src/core/device-tree.cc:867:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char vendor[5];
data/lshw-02.18.85/src/core/device-tree.cc:920:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char description[100];
data/lshw-02.18.85/src/core/device-tree.cc:978: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 buff[32];
data/lshw-02.18.85/src/core/device-tree.cc:1122: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[10];
data/lshw-02.18.85/src/core/disk.cc:42:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(n.getLogicalName().c_str(), O_RDONLY | O_NONBLOCK);
data/lshw-02.18.85/src/core/dmi.cc:137: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 buffer[20];
data/lshw-02.18.85/src/core/dmi.cc:173: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 buffer[20];
data/lshw-02.18.85/src/core/dmi.cc:185: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 buffer[60];
data/lshw-02.18.85/src/core/dmi.cc:447: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 buffer[10];
data/lshw-02.18.85/src/core/dmi.cc:971: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 buffer[10];
data/lshw-02.18.85/src/core/dmi.cc:1534: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 bits[10];
data/lshw-02.18.85/src/core/dmi.cc:1587:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[80];
data/lshw-02.18.85/src/core/dmi.cc:1893: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[20];
data/lshw-02.18.85/src/core/dmi.cc:1973: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.
  unsigned char buf[31];
data/lshw-02.18.85/src/core/dmi.cc:1974:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open("/dev/mem",
data/lshw-02.18.85/src/core/dmi.cc:2020: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(dmi_buf, (u8 *) mmp + mmoffset, len);
data/lshw-02.18.85/src/core/fat.cc: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 sector[512];	// to make sure the whole struct is at least 512 bytes long
data/lshw-02.18.85/src/core/fb.cc:98: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 id[16];                                    /* identification string eg "TT Builtin" */
data/lshw-02.18.85/src/core/fb.cc:175: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 s[32], t[32];
data/lshw-02.18.85/src/core/fb.cc:177:7:  [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/devices", "r");
data/lshw-02.18.85/src/core/fb.cc:201: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 fn[64];
data/lshw-02.18.85/src/core/fb.cc:209:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fd = open(fn, O_RDONLY);
data/lshw-02.18.85/src/core/fb.cc:249: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 devname[20];
data/lshw-02.18.85/src/core/fb.cc:286:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char vidmode[20];
data/lshw-02.18.85/src/core/fb.cc:318:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
              char freq[20];
data/lshw-02.18.85/src/core/heuristics.cc:154:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      static char code[2];
data/lshw-02.18.85/src/core/hw.cc:79: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 buffer[256];
data/lshw-02.18.85/src/core/hw.cc:643: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 buffer[20];
data/lshw-02.18.85/src/core/hw.cc:796: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 buffer[10];
data/lshw-02.18.85/src/core/hw.cc:1159: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[20];
data/lshw-02.18.85/src/core/hw.cc:1172: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[40];
data/lshw-02.18.85/src/core/hw.cc:1189: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[40];
data/lshw-02.18.85/src/core/hw.cc:1705:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char version[PATH_MAX];
data/lshw-02.18.85/src/core/hw.cc:2221: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 buffer[80];
data/lshw-02.18.85/src/core/hw.cc:2249:19:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
      if(This->b) strcat(buffer, _("(prefetchable)"));
data/lshw-02.18.85/src/core/ide.cc:99: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).
  FILE *in = fopen(path.c_str(), "r");
data/lshw-02.18.85/src/core/ide.cc:116: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 buffer[20];
data/lshw-02.18.85/src/core/ide.cc:133:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(device.getLogicalName().c_str(), O_RDONLY | O_NONBLOCK);
data/lshw-02.18.85/src/core/ideraid.cc:103: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.
  unsigned char cdb[16];
data/lshw-02.18.85/src/core/ideraid.cc:115: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.
  unsigned char input_data[499];
data/lshw-02.18.85/src/core/ideraid.cc:118: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.
  unsigned char output_data[512]; // starts 530 bytes in!
data/lshw-02.18.85/src/core/ideraid.cc:163: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.
  unsigned char padding[12];
data/lshw-02.18.85/src/core/ideraid.cc:202:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char version[504];
data/lshw-02.18.85/src/core/ideraid.cc:209: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.
  unsigned char padding [508];
data/lshw-02.18.85/src/core/ideraid.cc:211: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.
  unsigned char          data_buffer[1];
data/lshw-02.18.85/src/core/ideraid.cc:237:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(devname.c_str(), O_RDONLY | O_NONBLOCK);
data/lshw-02.18.85/src/core/ideraid.cc:238: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.
  unsigned char ioctl_buffer[2*TW_IOCTL_BUFFER_SIZE];
data/lshw-02.18.85/src/core/isapnp.cc:140:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open("/dev/port", O_WRONLY);
data/lshw-02.18.85/src/core/isapnp.cc:162:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open("/dev/port", O_WRONLY);
data/lshw-02.18.85/src/core/isapnp.cc:183:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open("/dev/port", O_RDONLY);
data/lshw-02.18.85/src/core/isapnp.cc:464: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.
  unsigned char tag, tmp[2];
data/lshw-02.18.85/src/core/isapnp.cc:509: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.
  static char id[8];
data/lshw-02.18.85/src/core/isapnp.cc:529: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.
  unsigned char tmp[6];
data/lshw-02.18.85/src/core/isapnp.cc:546: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.
  unsigned char tmp[3];
data/lshw-02.18.85/src/core/isapnp.cc:569: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.
  unsigned char tmp[2];
data/lshw-02.18.85/src/core/isapnp.cc:590: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.
  unsigned char tmp[7];
data/lshw-02.18.85/src/core/isapnp.cc:613: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.
  unsigned char tmp[3];
data/lshw-02.18.85/src/core/isapnp.cc:635: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.
  unsigned char tmp[9];
data/lshw-02.18.85/src/core/isapnp.cc:658: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.
  unsigned char tmp[17];
data/lshw-02.18.85/src/core/isapnp.cc:680: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.
  unsigned char tmp[9];
data/lshw-02.18.85/src/core/isapnp.cc:701: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 buffer[1024];
data/lshw-02.18.85/src/core/isapnp.cc:719: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.
  unsigned char type, tmp[17];
data/lshw-02.18.85/src/core/isapnp.cc:873: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 version[10];
data/lshw-02.18.85/src/core/isapnp.cc:888: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.
  unsigned char type, tmp[17];
data/lshw-02.18.85/src/core/isapnp.cc:977: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.
  static char id[8];
data/lshw-02.18.85/src/core/isapnp.cc:996: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.
  unsigned char header[9], checksum;
data/lshw-02.18.85/src/core/isapnp.cc:1034:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char number[20];
data/lshw-02.18.85/src/core/lvm.cc:61: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 type[8];
data/lshw-02.18.85/src/core/main.cc:57: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 hostname[80];
data/lshw-02.18.85/src/core/network.cc:85: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 driver[32];                                /* driver short name, "tulip", "eepro100" */
data/lshw-02.18.85/src/core/network.cc:86: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 version[32];                               /* driver version string */
data/lshw-02.18.85/src/core/network.cc:87:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char fw_version[32];                            /* firmware version string, if applicable */
data/lshw-02.18.85/src/core/network.cc:88: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 bus_info[ETHTOOL_BUSINFO_LEN];             /* Bus info for this IF. */
data/lshw-02.18.85/src/core/network.cc:92: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 reserved1[32];
data/lshw-02.18.85/src/core/network.cc:93: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 reserved2[16];
data/lshw-02.18.85/src/core/network.cc:233: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 buff[5];
data/lshw-02.18.85/src/core/network.cc:351: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 buffer[2 * IFNAMSIZ + 1];
data/lshw-02.18.85/src/core/osutils.cc:80: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 curdir[PATH_MAX + 1];
data/lshw-02.18.85/src/core/osutils.cc:140:22:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define file_open(f) open((f).c_str(), O_RDONLY);
data/lshw-02.18.85/src/core/osutils.cc:150: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 buffer[1024];
data/lshw-02.18.85/src/core/osutils.cc:172:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(path.c_str(), O_RDONLY);
data/lshw-02.18.85/src/core/osutils.cc: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 buffer[1024];
data/lshw-02.18.85/src/core/osutils.cc:334: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 devid[80];
data/lshw-02.18.85/src/core/osutils.cc:382: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 buffer[80];
data/lshw-02.18.85/src/core/osutils.cc:392: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 buffer[80];
data/lshw-02.18.85/src/core/osutils.cc:426: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 buffer[PATH_MAX+1];
data/lshw-02.18.85/src/core/osutils.cc:438: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 buffer[PATH_MAX+1];
data/lshw-02.18.85/src/core/osutils.cc:619: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 fn[64];
data/lshw-02.18.85/src/core/osutils.cc:630:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fd = open(fn, O_RDONLY);
data/lshw-02.18.85/src/core/osutils.cc:854: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 version[PATH_MAX];
data/lshw-02.18.85/src/core/parisc.cc:390: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).
  FILE * in = fopen(path.c_str(), "r");
data/lshw-02.18.85/src/core/parisc.cc:405: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 buffer[10];
data/lshw-02.18.85/src/core/parisc.cc:538:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[20];
data/lshw-02.18.85/src/core/partitions.cc:298: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 name[10];
data/lshw-02.18.85/src/core/partitions.cc:316: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 buffer1[BLOCKSIZE], buffer2[BLOCKSIZE];
data/lshw-02.18.85/src/core/partitions.cc:355:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char buffer[BLOCKSIZE];
data/lshw-02.18.85/src/core/partitions.cc:679: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 buffer[50];
data/lshw-02.18.85/src/core/partitions.cc:695: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 gpt_version[8];
data/lshw-02.18.85/src/core/partitions.cc:1143:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char buffer[BLOCKSIZE];
data/lshw-02.18.85/src/core/partitions.cc:1165: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[8+1];
data/lshw-02.18.85/src/core/partitions.cc:1209:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char buffer[BLOCKSIZE];
data/lshw-02.18.85/src/core/partitions.cc:1276:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static unsigned char buffer[LIFBLOCKSIZE];
data/lshw-02.18.85/src/core/partitions.cc:1327: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.
  static char buffer[BLOCKSIZE];
data/lshw-02.18.85/src/core/partitions.cc:1360:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int fd = open(n.getLogicalName().c_str(), O_RDONLY | O_NONBLOCK);
data/lshw-02.18.85/src/core/pci.cc:599: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 buffer[20];
data/lshw-02.18.85/src/core/pci.cc:615: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 buffer[30];
data/lshw-02.18.85/src/core/pci.cc:797:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char revision[10];
data/lshw-02.18.85/src/core/pci.cc:954:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char irq[10];
data/lshw-02.18.85/src/core/pci.cc:1050:7:  [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_BUS_PCI "/devices", "r");
data/lshw-02.18.85/src/core/pci.cc:1053:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[512];
data/lshw-02.18.85/src/core/pci.cc:1061:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char devicename[20];
data/lshw-02.18.85/src/core/pci.cc:1062:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char businfo[20];
data/lshw-02.18.85/src/core/pci.cc:1063:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char driver[50];
data/lshw-02.18.85/src/core/pci.cc:1100:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fd = open(devicepath.c_str(), O_RDONLY);
data/lshw-02.18.85/src/core/pci.cc:1148:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      int fd = open(devicepath.c_str(), O_RDONLY);
data/lshw-02.18.85/src/core/pci.cc:1197:29:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            FILE*resource = fopen(resourcename.c_str(), "r");
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:68: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.
typedef char dev_info_t[DEV_NAME_LEN];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:78: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 name[DEV_NAME_LEN];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:173: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 str[254];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:228: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 str[254];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:722: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 str[244];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:731: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 desc[30];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:852: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 s[32], t[32];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:854:7:  [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/devices", "r");
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:873: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 buffer[20];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:908: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 buffer[20];
data/lshw-02.18.85/src/core/pcmcia-legacy.cc:1126: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 devclass[20], driver[20], logicalname[20];
data/lshw-02.18.85/src/core/print.cc:44:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      rows = atoi(env);
data/lshw-02.18.85/src/core/print.cc:53:17:  [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).
      columns = atoi(env);
data/lshw-02.18.85/src/core/scsi.cc:213: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 buffer[10];
data/lshw-02.18.85/src/core/scsi.cc:337: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.
  unsigned char senseCmdBlk[SENSE_CMD_LEN] =
data/lshw-02.18.85/src/core/scsi.cc:339: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.
  unsigned char sense_b[SENSE_BUFF_LEN];
data/lshw-02.18.85/src/core/scsi.cc:387: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.
  unsigned char inqCmdBlk[INQ_CMD_LEN] = { INQ_CMD_CODE, 0, 0, 0, 0, 0 };
data/lshw-02.18.85/src/core/scsi.cc:388: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.
  unsigned char sense_b[SENSE_BUFF_LEN];
data/lshw-02.18.85/src/core/scsi.cc:568:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fd = open(entries.gl_pathv[j], O_RDONLY | O_NONBLOCK);
data/lshw-02.18.85/src/core/scsi.cc:574:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char host[50];
data/lshw-02.18.85/src/core/scsi.cc:684:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fd = open(entries.gl_pathv[j], OPEN_FLAG | O_NONBLOCK);
data/lshw-02.18.85/src/core/smp.cc:26: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    signature[4];
data/lshw-02.18.85/src/core/smp.cc:40: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        signature[ 4 ];
data/lshw-02.18.85/src/core/smp.cc:44: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        oem_id[ 8 ];
data/lshw-02.18.85/src/core/smp.cc:45: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        product_id[ 12 ];
data/lshw-02.18.85/src/core/smp.cc:374:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((pfd = open("/dev/mem", O_RDONLY)) < 0)
data/lshw-02.18.85/src/core/spd.cc:26:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char spd[SPD_MAXSIZE];
data/lshw-02.18.85/src/core/spd.cc:38: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 chunkname[10];
data/lshw-02.18.85/src/core/spd.cc:47:10:  [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).
    in = fopen(name.c_str(), "r");
data/lshw-02.18.85/src/core/spd.cc: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 id[20];
data/lshw-02.18.85/src/core/spd.cc:104: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 buff[20];
data/lshw-02.18.85/src/core/sysfs.cc:40:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[50];
data/lshw-02.18.85/src/core/usb.cc:79: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 buffer[10];
data/lshw-02.18.85/src/core/usb.cc:89: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 buffer[10];
data/lshw-02.18.85/src/core/usb.cc:99: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 buffer[10];
data/lshw-02.18.85/src/core/usb.cc:112: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 buffer[15];
data/lshw-02.18.85/src/core/usb.cc:301: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).
  usbids = fopen(name.c_str(), "r");
data/lshw-02.18.85/src/core/usb.cc:359: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 ver[10+1];
data/lshw-02.18.85/src/core/usb.cc:362: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 rev[10+1];
data/lshw-02.18.85/src/core/usb.cc:364: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 mxpwr[10+1];
data/lshw-02.18.85/src/core/usb.cc:366: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 driver[80+1];
data/lshw-02.18.85/src/core/usb.cc:380:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    usbdevices = fopen(SYSKERNELDEBUGUSBDEVICES, "r");
data/lshw-02.18.85/src/core/usb.cc:383:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    usbdevices = fopen(PROCBUSUSBDEVICES, "r");
data/lshw-02.18.85/src/core/usb.cc:392: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 strname[80+1];
data/lshw-02.18.85/src/core/usb.cc:393:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char strval[80+1];
data/lshw-02.18.85/src/core/version.cc:36: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.
  unsigned char answer[PACKETSZ], *pt;
data/lshw-02.18.85/src/core/version.cc:37: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 host[128], *txt;
data/lshw-02.18.85/src/core/volumes.cc:124: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    s_volume_name[16];      /* volume name */
data/lshw-02.18.85/src/core/volumes.cc:125: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    s_last_mounted[64];     /* directory where last mounted */
data/lshw-02.18.85/src/core/volumes.cc:212: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 buffer[50];
data/lshw-02.18.85/src/core/volumes.cc:220: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 buffer[50];
data/lshw-02.18.85/src/core/volumes.cc:238: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.
  static char buffer[EXT2_DEFAULT_BLOCK_SIZE];
data/lshw-02.18.85/src/core/volumes.cc:350: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.
  static char buffer[BLOCKSIZE];
data/lshw-02.18.85/src/core/volumes.cc:386: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.
  static char buffer[REISERFSBLOCKSIZE];
data/lshw-02.18.85/src/core/volumes.cc:448: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 buffer[16];
data/lshw-02.18.85/src/core/volumes.cc:457: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.
  static char buffer[BLOCKSIZE];
data/lshw-02.18.85/src/core/volumes.cc:588: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.
  static char buffer[HFSBLOCKSIZE];
data/lshw-02.18.85/src/core/volumes.cc:680: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 drVN[28];                /* volume name */
data/lshw-02.18.85/src/core/volumes.cc:708: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.
  static char buffer[HFSBLOCKSIZE];
data/lshw-02.18.85/src/core/volumes.cc:754: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 magic[4];
data/lshw-02.18.85/src/core/volumes.cc:880: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.
  static char buffer[BLOCKSIZE];
data/lshw-02.18.85/src/core/volumes.cc:1013: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.
  static char buffer[SWAPBLOCKSIZE];
data/lshw-02.18.85/src/core/blockio.cc:38:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  result = read(s.fd, buffer, count*s.blocksize);
data/lshw-02.18.85/src/core/cpuid.cc:103:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if(read(fd, buffer, sizeof(buffer)) == sizeof(buffer))
data/lshw-02.18.85/src/core/cpuid.cc:580:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
  usleep(sleeptime);
data/lshw-02.18.85/src/core/cpuinfo.cc:588:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((count = read(cpuinfo, buffer, sizeof(buffer))) > 0)
data/lshw-02.18.85/src/core/device-tree.cc:59:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if(read(fd, &result, sizeof(result)) != sizeof(result))
data/lshw-02.18.85/src/core/device-tree.cc:145:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(fd, strings, buf.st_size) == buf.st_size)
data/lshw-02.18.85/src/core/device-tree.cc:149:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          while (strlen(curstring))
data/lshw-02.18.85/src/core/device-tree.cc:152: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).
            curstring += strlen(curstring) + 1;
data/lshw-02.18.85/src/core/device-tree.cc:842:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read(fd, &dimminfo, 0x80) != 0x80)
data/lshw-02.18.85/src/core/device-tree.cc:861:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, &dimminfo[0x80], len - 0x80);
data/lshw-02.18.85/src/core/dmi.cc:237: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).
    bp += strlen(bp);
data/lshw-02.18.85/src/core/dmi.cc:1539:11:  [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(bits, "");
data/lshw-02.18.85/src/core/dmi.cc:1592:15:  [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, "");
data/lshw-02.18.85/src/core/dmi.cc:1927:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ep_stream.read((char *)ep_buf.data(), ep_len);
data/lshw-02.18.85/src/core/dmi.cc:1939:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  dmi_stream.read((char *)dmi_buf.data(), dmi_len);
data/lshw-02.18.85/src/core/hw.cc:2227:3:  [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.
  strncpy(buffer, "", sizeof(buffer));
data/lshw-02.18.85/src/core/isapnp.cc:189:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if(read(fd, &val, 1) != 1)
data/lshw-02.18.85/src/core/network.cc:438:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buffer, interfaces[i].c_str(), sizeof(buffer));
data/lshw-02.18.85/src/core/osutils.cc:142:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define file_read(f, b, l) read((f), (b), (l))
data/lshw-02.18.85/src/core/osutils.cc:183:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((count = read(fd, buffer, sizeof(buffer))) > 0)
data/lshw-02.18.85/src/core/osutils.cc:766: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).
  while ((i <= strlen(prefixes)) && ((value > 10000) || (value % 1000 == 0)))
data/lshw-02.18.85/src/core/osutils.cc:773: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).
  if ((i > 0) && (i <= strlen(prefixes)))
data/lshw-02.18.85/src/core/osutils.cc:786: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).
  while ((i <= strlen(prefixes)) && ((value > 10240) || (value % 1024 == 0)))
data/lshw-02.18.85/src/core/osutils.cc:793: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).
  if ((i > 0) && (i <= strlen(prefixes)))
data/lshw-02.18.85/src/core/pci.cc:1103:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(fd, d.config, sizeof(d.config)) != sizeof(d.config))
data/lshw-02.18.85/src/core/pci.cc:1152:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(fd, d.config, 64) == 64)
data/lshw-02.18.85/src/core/pci.cc:1154:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          if(read(fd, d.config+64, sizeof(d.config)-64) != sizeof(d.config)-64)
data/lshw-02.18.85/src/core/print.cc:661: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).
  unsigned int l1 = strlen(_(cols[0])),
data/lshw-02.18.85/src/core/print.cc:662: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).
    l2 = strlen(_(cols[1])),
data/lshw-02.18.85/src/core/print.cc:663: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).
    l3 = strlen(_(cols[2]));
data/lshw-02.18.85/src/core/print.cc:678: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).
  out << spaces(2 + l1 - strlen(_(cols[0])));
data/lshw-02.18.85/src/core/print.cc:680: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).
  out << spaces(2 + l2 - strlen(_(cols[1])));
data/lshw-02.18.85/src/core/print.cc:682: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).
  out << spaces(2 + l3 - strlen(_(cols[2])));
data/lshw-02.18.85/src/core/print.cc:686: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).
  out << spaces(l1 + l2 + l3 + strlen(_(cols[3])) + 6, "=");
data/lshw-02.18.85/src/core/s390.cc:66:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (cutype.compare(0, strlen(d.cutype), d.cutype) == 0 &&
data/lshw-02.18.85/src/core/s390.cc:67: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).
        devtype.compare(0, strlen(d.devtype), d.devtype) == 0)
data/lshw-02.18.85/src/core/smp.cc:98:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return (read(pfd, entry, size) == size);
data/lshw-02.18.85/src/core/smp.cc:105:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ( read( pfd, &type, sizeof( type ) ) == sizeof( type ) )
data/lshw-02.18.85/src/core/spd.cc:78:44:  [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 (strncmp(d->d_name, EEPROMPREFIX, strlen(EEPROMPREFIX)) == 0);
data/lshw-02.18.85/src/core/sysfs.cc:43:7:  [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(buffer,
data/lshw-02.18.85/src/core/sysfs.cc:114:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if (path.length() > strlen("XXXX:XX:XX.X"))
data/lshw-02.18.85/src/core/sysfs.cc:115:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return "pci@" + path.substr(path.length() - strlen("XXXX:XX:XX.X"));
data/lshw-02.18.85/src/core/usb.cc:415:15:  [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(ver, "");
data/lshw-02.18.85/src/core/usb.cc:416:15:  [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(rev, "");
data/lshw-02.18.85/src/core/usb.cc:442:13:  [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(ver, "");
data/lshw-02.18.85/src/core/usb.cc:458:13:  [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(rev, "");
data/lshw-02.18.85/src/core/usb.cc:459:16:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
            if(sscanf(line.c_str(), "P: Vendor=%x ProdID=%x Rev=%10s", &vendor, &prodid, rev)>0)
data/lshw-02.18.85/src/core/usb.cc:480:13:  [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(mxpwr, "");
data/lshw-02.18.85/src/core/usb.cc:493: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).
              if((strlen(driver)!=0) && (strcasecmp("(none)", driver)!=0))
data/lshw-02.18.85/src/core/version.cc:82:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(txt, (char*)pt, txtlen);
data/lshw-02.18.85/src/gui/engine.cc:442:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  s = (char*)realloc(s, strlen(s) + 1 + strlen(extension) + 1);
data/lshw-02.18.85/src/gui/engine.cc:442: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).
  s = (char*)realloc(s, strlen(s) + 1 + strlen(extension) + 1);
data/lshw-02.18.85/src/gui/engine.cc:443:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
  strcat(s, ".");
data/lshw-02.18.85/src/lshw.cc:70:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    lastlen = strlen(message);

ANALYSIS SUMMARY:

Hits = 327
Lines analyzed = 26403 in approximately 0.76 seconds (34743 lines/second)
Physical Source Lines of Code (SLOC) = 21033
Hits@level = [0] 176 [1]  54 [2] 212 [3]  11 [4]  42 [5]   8
Hits@level+ = [0+] 503 [1+] 327 [2+] 273 [3+]  61 [4+]  50 [5+]   8
Hits/KSLOC@level+ = [0+] 23.9148 [1+] 15.547 [2+] 12.9796 [3+] 2.9002 [4+] 2.37722 [5+] 0.380355
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.