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/hwinfo-21.70/doc/example1.c
Examining data/hwinfo-21.70/doc/example2.c
Examining data/hwinfo-21.70/hwinfo.c
Examining data/hwinfo-21.70/hwscan.c
Examining data/hwinfo-21.70/hwscand.c
Examining data/hwinfo-21.70/hwscanqueue.c
Examining data/hwinfo-21.70/init_message.h
Examining data/hwinfo-21.70/src/hd/bios.c
Examining data/hwinfo-21.70/src/hd/bios.h
Examining data/hwinfo-21.70/src/hd/block.c
Examining data/hwinfo-21.70/src/hd/block.h
Examining data/hwinfo-21.70/src/hd/braille.c
Examining data/hwinfo-21.70/src/hd/braille.h
Examining data/hwinfo-21.70/src/hd/cpu.h
Examining data/hwinfo-21.70/src/hd/drm.c
Examining data/hwinfo-21.70/src/hd/drm.h
Examining data/hwinfo-21.70/src/hd/dvd.c
Examining data/hwinfo-21.70/src/hd/dvd.h
Examining data/hwinfo-21.70/src/hd/edd.c
Examining data/hwinfo-21.70/src/hd/edd.h
Examining data/hwinfo-21.70/src/hd/fb.c
Examining data/hwinfo-21.70/src/hd/fb.h
Examining data/hwinfo-21.70/src/hd/floppy.c
Examining data/hwinfo-21.70/src/hd/floppy.h
Examining data/hwinfo-21.70/src/hd/hal.c
Examining data/hwinfo-21.70/src/hd/hal.h
Examining data/hwinfo-21.70/src/hd/hd.h
Examining data/hwinfo-21.70/src/hd/hddb.c
Examining data/hwinfo-21.70/src/hd/hddb.h
Examining data/hwinfo-21.70/src/hd/hddb_int.h
Examining data/hwinfo-21.70/src/hd/hdp.c
Examining data/hwinfo-21.70/src/hd/hdp.h
Examining data/hwinfo-21.70/src/hd/hwclass_names.h
Examining data/hwinfo-21.70/src/hd/ibm-notebooks.h
Examining data/hwinfo-21.70/src/hd/input.c
Examining data/hwinfo-21.70/src/hd/input.h
Examining data/hwinfo-21.70/src/hd/int.c
Examining data/hwinfo-21.70/src/hd/int.h
Examining data/hwinfo-21.70/src/hd/isa.c
Examining data/hwinfo-21.70/src/hd/isa.h
Examining data/hwinfo-21.70/src/hd/isapnp.c
Examining data/hwinfo-21.70/src/hd/isapnp.h
Examining data/hwinfo-21.70/src/hd/isdn.c
Examining data/hwinfo-21.70/src/hd/isdn.h
Examining data/hwinfo-21.70/src/hd/kbd.h
Examining data/hwinfo-21.70/src/hd/klog.c
Examining data/hwinfo-21.70/src/hd/klog.h
Examining data/hwinfo-21.70/src/hd/manual.c
Examining data/hwinfo-21.70/src/hd/manual.h
Examining data/hwinfo-21.70/src/hd/mdt.c
Examining data/hwinfo-21.70/src/hd/memory.c
Examining data/hwinfo-21.70/src/hd/memory.h
Examining data/hwinfo-21.70/src/hd/misc.c
Examining data/hwinfo-21.70/src/hd/misc.h
Examining data/hwinfo-21.70/src/hd/modem.c
Examining data/hwinfo-21.70/src/hd/modem.h
Examining data/hwinfo-21.70/src/hd/monitor.c
Examining data/hwinfo-21.70/src/hd/monitor.h
Examining data/hwinfo-21.70/src/hd/mouse.c
Examining data/hwinfo-21.70/src/hd/mouse.h
Examining data/hwinfo-21.70/src/hd/net.c
Examining data/hwinfo-21.70/src/hd/net.h
Examining data/hwinfo-21.70/src/hd/parallel.c
Examining data/hwinfo-21.70/src/hd/parallel.h
Examining data/hwinfo-21.70/src/hd/pci.c
Examining data/hwinfo-21.70/src/hd/pci.h
Examining data/hwinfo-21.70/src/hd/pcmcia.c
Examining data/hwinfo-21.70/src/hd/pcmcia.h
Examining data/hwinfo-21.70/src/hd/pppoe.c
Examining data/hwinfo-21.70/src/hd/pppoe.h
Examining data/hwinfo-21.70/src/hd/prom.c
Examining data/hwinfo-21.70/src/hd/prom.h
Examining data/hwinfo-21.70/src/hd/s390.c
Examining data/hwinfo-21.70/src/hd/s390.h
Examining data/hwinfo-21.70/src/hd/sbus.c
Examining data/hwinfo-21.70/src/hd/sbus.h
Examining data/hwinfo-21.70/src/hd/serial.c
Examining data/hwinfo-21.70/src/hd/serial.h
Examining data/hwinfo-21.70/src/hd/smbios.c
Examining data/hwinfo-21.70/src/hd/smbios.h
Examining data/hwinfo-21.70/src/hd/sys.c
Examining data/hwinfo-21.70/src/hd/sys.h
Examining data/hwinfo-21.70/src/hd/usb.c
Examining data/hwinfo-21.70/src/hd/usb.h
Examining data/hwinfo-21.70/src/hd/wlan.c
Examining data/hwinfo-21.70/src/hd/wlan.h
Examining data/hwinfo-21.70/src/hd/hd.c
Examining data/hwinfo-21.70/src/hd/kbd.c
Examining data/hwinfo-21.70/src/hd/cpu.c
Examining data/hwinfo-21.70/src/hd/hd_int.h
Examining data/hwinfo-21.70/src/ids/check_hd.c
Examining data/hwinfo-21.70/src/ids/hd_ids.c
Examining data/hwinfo-21.70/src/isdn/cdb/cdb_hwdb.h
Examining data/hwinfo-21.70/src/isdn/cdb/cdb_read.c
Examining data/hwinfo-21.70/src/isdn/cdb/cdb_read.h
Examining data/hwinfo-21.70/src/isdn/cdb/isdn_cdb.c
Examining data/hwinfo-21.70/src/isdn/cdb/isdn_cdb_def.h
Examining data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c
Examining data/hwinfo-21.70/src/isdn/cdbisdn.c
Examining data/hwinfo-21.70/src/isdn/isa_probe.c
Examining data/hwinfo-21.70/src/smp/smp.c

FINAL RESULTS:

data/hwinfo-21.70/hwscand.c:53:20:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
			        if ( (r=readlink( link, b, 1023 )) > 0 ){
data/hwinfo-21.70/hwscanqueue.c:96:12:  [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 ( (r=readlink( link, buffer, 1023 )) > 0 ){
data/hwinfo-21.70/src/hd/s390.c:107:12:  [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(linkname, attrname, 127) == -1) continue;
data/hwinfo-21.70/src/hd/s390.c:176:10:  [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(attrname, linkname, 127) == -1) {
data/hwinfo-21.70/src/hd/s390.c:202: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.
    if(readlink(attrname,linkname,127) == -1) {
data/hwinfo-21.70/hwinfo.c:1132:3:  [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(display, c == '3' ? "FBDev" : "fbdev");
data/hwinfo-21.70/hwscan.c:457:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(status + strlen(status), "%scfg=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscan.c:462:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(status + strlen(status), "%savail=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscan.c:467:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(status + strlen(status), "%sneed=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscan.c:472:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(status + strlen(status), "%sactive=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscand.c:175:6:  [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( buf, devices[i] );
data/hwinfo-21.70/hwscand.c:178:8:  [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(buf);
data/hwinfo-21.70/hwscand.c:182:8:  [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(buf);
data/hwinfo-21.70/hwscand.c:201:6:  [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( buf, command_args[i] );
data/hwinfo-21.70/hwscand.c:213:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
								strcat( buf, command_args[i] );
data/hwinfo-21.70/hwscand.c:217:8:  [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( buf, command_device[i][j] );
data/hwinfo-21.70/hwscand.c:235: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(buf);
data/hwinfo-21.70/hwscand.c:245:6:  [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(commands[i]);
data/hwinfo-21.70/src/hd/bios.c:1093: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(smp->oem_id, s);
data/hwinfo-21.70/src/hd/bios.c:1096: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(smp->prod_id, s);
data/hwinfo-21.70/src/hd/hd.c:2444:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  vsnprintf(b, sizeof b, format, args);
data/hwinfo-21.70/src/hd/hd.c:2448:3:  [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(*buf + offset, b);
data/hwinfo-21.70/src/hd/hd.c:2554:14:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if(!(f = popen(file_name, "r"))) {
data/hwinfo-21.70/src/hd/hd.c:2685:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buf3, "%s.%u%s", *fn ? fn : buf1, pos, count ? buf2 : "");
data/hwinfo-21.70/src/hd/hd.c:4144:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(buf, "%0*"PRIx64, len >> 2, id);
data/hwinfo-21.70/src/hd/hd.c:4425: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(s, eisa_vendor_str(vend));
data/hwinfo-21.70/src/hd/hd.c:5163:18:  [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).
    if(str->str) strcat(s, str->str);
data/hwinfo-21.70/src/hd/hd.c:5164:26:  [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).
    if(str->next && del) strcat(s, del);
data/hwinfo-21.70/src/hd/hd.c:6071:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buf, "/sys/bus/%s/devices/%s/%s", bus, device, attr);
data/hwinfo-21.70/src/hd/hd.c:6105:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buf, "%s/%s", path, attr);
data/hwinfo-21.70/src/hd/hd.h:1697:5:  [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.
    access:2,			/**< enum access_flags */
data/hwinfo-21.70/src/hd/hd.h:1713:5:  [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.
    access:2;				/**< enum access_flags */
data/hwinfo-21.70/src/hd/hd_int.h:112:83:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void hd_log_printf(hd_data_t *hd_data, char *format, ...) __attribute__ ((format (printf, 2, 3)));            
data/hwinfo-21.70/src/hd/hd_int.h:115:84:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void str_printf(char **buf, int offset, char *format, ...) __attribute__ ((format (printf, 3, 4)));
data/hwinfo-21.70/src/hd/hddb.c:795:3:  [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(x->strings + (u = x->strings_len), str);
data/hwinfo-21.70/src/hd/hddb.c:1046:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy(s + 2, str);
data/hwinfo-21.70/src/hd/hddb.c:3068:14:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        s += sprintf(s, "0x%02"PRIx64, res->io.base);
data/hwinfo-21.70/src/hd/hdp.c:27:30:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define dump_line(x0, x1...) fprintf(f, "%*s" x0, ind, "", x1)
data/hwinfo-21.70/src/hd/hdp.c:29:27:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define dump_line0(x0...) fprintf(f, x0)
data/hwinfo-21.70/src/hd/hdp.c:572:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(buf, res->mem.access == acc_rw ? "rw" : res->mem.access == acc_ro ? "ro" : "wo");
data/hwinfo-21.70/src/hd/hdp.c:573:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(buf, res->mem.prefetch == flag_yes ? ",prefetchable" : res->mem.prefetch == flag_no ? ",non-prefetchable" : "");
data/hwinfo-21.70/src/hd/hdp.c:589:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(buf, res->io.access == acc_rw ? "rw" : res->io.access == acc_ro ? "ro" : "wo");
data/hwinfo-21.70/src/hd/hdp.c:669:15:  [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(b0, sizeof b0 - 1, "%"PRIu64, res->size.val1);
data/hwinfo-21.70/src/hd/hdp.c:670:15:  [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(b1, sizeof b1 - 1, "%"PRIu64, res->size.val2);
data/hwinfo-21.70/src/hd/manual.c:754:69:  [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.
          res->mem.base, res->mem.range, res->mem.enabled, res->mem.access, res->mem.prefetch
data/hwinfo-21.70/src/hd/manual.c:770:65:  [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.
          res->io.base, res->io.range, res->io.enabled, res->io.access
data/hwinfo-21.70/src/hd/net.c:460:3:  [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, hd->unix_dev_name);
data/hwinfo-21.70/src/hd/net.c:537:3:  [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, hd->unix_dev_name);
data/hwinfo-21.70/src/hd/net.c:571:3:  [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, hd->unix_dev_name);
data/hwinfo-21.70/src/hd/net.c:609:3:  [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, hd->unix_dev_name);
data/hwinfo-21.70/src/hd/pci.c:229: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 the scanf format is influenceable by an
  attacker, it's exploitable.
        sscanf(sl->str, "0x%"SCNx64" 0x%"SCNx64" 0x%"SCNx64, &ul0, &ul1, &ul2) == 3 &&
data/hwinfo-21.70/src/hd/s390.c:98:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(dirname,"%s/%s","/sys/bus/" BUSNAME_GROUP "/devices/", curdev->d_name);
data/hwinfo-21.70/src/hd/s390.c:105:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(linkname, "%s/%s", dirname, cl->d_name);
data/hwinfo-21.70/src/hd/s390.c:173:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(attrname, "/sys/bus/" BUSNAME "/devices/%s/group_device", curdev->d_name);
data/hwinfo-21.70/src/hd/s390.c:177:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(attrname, "/sys/bus/" BUSNAME "/devices/%s", curdev->d_name);
data/hwinfo-21.70/src/hd/s390.c:181:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(attrname, "/sys/devices/%s", linkname + 9);
data/hwinfo-21.70/src/hd/s390.c:187:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(attrname, "/sys/bus/" BUSNAME "/devices/%s", curdev->d_name);
data/hwinfo-21.70/src/hd/s390.c:265:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(attrname, "/sys/bus/" BUSNAME_IUCV "/devices/%s", curdev->d_name);
data/hwinfo-21.70/src/hd/sbus.c:74:3:  [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 (op->oprom_array, prop);
data/hwinfo-21.70/src/hd/smbios.c:566:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(f, style ? "\n" : " (");
data/hwinfo-21.70/src/ids/check_hd.c:594:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(fpos, "%s(1)", file);
data/hwinfo-21.70/src/ids/check_hd.c:619:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(fpos, "%s(%d)", file, l_nr);
data/hwinfo-21.70/src/ids/check_hd.c:985:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy(s + 2, val);
data/hwinfo-21.70/src/ids/check_hd.c:997:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(s2, "%s\001%s", s1, s);
data/hwinfo-21.70/src/ids/check_hd.c:1399:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(s, str->str);
data/hwinfo-21.70/src/ids/check_hd.c:1400:19:  [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).
    if(str->next) strcat(s, t);
data/hwinfo-21.70/src/ids/check_hd.c:2096:11:  [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(new_item->pos, item->pos);
data/hwinfo-21.70/src/ids/check_hd.c:2097:11:  [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(new_item->pos + l - 1, buf);
data/hwinfo-21.70/src/ids/check_hd.c:2677:3:  [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(hddb->strings + (u = hddb->strings_len), str);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:98:2:  [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(p, str);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:106:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(stmp, "%s %s", vendors[v].shortname, str);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:113:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(stmp, "%s,%s", list, str);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:123:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	sscanf(str, fmt, &v);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:127:3:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		sscanf(t, fmt, &i);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:130:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			p += sprintf(p, fmt, v);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:133:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		p += sprintf(p, fmt, i);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:138:8:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		p += sprintf(p, fmt, v);
data/hwinfo-21.70/src/isdn/cdb/isdn_cdb.c:227:2:  [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(line,asctime(gmtime(&tim)));
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:275:2:  [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(line,ctime(&tim));
data/hwinfo-21.70/src/isdn/cdbisdn.c:90: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(p, s + 4);
data/hwinfo-21.70/hwinfo.c:210:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while((i = getopt_long(argc, argv, "hd:l:pv", options, NULL)) != -1) {
data/hwinfo-21.70/hwinfo.c:1391:7:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
  i = chroot(dir);
data/hwinfo-21.70/hwinfo.c:1789:7:  [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.
  s = getenv("LIBHD_HDDB_DIR_NEW");
data/hwinfo-21.70/hwscan.c:132:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  while((i = getopt_long(argc, argv, "hv", options, NULL)) != -1) {
data/hwinfo-21.70/src/hd/bios.c:543:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *s = getenv("LIBHD_MEM");
data/hwinfo-21.70/src/hd/hd.c:2658:9:  [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.
  buf = realpath(s, NULL);
data/hwinfo-21.70/src/hd/hd.c:3932:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  env = getenv("hwprobe");
data/hwinfo-21.70/src/hd/hd.c:5686:25:  [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.
      char *real_path = realpath(sl->str, NULL);
data/hwinfo-21.70/src/hd/hd.c:5963:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char *s = getenv("LIBHD_HDDB_DIR");
data/hwinfo-21.70/src/hd/hddb.c:123: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.
      r = getenv("LIBHD_KERNELVERSION");
data/hwinfo-21.70/src/hd/monitor.c:69:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *s = getenv("LIBHD_EDID");
data/hwinfo-21.70/src/ids/check_hd.c:233:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  unsigned random:1;
data/hwinfo-21.70/src/ids/check_hd.c:263:24:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
  for(opterr = 0; (i = getopt_long(argc, argv, "", options, NULL)) != -1; ) {
data/hwinfo-21.70/src/ids/check_hd.c:290:9:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        srand(time(NULL));
data/hwinfo-21.70/src/ids/check_hd.c:1617:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  if(opt.random) {
data/hwinfo-21.70/src/isdn/cdb/isdn_cdb.c:225:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL || (tim = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0)
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:273:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL || (tim = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0)
data/hwinfo-21.70/hwinfo.c:356:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
          f = fopen(log_file, "w+");
data/hwinfo-21.70/hwinfo.c:434:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      f = fopen(log_file, "w+");
data/hwinfo-21.70/hwinfo.c:790:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[10];
data/hwinfo-21.70/hwinfo.c:983: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(INSTALL_INF, "w");
data/hwinfo-21.70/hwinfo.c:1014:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256], *s, *t;
data/hwinfo-21.70/hwinfo.c:1017:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((f = fopen("/proc/cmdline", "r"))) {
data/hwinfo-21.70/hwinfo.c:1033:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((f = fopen("/dev/fb", "r"))) {
data/hwinfo-21.70/hwinfo.c:1049:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256], *s, *t;
data/hwinfo-21.70/hwinfo.c:1050: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 x11i[64] = { };
data/hwinfo-21.70/hwinfo.c:1054:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((f = fopen("/proc/cmdline", "r"))) {
data/hwinfo-21.70/hwinfo.c:1073: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 display[16];
data/hwinfo-21.70/hwinfo.c:1074: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 xf86_ver[2];
data/hwinfo-21.70/hwinfo.c:1075: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[32];
data/hwinfo-21.70/hwinfo.c:1109:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(id, "%d:%d:%d", hd->slot >> 8, hd->slot & 0xff, hd->func);
data/hwinfo-21.70/hwinfo.c:1179: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(INSTALL_INF, "w");
data/hwinfo-21.70/hwinfo.c:1334: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(INSTALL_INF, "w");
data/hwinfo-21.70/hwinfo.c:1404:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256];
data/hwinfo-21.70/hwscan.c:213:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if((f = fopen(HARDWARE_UNIQUE_KEYS "/.update", "a"))) fclose(f);
data/hwinfo-21.70/hwscan.c:443: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 status[64];
data/hwinfo-21.70/hwscand.c:34:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char * command_device[NR_COMMANDS][BUFFERS];
data/hwinfo-21.70/hwscand.c:39:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/hwinfo-21.70/hwscand.c:46:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char b[1024];
data/hwinfo-21.70/hwscand.c:47:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char link[1024];
data/hwinfo-21.70/hwscand.c:48: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).
			int fd = open( PID_FILE, O_RDONLY );
data/hwinfo-21.70/hwscand.c:65:24:  [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).
		} while ( 0 > (ret = open( PID_FILE, O_WRONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR ) ) );
data/hwinfo-21.70/hwscand.c:66:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%d", getpid());
data/hwinfo-21.70/hwscand.c:104:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char z[2];
data/hwinfo-21.70/hwscand.c:108:10:  [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).
					c = atoi(z);
data/hwinfo-21.70/hwscand.c:171:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[MESSAGE_BUFFER];
data/hwinfo-21.70/hwscand.c:173:11:  [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( devices[i], O_RDONLY );
data/hwinfo-21.70/hwscand.c:174:6:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
					strcpy( buf, "/sbin/hwscan --fast --partition --only=");
data/hwinfo-21.70/hwscand.c:191:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[MESSAGE_BUFFER * NR_COMMANDS];
data/hwinfo-21.70/hwscand.c:195:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy( buf, "/sbin/hwscan --fast --boot --silent" );
data/hwinfo-21.70/hwscand.c:200:6:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
					strcat( buf, " --");
data/hwinfo-21.70/hwscand.c:212:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
								strcat( buf, " --");
data/hwinfo-21.70/hwscand.c:216:8:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
							strcat( buf, " --only=" );
data/hwinfo-21.70/hwscanqueue.c: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[1024];
data/hwinfo-21.70/hwscanqueue.c:90: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 link[1024];
data/hwinfo-21.70/hwscanqueue.c:91: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( PID_FILE, O_RDONLY );
data/hwinfo-21.70/init_message.h:13: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 mtext[MESSAGE_BUFFER+1];
data/hwinfo-21.70/src/hd/bios.c:581: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 pnp[4] = { '$', 'P', 'n', 'P' };
data/hwinfo-21.70/src/hd/bios.c:631:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(memory_sysfs.data, buf, memory_sysfs.size);
data/hwinfo-21.70/src/hd/bios.c:727: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(memory.data, buf, memory.size);
data/hwinfo-21.70/src/hd/bios.c:760:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(sm->any.data, memory.data + ofs, slen);
data/hwinfo-21.70/src/hd/bios.c:1042:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(smp->feature, mem->data + u + 11, 5);
data/hwinfo-21.70/src/hd/block.c:214: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 bid[9];
data/hwinfo-21.70/src/hd/block.c:228:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	      sprintf(bid,"%01x.%01x.%04x",
data/hwinfo-21.70/src/hd/block.c:464:10:  [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(hd->unix_dev_name, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/block.c:685:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if((f = fopen(fname, "r"))) {
data/hwinfo-21.70/src/hd/block.c:728: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 scsi_cmd_buf[0x300];
data/hwinfo-21.70/src/hd/block.c:735:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[16];
data/hwinfo-21.70/src/hd/block.c:940:10:  [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(hd->unix_dev_name, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/block.c:988:10:  [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(hd->unix_dev_name, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/block.c:1015:18:  [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, O_RDONLY);
data/hwinfo-21.70/src/hd/block.c:1175:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256], *s1, *name, *base;
data/hwinfo-21.70/src/hd/block.c:1264: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 sector[0x800];
data/hwinfo-21.70/src/hd/block.c:1283: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).
  if((fd = open(hd->unix_dev_name, O_RDONLY)) < 0) {
data/hwinfo-21.70/src/hd/block.c:1849:10:  [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(hd->unix_dev_name, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/braille.c:138: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[sizeof BRL_ID];
data/hwinfo-21.70/src/hd/braille.c:144: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(dev_name, O_RDWR | O_NOCTTY);
data/hwinfo-21.70/src/hd/braille.c:225: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[10];
data/hwinfo-21.70/src/hd/braille.c:232: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(dev_name, O_RDWR | O_NOCTTY);
data/hwinfo-21.70/src/hd/braille.c:326: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(dev_name, O_RDWR | O_NOCTTY);
data/hwinfo-21.70/src/hd/braille.c:430: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[MAXREAD + 1];
data/hwinfo-21.70/src/hd/braille.c:435: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(dev_name, O_RDWR | O_NOCTTY);
data/hwinfo-21.70/src/hd/braille.c:487: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 retstr[50] = "";
data/hwinfo-21.70/src/hd/braille.c:493: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(dev_name, O_RDWR | O_NONBLOCK | O_NOCTTY);
data/hwinfo-21.70/src/hd/cpu.c: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 model_id[80], vendor_id[80], features[0x400];
data/hwinfo-21.70/src/hd/cpu.c: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 model_id[0x100], vendor_id[80], features[0x400];
data/hwinfo-21.70/src/hd/cpu.c:105: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 model_id[80], system_id[80], serial_number[80], platform[80];
data/hwinfo-21.70/src/hd/cpu.c: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 model_id[80], system_id[80], serial_number[80], features[0x400];
data/hwinfo-21.70/src/hd/cpu.c:120: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 model_id[80], system_id[80], serial_number[80], features[0x400];
data/hwinfo-21.70/src/hd/cpu.c:129: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 model_id[80], vendor_id[80], motherboard[80];
data/hwinfo-21.70/src/hd/cpu.c:136: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 cpu_id[80], fpu_id[80], promlib[80], prom[80], type[80], mmu[80];
data/hwinfo-21.70/src/hd/cpu.c:142: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 vendor_id[80];
data/hwinfo-21.70/src/hd/cpu.c:148: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 cpu[32], mmu[32], fpu[32];
data/hwinfo-21.70/src/hd/cpu.c:154: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 hart[32], isa[32], mmu[32];
data/hwinfo-21.70/src/hd/cpu.c:155: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 uarch[80];
data/hwinfo-21.70/src/hd/cpu.c:266:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
       char buf[80];
data/hwinfo-21.70/src/hd/cpu.c:267:8:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
       sprintf(buf, "unknown (%x)", vendor_id);
data/hwinfo-21.70/src/hd/cpu.c:331:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[80];
data/hwinfo-21.70/src/hd/cpu.c:332:6:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	    sprintf(buf, "unknown (%x)", vendor_id);
data/hwinfo-21.70/src/hd/cpu.c:783: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 signature[8];
data/hwinfo-21.70/src/hd/cpu.c:785: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 oem_id[6];
data/hwinfo-21.70/src/hd/cpu.c: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 signature[4];
data/hwinfo-21.70/src/hd/cpu.c:800: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 oem_id[6];
data/hwinfo-21.70/src/hd/cpu.c:801: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 oem_table_id[8];
data/hwinfo-21.70/src/hd/cpu.c:803: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 asl_compiler_id[4];
data/hwinfo-21.70/src/hd/cpu.c:963: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).
  mem_fd = open("/dev/mem", O_RDONLY);
data/hwinfo-21.70/src/hd/cpu.c:966:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  systab_fd = open("/proc/efi/systab", O_RDONLY);
data/hwinfo-21.70/src/hd/cpu.c:969: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[512];
data/hwinfo-21.70/src/hd/cpu.c:992:11:  [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(&rsdp, mapped + offset, sizeof rsdp);
data/hwinfo-21.70/src/hd/drm.c:9: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).
  int kms = open("/sys/class/drm/card0", O_RDONLY) > 0;
data/hwinfo-21.70/src/hd/dvd.c:81: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 u[18];
data/hwinfo-21.70/src/hd/dvd.c:191:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char page[20];
data/hwinfo-21.70/src/hd/edd.c:138:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&edd_dev_path1, edd_raw + 56, 8);
data/hwinfo-21.70/src/hd/edd.c:139:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&edd_dev_path2, edd_raw + 64, 8);
data/hwinfo-21.70/src/hd/fb.c:115: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(DEV_FB, O_RDONLY);
data/hwinfo-21.70/src/hd/fb.c:116:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if(fd < 0) fd = open(DEV_FB0, O_RDONLY);
data/hwinfo-21.70/src/hd/floppy.c:32: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 b0[10], b1[10], c;
data/hwinfo-21.70/src/hd/floppy.c:67: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(DEV_NVRAM, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/hal.c:598:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(dir, mode);
data/hwinfo-21.70/src/hd/hd.c:2166:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(s + 3, "%04X", v);
data/hwinfo-21.70/src/hd/hd.c:2173: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 s[4];
data/hwinfo-21.70/src/hd/hd.c:2284: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 buf[32];
data/hwinfo-21.70/src/hd/hd.c:2294:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "%d.%0*d", j, m, i);
data/hwinfo-21.70/src/hd/hd.c:2297:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "%d", j);
data/hwinfo-21.70/src/hd/hd.c:2371:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hd_data->log + hd_data->log_size, buf, len);
data/hwinfo-21.70/src/hd/hd.c:2423: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 b[0x10000];
data/hwinfo-21.70/src/hd/hd.c:2547:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[0x10000];
data/hwinfo-21.70/src/hd/hd.c:2559: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).
    if(!(f = fopen(file_name, "r"))) {
data/hwinfo-21.70/src/hd/hd.c:2673: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 buf1[32], buf2[32], buf3[128], *fn;
data/hwinfo-21.70/src/hd/hd.c:2681:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(buf1, "%u", hd_data->module);
data/hwinfo-21.70/src/hd/hd.c:2682:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
  sprintf(buf2, ".%u", count);
data/hwinfo-21.70/src/hd/hd.c:3121: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 probe_save[sizeof hd_data->probe];
data/hwinfo-21.70/src/hd/hd.c:3128:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(probe_save, hd_data->probe, sizeof probe_save);
data/hwinfo-21.70/src/hd/hd.c:3131:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hd_data->probe, probe_save, sizeof hd_data->probe);
data/hwinfo-21.70/src/hd/hd.c:3226: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 probe_save[sizeof hd_data->probe];
data/hwinfo-21.70/src/hd/hd.c:3230:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(probe_save, hd_data->probe, sizeof probe_save);
data/hwinfo-21.70/src/hd/hd.c:3239:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hd_data->probe, probe_save, sizeof hd_data->probe);
data/hwinfo-21.70/src/hd/hd.c:3287: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 probe_save[sizeof hd_data->probe];
data/hwinfo-21.70/src/hd/hd.c:3289:3:  [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(probe_save, hd_data->probe, sizeof probe_save);
data/hwinfo-21.70/src/hd/hd.c:3293:3:  [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(hd_data->probe, probe_save, sizeof hd_data->probe);
data/hwinfo-21.70/src/hd/hd.c:3337: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 probe_save[sizeof hd_data->probe];
data/hwinfo-21.70/src/hd/hd.c:3347:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(probe_save, hd_data->probe, sizeof probe_save);
data/hwinfo-21.70/src/hd/hd.c:3358:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(hd_data->probe, probe_save, sizeof hd_data->probe);
data/hwinfo-21.70/src/hd/hd.c:3405: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 probe_save[sizeof hd_data->probe];
data/hwinfo-21.70/src/hd/hd.c:3409:3:  [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(probe_save, hd_data->probe, sizeof probe_save);
data/hwinfo-21.70/src/hd/hd.c:3413:3:  [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(hd_data->probe, probe_save, sizeof hd_data->probe);
data/hwinfo-21.70/src/hd/hd.c:3929:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[10];
data/hwinfo-21.70/src/hd/hd.c:3985: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 buf0[10], buf1[10], buf2[10], buf3[64], buf4[10], buf5[10], *s, k;
data/hwinfo-21.70/src/hd/hd.c:4138: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 buf[32];
data/hwinfo-21.70/src/hd/hd.c:4333:3:  [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).
  open((char *) arg, O_RDONLY);
data/hwinfo-21.70/src/hd/hd.c:4349:10:  [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(dev, O_RDONLY);
data/hwinfo-21.70/src/hd/hd.c:4419: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 buf[32];
data/hwinfo-21.70/src/hd/hd.c:4431:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(s, "%04x", ID_VALUE(vend));
data/hwinfo-21.70/src/hd/hd.c:5024:10:  [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(dev, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/hd.c:5482:3:  [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(hd_data_shm = hd_data->shm.data, hd_data, sizeof *hd_data);
data/hwinfo-21.70/src/hd/hd.c:5513:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    ptr = memcpy(hd_data->shm.data + hd_data->shm.used, ptr, len);
data/hwinfo-21.70/src/hd/hd.c:5913: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(name, O_RDONLY);
data/hwinfo-21.70/src/hd/hd.c:5948:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, p + xofs, size);
data/hwinfo-21.70/src/hd/hd.c:6069: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 buf[256];
data/hwinfo-21.70/src/hd/hd.c:6072:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(buf, "r");
data/hwinfo-21.70/src/hd/hd.c:6106: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(buf, O_RDONLY);
data/hwinfo-21.70/src/hd/hd.h:420: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 bitmap[16];	/**< large enough for all uses */
data/hwinfo-21.70/src/hd/hd.h:458: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 feature[5];	/**< MP feature info */
data/hwinfo-21.70/src/hd/hd.h:459: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 oem_id[9];		/**< oem id */
data/hwinfo-21.70/src/hd/hd.h:460: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 prod_id[13];		/**< product id */
data/hwinfo-21.70/src/hd/hd.h:503: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 ddc_port[4][0x80];	/**< ddc monitor info per port */
data/hwinfo-21.70/src/hd/hd.h:589: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 uuid[16];	/**< universal unique id; all 0x00: undef, all 0xff: undef but settable */
data/hwinfo-21.70/src/hd/hd.h:1035: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[256];			/**< the PCI data */
data/hwinfo-21.70/src/hd/hd.h:1056: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 edid_data[6][0x80];		/**< edid record */
data/hwinfo-21.70/src/hd/hd.h:1107: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 (*ldev_regs)[0xd0];
data/hwinfo-21.70/src/hd/hd.h:1330: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 block0[512];
data/hwinfo-21.70/src/hd/hd.h:1910: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[0x1000];
data/hwinfo-21.70/src/hd/hd.h:1913: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 pnp_id[8];
data/hwinfo-21.70/src/hd/hd.h:2316: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 hw_class_list[(hw_all + 7) / 8];	/**< (Internal) bitmask of hw classes. */
data/hwinfo-21.70/src/hd/hd.h:2681: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 probe[(pr_all + 7) / 8];	/**< (Internal) bitmask of probing features. */
data/hwinfo-21.70/src/hd/hd.h:2682: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 probe_set[(pr_all + 7) / 8];	/**< (Iternal) bitmask of probing features that will always be set. */
data/hwinfo-21.70/src/hd/hd.h:2683: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 probe_clr[(pr_all + 7) / 8];	/**< (Internal) bitmask of probing features that will always be reset. */
data/hwinfo-21.70/src/hd/hddb.c:178: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 alias[256], module[256];
data/hwinfo-21.70/src/hd/hddb.c:365: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 *mod_list[16 /* arbitrary, > 0 */];
data/hwinfo-21.70/src/hd/hddb.c:1135: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 pref_char[5] = { ' ', ' ', '&', '|', '+' };
data/hwinfo-21.70/src/hd/hddb.c:3050: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 buf[256];
data/hwinfo-21.70/src/hd/hddb.c:3077:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        s += sprintf(s, "%u", res->irq.base);
data/hwinfo-21.70/src/hd/hdp.c:49: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 buf1[32], buf2[32];
data/hwinfo-21.70/src/hd/hdp.c:81:12:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    if(!s) sprintf(s = buf1, "%u", h->module);
data/hwinfo-21.70/src/hd/hdp.c:83:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(buf2, ".%u", h->count);
data/hwinfo-21.70/src/hd/hdp.c:352:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256], c0, c1;
data/hwinfo-21.70/src/hd/hdp.c:574:31:  [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(!res->mem.enabled) strcat(buf, ",disabled");
data/hwinfo-21.70/src/hd/hdp.c:590:30:  [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(!res->io.enabled) strcat(buf, ",disabled");
data/hwinfo-21.70/src/hd/hdp.c:607:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(s, "no events");
data/hwinfo-21.70/src/hd/hdp.c:611:13:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            strcpy(s, "1 event");
data/hwinfo-21.70/src/hd/hdp.c:615:13:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
            sprintf(s, "%u events", res->irq.triggered);
data/hwinfo-21.70/src/hd/hdp.c:622:11:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
          strcat(s, "disabled");
data/hwinfo-21.70/src/hd/hdp.c:629:31:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
        if(!res->dma.enabled) strcpy(buf, " (disabled)");
data/hwinfo-21.70/src/hd/hdp.c:643: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 *s, b0[64], b1[64];
data/hwinfo-21.70/src/hd/int.c:285:3:  [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(sctrl, sctrl3, sctrl_len * sizeof *sctrl);
data/hwinfo-21.70/src/hd/isapnp.c:117: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, *t, buf[4];
data/hwinfo-21.70/src/hd/isapnp.c:241: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 s1[4], s2[100];
data/hwinfo-21.70/src/hd/isdn.c:214: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(cic0, cic, sizeof *cic0);
data/hwinfo-21.70/src/hd/isdn.c:303: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(cic0, cic, sizeof *cic0);
data/hwinfo-21.70/src/hd/kbd.c:136:20:  [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(!dev && (fd = open(DEV_CONSOLE, O_RDWR | O_NONBLOCK | O_NOCTTY)) >= 0) {
data/hwinfo-21.70/src/hd/kbd.c:193: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[OPROMMAXPARAM];
data/hwinfo-21.70/src/hd/kbd.c:198: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).
  if((fd = open(DEV_CONSOLE, O_RDWR | O_NONBLOCK | O_NOCTTY)) >= 0)
data/hwinfo-21.70/src/hd/kbd.c:211:33:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      if(ser_cons >= 0 && (fd = open(DEV_OPENPROM, O_RDWR | O_NONBLOCK)) >= 0)
data/hwinfo-21.70/src/hd/kbd.c:213:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(opio->oprom_array, "tty%c-mode", (ser_cons & 1) + 'a');
data/hwinfo-21.70/src/hd/kbd.c:254: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).
  if((fd = open(DEV_KBD, O_RDWR | O_NONBLOCK | O_NOCTTY)) >= 0)
data/hwinfo-21.70/src/hd/klog.c: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 buf[0x2000 + 1], *s;
data/hwinfo-21.70/src/hd/klog.c:128: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(s, buf + j, len);
data/hwinfo-21.70/src/hd/manual.c:214: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 path[PATH_MAX];
data/hwinfo-21.70/src/hd/mdt.c:468: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("/dev/mem", rw ? O_RDWR : O_RDONLY);
data/hwinfo-21.70/src/hd/mdt.c:494: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 buf2[0x100], tmp[0x100];
data/hwinfo-21.70/src/hd/mdt.c:500: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[64];
data/hwinfo-21.70/src/hd/mdt.c:666:21:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        if(res_bpp) sprintf(s, "+%d", res_bpp);
data/hwinfo-21.70/src/hd/mdt.c:703: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 edid[0x80];
data/hwinfo-21.70/src/hd/mdt.c:803: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(vbe->ddc_port[port], edid, sizeof *vbe->ddc_port);
data/hwinfo-21.70/src/hd/memory.c:181:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/hwinfo-21.70/src/hd/misc.c:64:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd_ser0 = open("/dev/ttyS0", O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/misc.c:65:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd_ser1 = open("/dev/ttyS1", O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/misc.c:104:10:  [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("/dev/lp0", O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/misc.c:136: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).
          fd = open(hd->unix_dev_name, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/misc.c:296: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(DEV_PSAUX, O_RDONLY | O_NONBLOCK);
data/hwinfo-21.70/src/hd/misc.c:503:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[100];
data/hwinfo-21.70/src/hd/misc.c:526:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[100];
data/hwinfo-21.70/src/hd/misc.c:552:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[100], buf2[100], *s;
data/hwinfo-21.70/src/hd/modem.c:179: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).
      if((fd = open(hd->unix_dev_name, O_RDWR | O_NONBLOCK)) >= 0) {
data/hwinfo-21.70/src/hd/modem.c:256:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char at[10];
data/hwinfo-21.70/src/hd/modem.c:272:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(at, "ATI%d\r", atx);
data/hwinfo-21.70/src/hd/modem.c:399:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char at[10];
data/hwinfo-21.70/src/hd/modem.c:405:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(at, "ATI%d\r", cmds[i]);
data/hwinfo-21.70/src/hd/modem.c:434:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[4];
data/hwinfo-21.70/src/hd/modem.c:471:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[5], *s;
data/hwinfo-21.70/src/hd/monitor.c:70: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 edid[0x80];
data/hwinfo-21.70/src/hd/monitor.c:73: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).
    if(s && (f = fopen(s, "r"))) {
data/hwinfo-21.70/src/hd/mouse.c:157: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[100];
data/hwinfo-21.70/src/hd/mouse.c:206: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(DEV_PSAUX, O_RDWR | O_NONBLOCK);
data/hwinfo-21.70/src/hd/mouse.c:254:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if((fd = open(DEV_PSAUX, O_RDONLY | O_NONBLOCK)) >= 0) {
data/hwinfo-21.70/src/hd/mouse.c:329:3:  [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).
  open(DEV_PSAUX, O_RDWR | O_NONBLOCK);
data/hwinfo-21.70/src/hd/mouse.c:353: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).
      if ((fd = open(DEV_SUNMOUSE, O_RDONLY)) != -1)
data/hwinfo-21.70/src/hd/mouse.c:397: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).
      if((fd = open(hd->unix_dev_name, O_RDWR | O_NONBLOCK)) >= 0) {
data/hwinfo-21.70/src/hd/mouse.c:468:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[4];
data/hwinfo-21.70/src/hd/mouse.c:496: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 buf[5], *s;
data/hwinfo-21.70/src/hd/mouse.c:693:3:  [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(mi->buf, fake, mi->buf_len);
data/hwinfo-21.70/src/hd/net.c:617:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(addr + 3 * i, "%02x:", phwaddr->data[i]);
data/hwinfo-21.70/src/hd/parallel.c:208: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 flush[2] = { 4, 12 };
data/hwinfo-21.70/src/hd/parallel.c:210: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("/dev/lp0", O_NONBLOCK | O_WRONLY);
data/hwinfo-21.70/src/hd/pci.c:242: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).
    if((fd = open(s, O_RDONLY)) != -1) {
data/hwinfo-21.70/src/hd/pci.c:351: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).
  if((fd = open(file, O_RDONLY)) != -1) {
data/hwinfo-21.70/src/hd/pci.c:652:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[32];
data/hwinfo-21.70/src/hd/pci.c:666:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(buf, "->%02x", pci->secondary_bus);
data/hwinfo-21.70/src/hd/pppoe.c:76: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 payload[ETH_DATA_LEN];	/* A bit of room to spare */
data/hwinfo-21.70/src/hd/pppoe.c:88: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 payload[ETH_DATA_LEN];	/* A LOT of room to spare */
data/hwinfo-21.70/src/hd/pppoe.c:103: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 my_mac[ETH_ALEN];	/* My MAC address */
data/hwinfo-21.70/src/hd/pppoe.c:104: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 peer_mac[ETH_ALEN];	/* Peer's MAC address */
data/hwinfo-21.70/src/hd/pppoe.c:211:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (conn->my_mac, ifr.ifr_hwaddr.sa_data, ETH_ALEN);
data/hwinfo-21.70/src/hd/pppoe.c:324:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (&tmp, data, len);
data/hwinfo-21.70/src/hd/pppoe.c:404:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (packet.ethHdr.h_source, conn->my_mac, ETH_ALEN);
data/hwinfo-21.70/src/hd/pppoe.c:423:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (hostUniq.payload, &pid, sizeof (pid));
data/hwinfo-21.70/src/hd/pppoe.c:426:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy (cursor, &hostUniq, sizeof (pid) + TAG_HDR_SIZE);
data/hwinfo-21.70/src/hd/pppoe.c:531:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy (conn->peer_mac, packet.ethHdr.h_source, ETH_ALEN);
data/hwinfo-21.70/src/hd/prom.c:264:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char e[0x80];
data/hwinfo-21.70/src/hd/prom.c:316:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(devtree_edid->edid, e, sizeof(e));
data/hwinfo-21.70/src/hd/prom.c:347: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[256];
data/hwinfo-21.70/src/hd/prom.c:365:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((f = fopen(PROC_PROM "/compatible", "r"))) {
data/hwinfo-21.70/src/hd/prom.c:383:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((f = fopen(PROC_PROM "/color-code", "r"))) {
data/hwinfo-21.70/src/hd/prom.c:442:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  if((f = fopen(s, "r"))) {
data/hwinfo-21.70/src/hd/prom.c:458:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  if(p) memcpy(val, p, sizeof (int));
data/hwinfo-21.70/src/hd/s390.c:36: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 attrname[128];
data/hwinfo-21.70/src/hd/s390.c: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 dirname[128];
data/hwinfo-21.70/src/hd/s390.c:38: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 linkname[128];
data/hwinfo-21.70/src/hd/s390.c:144:23:  [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).
    res->io.enabled = atoi(get_sysfs_attr(BUSNAME, curdev->d_name, "online"));
data/hwinfo-21.70/src/hd/s390.c:147: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).
    readonly = atoi(get_sysfs_attr(BUSNAME, curdev->d_name, "readonly")?:"0");
data/hwinfo-21.70/src/hd/s390.c:271:13:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            strcat(attrname, "/net");
data/hwinfo-21.70/src/hd/sbus.c:35:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[OPROMMAXPARAM];
data/hwinfo-21.70/src/hd/sbus.c:52:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[OPROMMAXPARAM];
data/hwinfo-21.70/src/hd/sbus.c:91:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[OPROMMAXPARAM];
data/hwinfo-21.70/src/hd/sbus.c: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 buf1[OPROMMAXPARAM], buf2[OPROMMAXPARAM];
data/hwinfo-21.70/src/hd/sbus.c:676: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).
  if((prom_fd = open(DEV_OPENPROM, O_RDWR | O_NONBLOCK | O_NOCTTY)) < 0)
data/hwinfo-21.70/src/hd/serial.c:35:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[4], *skip_dev[16];
data/hwinfo-21.70/src/hd/serial.c:58:23:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            case 'a': strcpy(buf, "S0"); break;
data/hwinfo-21.70/src/hd/serial.c:59:23:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
            case 'b': strcpy(buf, "S1"); break;
data/hwinfo-21.70/src/hd/serial.c:165:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/hwinfo-21.70/src/hd/smbios.c:172:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *smbios_proc_cpu_status_[8] = {
data/hwinfo-21.70/src/hd/smbios.c:683:11:  [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(sm->biosinfo.feature.bitmap, sm_data + 0xa, 8);
data/hwinfo-21.70/src/hd/smbios.c:703:11:  [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(sm->sysinfo.uuid, sm_data + 8, 16);
data/hwinfo-21.70/src/hd/smbios.c:1686: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 buf[UUID_STR_LEN];
data/hwinfo-21.70/src/hd/smbios.c:1687: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 idx[sizeof (uuid_t)] = {3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15};
data/hwinfo-21.70/src/hd/sys.c:51: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 buf0[80], *s, *t;
data/hwinfo-21.70/src/hd/sys.c:320:35:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
      if(!strcmp(st->lang, "uc")) strcpy(st->lang, "en");
data/hwinfo-21.70/src/hd/usb.c:771:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/hwinfo-21.70/src/hd/usb.c:776: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).
  if((fd = open(hd->unix_dev_name, O_RDWR)) < 0) return;
data/hwinfo-21.70/src/hd/wlan.c:76: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[sizeof(struct iw_range) * 2];    /* Large enough */
data/hwinfo-21.70/src/hd/wlan.c:102:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy((char *) range, buffer, sizeof(struct iw_range));
data/hwinfo-21.70/src/hd/wlan.c:162: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/hwinfo-21.70/src/ids/check_hd.c:355: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).
    logfh = fopen(opt.logfile, "w");
data/hwinfo-21.70/src/ids/check_hd.c:427: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).
      cfile = fopen(opt.cfile, "w");
data/hwinfo-21.70/src/ids/check_hd.c:553: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 s[4];
data/hwinfo-21.70/src/ids/check_hd.c:579:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024], fpos[256];
data/hwinfo-21.70/src/ids/check_hd.c:586: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).
  if(!(f = fopen(file, "r"))) {
data/hwinfo-21.70/src/ids/check_hd.c:1024:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(file, "w");
data/hwinfo-21.70/src/ids/check_hd.c:1061: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 pref_char[5] = { ' ', ' ', '&', '|', '+' };
data/hwinfo-21.70/src/ids/check_hd.c:1119: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 *tag_name[7] = { "", "pci ", "eisa ", "usb ", "special ", "pcmcia ", "sdio " };
data/hwinfo-21.70/src/ids/check_hd.c:1384: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, t[2];
data/hwinfo-21.70/src/ids/check_hd.c:2084:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[16];
data/hwinfo-21.70/src/ids/check_hd.c:2094:11:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
          sprintf(buf, ",%d)", cnt++);
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:103:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char stmp[4096],sstmp[4096];
data/hwinfo-21.70/src/isdn/cdb/isdn_cdb.c:168:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	line[256];
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:204:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	line[256];
data/hwinfo-21.70/src/isdn/cdbisdn.c:27:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char		cdb_date[32];
data/hwinfo-21.70/src/isdn/cdbisdn.c:29:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char		line[1024];
data/hwinfo-21.70/src/isdn/cdbisdn.c:40:8:  [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).
	cdb = fopen(CDBISDN_HWDB_FILE, "rb");
data/hwinfo-21.70/src/smp/smp.c:22:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mpf_signature[4];		/* "_MP_" 			*/
data/hwinfo-21.70/src/smp/smp.c:36:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mpc_signature[4];
data/hwinfo-21.70/src/smp/smp.c:41:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char  mpc_oem[8];
data/hwinfo-21.70/src/smp/smp.c:42:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char  mpc_productid[12];
data/hwinfo-21.70/src/smp/smp.c:78:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char mpc_bustype[6] __attribute((packed));
data/hwinfo-21.70/src/smp/smp.c:224:9:  [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).
	mem_fd=open("/dev/mem", O_RDONLY);
data/hwinfo-21.70/hwinfo.c:879: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(!strncmp(s, t, strlen(t))) {
data/hwinfo-21.70/hwinfo.c:880:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      hd_data->debug = strtol(s + strlen(t), NULL, 0);
data/hwinfo-21.70/hwinfo.c:885: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(!strncmp(s, t, strlen(t))) {
data/hwinfo-21.70/hwinfo.c:886: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).
      list = s + strlen(t);
data/hwinfo-21.70/hwinfo.c:891: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(!strncmp(s, t, strlen(t))) {
data/hwinfo-21.70/hwinfo.c:892: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).
      list = s + strlen(t);
data/hwinfo-21.70/hwinfo.c:898: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(!strncmp(s, t, strlen(t))) {
data/hwinfo-21.70/hwinfo.c:899:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      log_file = s + strlen(t);
data/hwinfo-21.70/hwinfo.c:904: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(!strncmp(s, t, strlen(t))) {
data/hwinfo-21.70/hwinfo.c:905:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      add_str_list(&hd_data->only, s + strlen(t));
data/hwinfo-21.70/hwinfo.c:910: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(!strncmp(s, t, strlen(t))) {
data/hwinfo-21.70/hwinfo.c:911:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      opt.root = s + strlen(t);
data/hwinfo-21.70/hwinfo.c:1058:12:  [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(s, "x11i=%60s", x11i) == 1) break;
data/hwinfo-21.70/hwinfo.c:1098:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(display, x11i, sizeof display - 1);
data/hwinfo-21.70/hwinfo.c:1118:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(display, di->x11.server, sizeof display - 1);
data/hwinfo-21.70/hwinfo.c:1434:8:  [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(sl->str, "vendor=%3s%n", buf, &cnt) >= 1 && !sl->str[cnt]) {
data/hwinfo-21.70/hwinfo.c:1451:8:  [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(sl->str, "subvendor=%3s%n", buf, &cnt) >= 1 && !sl->str[cnt]) {
data/hwinfo-21.70/hwinfo.c:1468:8:  [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(sl->str, "serial=%255s%n", buf, &cnt) >= 1 && !sl->str[cnt]) {
data/hwinfo-21.70/hwscan.c:453:5:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
    strcpy(status, "(");
data/hwinfo-21.70/hwscan.c:457: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).
      sprintf(status + strlen(status), "%scfg=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscan.c:462: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).
      sprintf(status + strlen(status), "%savail=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscan.c:467: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).
      sprintf(status + strlen(status), "%sneed=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscan.c:472: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).
      sprintf(status + strlen(status), "%sactive=%s", i ? ", " : "", s);
data/hwinfo-21.70/hwscan.c:476:5:  [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(status, ")");
data/hwinfo-21.70/hwscand.c:49:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if ( fd >= 0 && (r=read(fd,b,1023)) > 0 ){
data/hwinfo-21.70/hwscand.c:57:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			                else if ( strcmp("/hwscand", b+strlen(b)-8) )
data/hwinfo-21.70/hwscand.c:67:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ( ret < 0 || write(ret,buffer,strlen(buffer)) <= 0 ){
data/hwinfo-21.70/hwscand.c:102: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).
				if ( p[0] == 'S' && strlen(p) > 1 ){
data/hwinfo-21.70/hwscand.c:220:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							if (strlen(buf) > sizeof(buf) - MESSAGE_BUFFER)
data/hwinfo-21.70/hwscand.c:225:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(buf) > sizeof(buf) - MESSAGE_BUFFER) {
data/hwinfo-21.70/hwscanqueue.c:62:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat( m.mtext, device, MESSAGE_BUFFER-3 );
data/hwinfo-21.70/hwscanqueue.c:92:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        	if ( fd >= 0 && (r=read(fd,buffer,1023)) > 0 ){
data/hwinfo-21.70/hwscanqueue.c:100: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).
				else if ( strcmp("/hwscand", buffer+strlen(buffer)-8) )
data/hwinfo-21.70/src/hd/bios.c:197:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(strlen(s) >= 10) {
data/hwinfo-21.70/src/hd/bios.c:223:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(strlen(s) > 8) {
data/hwinfo-21.70/src/hd/bios.c:773:43:  [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 = canon_str(memory.data + u1, strlen(memory.data + u1));
data/hwinfo-21.70/src/hd/bios.c:1175:6:  [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(key_str) != 7) return 0;
data/hwinfo-21.70/src/hd/block.c:284:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        u2 = strlen(s);
data/hwinfo-21.70/src/hd/block.c:287: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).
            u1 = strlen(hd1->sysfs_id);
data/hwinfo-21.70/src/hd/block.c:314: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).
              !strncmp(sf_dev, sf_dev_ide, strlen(sf_dev_ide)) &&
data/hwinfo-21.70/src/hd/block.c:407: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).
    u2 = strlen(sysfs_id);
data/hwinfo-21.70/src/hd/block.c:411:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      u1 = strlen(sf->device);
data/hwinfo-21.70/src/hd/block.c:431:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(s);
data/hwinfo-21.70/src/hd/block.c:583:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strlen(hd->unix_dev_name) > 5
data/hwinfo-21.70/src/hd/block.c:602: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).
      hd->vendor.name = canon_str(sl->str, strlen(sl->str));
data/hwinfo-21.70/src/hd/block.c:604:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        hd->device.name = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/block.c:623:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      s = canon_str(sl->str, strlen(sl->str));
data/hwinfo-21.70/src/hd/block.c:773: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).
      cs = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/block.c:785: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).
    cs = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/block.c:803: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).
        t = canon_str(cs, strlen(cs));
data/hwinfo-21.70/src/hd/block.c:822: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).
    cs = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/block.c:1018:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          int i = read(fd, scsi_cmd_buf, sizeof scsi_cmd_buf - 1);
data/hwinfo-21.70/src/hd/block.c:1192:8:  [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(sl->str, "%*s %*s %*s %255s", buf) > 0) {
data/hwinfo-21.70/src/hd/block.c:1201:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    l = strlen(base);
data/hwinfo-21.70/src/hd/block.c:1215:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      is_disk = strncmp(last_name, base, strlen(last_name)) ? 1 : 0;
data/hwinfo-21.70/src/hd/block.c:1292:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, &iso_desc, sizeof iso_desc) == sizeof iso_desc
data/hwinfo-21.70/src/hd/block.c:1323:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, &sector, sizeof sector) == sizeof sector
data/hwinfo-21.70/src/hd/block.c:1334:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        read(fd, &sector, sizeof sector) == sizeof sector &&
data/hwinfo-21.70/src/hd/block.c:1371:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          read(fd, &sector, sizeof sector) == sizeof sector
data/hwinfo-21.70/src/hd/block.c:1650:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        u2 = strlen(s);
data/hwinfo-21.70/src/hd/block.c:1653: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).
            u1 = strlen(hd1->sysfs_id);
data/hwinfo-21.70/src/hd/block.c:1680: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).
      if(!hd->unix_dev_name || strlen(s) + sizeof "/dev/" - 1 < strlen(hd->unix_dev_name)) {
data/hwinfo-21.70/src/hd/block.c:1680:65:  [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(!hd->unix_dev_name || strlen(s) + sizeof "/dev/" - 1 < strlen(hd->unix_dev_name)) {
data/hwinfo-21.70/src/hd/block.c:1802:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        u2 = strlen(s);
data/hwinfo-21.70/src/hd/block.c:1805: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).
            u1 = strlen(hd1->sysfs_id);
data/hwinfo-21.70/src/hd/braille.c:168: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(WAIT_DTR);
data/hwinfo-21.70/src/hd/braille.c:171: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(WAIT_FLUSH);
data/hwinfo-21.70/src/hd/braille.c:177: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(WAIT_DTR);			/* give time to send ID string */
data/hwinfo-21.70/src/hd/braille.c:179:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if((i = read(fd, buffer, sizeof buffer)) == sizeof buffer) {
data/hwinfo-21.70/src/hd/braille.c:268: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(500000);		/* 100000 should be enough */
data/hwinfo-21.70/src/hd/braille.c:272:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  i = read(fd, &buf, 10);
data/hwinfo-21.70/src/hd/braille.c:356:5:  [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(20 * 1000);
data/hwinfo-21.70/src/hd/braille.c:361:5:  [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(40 * 1000);		/* wait for reset */
data/hwinfo-21.70/src/hd/braille.c:365:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(fd, buf, 1);
data/hwinfo-21.70/src/hd/braille.c:371:7:  [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(80 * 1000);
data/hwinfo-21.70/src/hd/braille.c:372:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      read(fd, buf + 1, 1);
data/hwinfo-21.70/src/hd/braille.c:458: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(250000);
data/hwinfo-21.70/src/hd/braille.c:462:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  i = read(fd, buf, sizeof buf - 1);
data/hwinfo-21.70/src/hd/braille.c:526: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(100 * 1000);
data/hwinfo-21.70/src/hd/braille.c:537: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(100 * 1000);
data/hwinfo-21.70/src/hd/braille.c:543: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(100 * 1000);
data/hwinfo-21.70/src/hd/braille.c:545:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  i = read(fd, retstr, 20);
data/hwinfo-21.70/src/hd/cpu.c:970:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int n_read = read(systab_fd, buffer, sizeof(buffer) - 1);
data/hwinfo-21.70/src/hd/cpu.c:976: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).
	      sscanf(s + strlen(rsd_systab), "%lx", &addr) == 1)
data/hwinfo-21.70/src/hd/cpu.c:985: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).
      if(sscanf(s + strlen(rsd_klog), "%lx", &addr) == 1) {
data/hwinfo-21.70/src/hd/hal.c:689: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).
      l = strlen(s);
data/hwinfo-21.70/src/hd/hd.c:2400: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).
  if(buf) hd_log(hd_data, buf, strlen(buf));
data/hwinfo-21.70/src/hd/hd.c:2430: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).
      offset = strlen(*buf);
data/hwinfo-21.70/src/hd/hd.c:2436: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).
        offset = strlen(*buf);
data/hwinfo-21.70/src/hd/hd.c:2447:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  *buf = resize_mem(*buf, (len = offset + strlen(b)) + 1);
data/hwinfo-21.70/src/hd/hd.c:3584:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int i, l = strlen(key);
data/hwinfo-21.70/src/hd/hd.c:3591: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).
      i = strlen(sl0->str);
data/hwinfo-21.70/src/hd/hd.c:3601: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).
      i = strlen(sl1->str);
data/hwinfo-21.70/src/hd/hd.c:3712:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(s);
data/hwinfo-21.70/src/hd/hd.c:4000:12:  [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.
      (i = sscanf(s, "%8[^:]:%8[^:]:%8[^:]:%8[^:]:%8[^:]:%60s", buf0, buf1, buf2, buf4, buf5, buf3)) >= 5 ||
data/hwinfo-21.70/src/hd/hd.c:4001:12:  [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.
      (i = sscanf(s, "%8[^:]:%8[^:]:%8[^:]:%60s", buf0, buf1, buf2, buf3)) >= 3
data/hwinfo-21.70/src/hd/hd.c:4008: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).
      if(strlen(buf1) == 3) {
data/hwinfo-21.70/src/hd/hd.c:4182:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define STR_CRC(a, b)	if(hd->b) crc64(&a, hd->b, strlen(hd->b) + 1);
data/hwinfo-21.70/src/hd/hd.c:4363:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if((k = read(fd, buf + len, buf_size - len)) > 0) len += k;
data/hwinfo-21.70/src/hd/hd.c:4803: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).
  len2 = strlen(vendor);
data/hwinfo-21.70/src/hd/hd.c:4810:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      len1 = strlen(remove[i]);
data/hwinfo-21.70/src/hd/hd.c:4818:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len2 = strlen(vendor);
data/hwinfo-21.70/src/hd/hd.c:5149: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).
  if(del) del_len = strlen(del);
data/hwinfo-21.70/src/hd/hd.c:5152:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(str0->str) len += strlen(str0->str);
data/hwinfo-21.70/src/hd/hd.c:5545: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).
  return hd_shm_add(hd_data, str, str ? strlen(str) + 1 : 0);
data/hwinfo-21.70/src/hd/hd.c:5649:8:  [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(sl->str, "P: %255s", buf) == 1) {
data/hwinfo-21.70/src/hd/hd.c:5659:8:  [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(sl->str, "N: %255s", buf) == 1) {
data/hwinfo-21.70/src/hd/hd.c:5665:8:  [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(sl->str, "S: %255s", buf) == 1) {
data/hwinfo-21.70/src/hd/hd.c:5790: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).
    crc64(&id, sl->str, strlen(sl->str) + 1);
data/hwinfo-21.70/src/hd/hd.c:6110:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while((i = read(fd, ptr, max)) > 0) max -= i, ptr += i;
data/hwinfo-21.70/src/hd/hddb.c:150:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(tag);
data/hwinfo-21.70/src/hd/hddb.c:186:8:  [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(sl->str, "alias %255s %255s", alias, module) != 2) continue;
data/hwinfo-21.70/src/hd/hddb.c:348:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          prio = s ? s - db->alias + 1 : strlen(db->alias) + 1;
data/hwinfo-21.70/src/hd/hddb.c:757:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(str);
data/hwinfo-21.70/src/hd/hddb.c:766:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(l.value);
data/hwinfo-21.70/src/hd/hddb.c:780: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).
  unsigned l = strlen(str), u;
data/hwinfo-21.70/src/hd/hddb.c:1043: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).
          s = new_mem(strlen(str) + 3);
data/hwinfo-21.70/src/hd/hddb.c:1125:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(hddb_entry_strings[ent]) + 1;
data/hwinfo-21.70/src/hd/hddb.c:2842: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).
  if(!found && strlen(info) > 1) {
data/hwinfo-21.70/src/hd/hdp.c:619:13:  [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/hwinfo-21.70/src/hd/hdp.c:1298:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(buf);
data/hwinfo-21.70/src/hd/hdp.c:1339:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(buf);
data/hwinfo-21.70/src/hd/input.c:374:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      len = strlen(s);
data/hwinfo-21.70/src/hd/input.c:383:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      handlers = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/input.c:389: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).
      key = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/input.c:396: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).
      rel = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/input.c:403: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).
      abso = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/input.c:441:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(str);
data/hwinfo-21.70/src/hd/int.c:454:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    s[strlen(s) - 1] = 'a' + i;
data/hwinfo-21.70/src/hd/int.c:459:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    s[strlen(s) - 1] = 'a' + i;
data/hwinfo-21.70/src/hd/int.c:466:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    s[strlen(s) - 1] = 'a' + i;
data/hwinfo-21.70/src/hd/int.c:521:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(str);
data/hwinfo-21.70/src/hd/int.c:522: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).
  len2 = strlen(str2);
data/hwinfo-21.70/src/hd/int.c:632:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          if(!strncmp(hd_scsi->sysfs_device_link, hd_usb->sysfs_id, strlen(hd_usb->sysfs_id))) {
data/hwinfo-21.70/src/hd/int.c:1051:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      len = strlen(sl1->str);
data/hwinfo-21.70/src/hd/int.c:1153:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          hd_sys->device.name[strlen(hd_sys->device.name) - 1] == ')'
data/hwinfo-21.70/src/hd/isapnp.c:139:10:  [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(s, "%3s%4x", buf, &u1) == 2 && (u2 = name2eisa_id(buf))) {
data/hwinfo-21.70/src/hd/isapnp.c:162:14:  [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(t, "%3s%4x", buf, &u1) == 2 && (u2 = name2eisa_id(buf))) {
data/hwinfo-21.70/src/hd/isapnp.c:170:43:  [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).
           hd->device.name = canon_str(t, strlen(t));
data/hwinfo-21.70/src/hd/isapnp.c:251:8:  [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(sl->str, "Card %d '%3s%4x:%99[^']", &card, s1, &dev_id, s2) == 4) {
data/hwinfo-21.70/src/hd/isapnp.c:281:8:  [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(sl->str, " Logical device %d '%3s%4x:%99[^']", &ldev, s1, &ldev_id, s2) == 4) {
data/hwinfo-21.70/src/hd/isapnp.c:337:14:  [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(hd && sscanf(sl->str, " Compatible device %3s%4x", s1, &cdev_id) == 2) {
data/hwinfo-21.70/src/hd/manual.c:250:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      prop->val.str = canon_str(s2, strlen(s2));
data/hwinfo-21.70/src/hd/mdt.c:543:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    vbe->oem_name = canon_str(buf2, strlen(buf2));
data/hwinfo-21.70/src/hd/mdt.c:548:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    vbe->vendor_name = canon_str(buf2, strlen(buf2));
data/hwinfo-21.70/src/hd/mdt.c:553: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).
    vbe->product_name = canon_str(buf2, strlen(buf2));
data/hwinfo-21.70/src/hd/mdt.c:558:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    vbe->product_revision = canon_str(buf2, strlen(buf2));
data/hwinfo-21.70/src/hd/memory.c:189:12:  [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(sl->str, "<%*d> BIOS-e820: %"SCNx64" - %"SCNx64" (%63s", &u0, &u1, buf) != 3) break;
data/hwinfo-21.70/src/hd/misc.c:567: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).
    while(j < (int) strlen(sl->str) && sscanf(sl->str + j, " %u %n", &k, &i) >= 1) {
data/hwinfo-21.70/src/hd/modem.c:194: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(300000);		/* PnP protocol; 200ms seems to be too fast  */
data/hwinfo-21.70/src/hd/modem.c:461:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, sm->pnp_id, 3);
data/hwinfo-21.70/src/hd/modem.c:470: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(sm->dev_id && strlen(sm->dev_id) >= 7) {
data/hwinfo-21.70/src/hd/modem.c:476:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(buf, sm->dev_id + 3, 4);
data/hwinfo-21.70/src/hd/modem.c:575:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sm->user_name = canon_str(sl->str, strlen(sl->str));
data/hwinfo-21.70/src/hd/modem.c:584:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      sm->user_name = canon_str(sl->str, strlen(sl->str));
data/hwinfo-21.70/src/hd/modem.c:667: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).
        sm->user_name = canon_str(sl->str, strlen(sl->str));
data/hwinfo-21.70/src/hd/modem.c:696: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 (200000);
data/hwinfo-21.70/src/hd/modem.c:733:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int i, len = strlen(msg);
data/hwinfo-21.70/src/hd/modem.c:771:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          if((i = read(sm->fd, sm->buf + sm->buf_len, sizeof sm->buf - sm->buf_len)) > 0)
data/hwinfo-21.70/src/hd/modem.c:967:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(mi->user_name && (l = strlen(mi->user_name)) >= 2) {
data/hwinfo-21.70/src/hd/mouse.c:108:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    (k = read(fd, buf + len, buf_size - len)) >= 0
data/hwinfo-21.70/src/hd/mouse.c:217:9:  [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(25000);
data/hwinfo-21.70/src/hd/mouse.c:223:11:  [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(50000);        /* ...give it a chance to react... */
data/hwinfo-21.70/src/hd/mouse.c:234:15:  [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(50000);
data/hwinfo-21.70/src/hd/mouse.c:263:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(fd, buf, sizeof buf);
data/hwinfo-21.70/src/hd/mouse.c:422: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(300000);		/* PnP protocol */
data/hwinfo-21.70/src/hd/mouse.c:441:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          if((j = read(sm->fd, sm->buf + sm->buf_len, max_len - sm->buf_len)) > 0)
data/hwinfo-21.70/src/hd/mouse.c:480:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf, sm->pnp_id, 3);
data/hwinfo-21.70/src/hd/mouse.c:495:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(sm->dev_id && strlen(sm->dev_id) >= 7) {
data/hwinfo-21.70/src/hd/mouse.c:501:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, sm->dev_id + 3, 4);
data/hwinfo-21.70/src/hd/mouse.c:565: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(100000);
data/hwinfo-21.70/src/hd/net.c:105:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      hw_addr = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/net.c:134: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).
    if(hw_addr && strspn(hw_addr, "0:") != strlen(hw_addr)) {
data/hwinfo-21.70/src/hd/net.c:459:6:  [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(hd->unix_dev_name) > sizeof ifr.ifr_name - 1) return;
data/hwinfo-21.70/src/hd/net.c:531:6:  [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(hd->unix_dev_name) > sizeof ifr.ifr_name - 1) return;
data/hwinfo-21.70/src/hd/net.c:565:6:  [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(hd->unix_dev_name) > sizeof ifr.ifr_name - 1) return;
data/hwinfo-21.70/src/hd/net.c:603:6:  [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(hd->unix_dev_name) > sizeof ifr.ifr_name - 1) return res;
data/hwinfo-21.70/src/hd/net.c:624:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(addr && strspn(addr, "0:") != strlen(addr)) {
data/hwinfo-21.70/src/hd/pci.c:185:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      pci->modalias = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:222:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      pci->label = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:243:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      pci->data_len = pci->data_ext_len = read(fd, pci->data, 0x40);
data/hwinfo-21.70/src/hd/pci.c:353:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      pci->edid_len[index] = read(fd, pci->edid_data[index], sizeof pci->edid_data[index]);
data/hwinfo-21.70/src/hd/pci.c:638:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if(read(fd, &uc, 1) != 1) return 0;
data/hwinfo-21.70/src/hd/pci.c:733:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      macio_name = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:738:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      macio_type = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:743:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      macio_compat = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:748:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      macio_modalias = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:837:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      vio_devspec = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:842:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      vio_name = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:847:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      vio_modalias = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:965:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      platform_type = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:1102:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      int len = strlen(modalias);
data/hwinfo-21.70/src/hd/pci.c:1207:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      ps3_name = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:1339:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      modalias = canon_str(modalias, strlen(modalias));
data/hwinfo-21.70/src/hd/pci.c:1439:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      xen_type = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:1444:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      xen_node = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pci.c:1666:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      modalias = canon_str(modalias, strlen(modalias));
data/hwinfo-21.70/src/hd/pci.c:1853:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      modalias = canon_str(modalias, strlen(modalias));
data/hwinfo-21.70/src/hd/pci.c:1863:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      mmc_type = canon_str(mmc_type, strlen(mmc_type));
data/hwinfo-21.70/src/hd/pci.c:1935:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      modalias = canon_str(modalias, strlen(modalias));
data/hwinfo-21.70/src/hd/pci.c:2020:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      modalias = canon_str(modalias, strlen(modalias));
data/hwinfo-21.70/src/hd/pcmcia.c:99:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      hd->modalias = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pcmcia.c:126: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).
      prod1 = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pcmcia.c:132: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).
      prod2 = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pcmcia.c:138: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).
      prod3 = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pcmcia.c:144: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).
      prod4 = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/pppoe.c:205:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (ifr.ifr_name, conn->ifname, sizeof (ifr.ifr_name) - 1);
data/hwinfo-21.70/src/hd/pppoe.c:224:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (ifr.ifr_name, conn->ifname, sizeof (ifr.ifr_name) - 1);
data/hwinfo-21.70/src/hd/pppoe.c:235:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (ifr.ifr_name, conn->ifname, sizeof (ifr.ifr_name) - 1);
data/hwinfo-21.70/src/hd/pppoe.c:248:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy (ifr.ifr_name, conn->ifname, sizeof (ifr.ifr_name) - 1);
data/hwinfo-21.70/src/hd/serial.c:192:9:  [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.
        sscanf(sl->str, "%u: uart:%31s port:%x irq:%u baud:%u", &u0, buf, &u1, &u2, &u3) == 5 ||
data/hwinfo-21.70/src/hd/serial.c:193:17:  [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.
        (i = 1, sscanf(sl->str, "%u: uart:%31s port:%x irq:%u tx:%u", &u0, buf, &u1, &u2, &u3) == 5)
data/hwinfo-21.70/src/hd/usb.c:137: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).
        s = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/usb.c:164:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      u2 = strlen(sf_dev);
data/hwinfo-21.70/src/hd/usb.c:167:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        u1 = strlen(sl->str);
data/hwinfo-21.70/src/hd/usb.c:205:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            usb->manufact = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/usb.c:210: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).
            usb->product = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/usb.c:215:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            usb->serial = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/usb.c:225:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            s = canon_str(s, strlen(s));
data/hwinfo-21.70/src/hd/usb.c:290:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      u2 = strlen(s);
data/hwinfo-21.70/src/hd/usb.c:298:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            l = strlen(s1);
data/hwinfo-21.70/src/hd/usb.c:305: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).
          u1 = strlen(s1);
data/hwinfo-21.70/src/hd/wlan.c:66:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(pwrq->ifr_name, ifname, IFNAMSIZ - 1);
data/hwinfo-21.70/src/ids/check_hd.c:759:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(str);
data/hwinfo-21.70/src/ids/check_hd.c:768:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  i = strlen(l.value);
data/hwinfo-21.70/src/ids/check_hd.c:982: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).
          s = new_mem(strlen(val) + 3);
data/hwinfo-21.70/src/ids/check_hd.c:996: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).
            s2 = new_mem(strlen(s1) + strlen(s) + 2);
data/hwinfo-21.70/src/ids/check_hd.c:996:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            s2 = new_mem(strlen(s1) + strlen(s) + 2);
data/hwinfo-21.70/src/ids/check_hd.c:1097:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = item_ind ? strlen(item_ind) : 0;
data/hwinfo-21.70/src/ids/check_hd.c:1109: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).
  len += strlen(hddb_entry_strings[ent]) + 1;
data/hwinfo-21.70/src/ids/check_hd.c:1389:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len += strlen(str0->str) + 1;
data/hwinfo-21.70/src/ids/check_hd.c:2093:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(item->pos && (l = strlen(item->pos))) {
data/hwinfo-21.70/src/ids/check_hd.c:2095:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
          new_item->pos = new_mem(l - 1 + strlen(buf) + 1);
data/hwinfo-21.70/src/ids/check_hd.c:2653: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).
  unsigned l = strlen(str), u;
data/hwinfo-21.70/src/ids/check_hd.c:2894: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).
  qstr_len = qstr ? strlen(qstr) : 0;
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:86:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			p += strlen(p) +1;
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:95:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	l = strlen(str) +1;
data/hwinfo-21.70/src/isdn/cdb/cdb_read.c:122:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(stmp, list, 4096 - 1);
data/hwinfo-21.70/src/isdn/cdb/isdn_cdb.c:228:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	l = strlen(line);
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:25:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		l = strlen(p);
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:39:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	nullidx = strlen(name_str); /* first 0 in string array */
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:63:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	nullidx = strlen(name_str); /* first 0 in string array */
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:110:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	nullidx = strlen(name_str); /* first 0 in string array */
data/hwinfo-21.70/src/isdn/cdb/mk_isdnhwdb.c:276:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	l = strlen(line);
data/hwinfo-21.70/src/isdn/cdbisdn.c:61:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				l = strlen(s + 4);
data/hwinfo-21.70/src/isdn/cdbisdn.c:67:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(cdb_date, s + 4, l);
data/hwinfo-21.70/src/isdn/cdbisdn.c:84:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				l = strlen(s + 4);
data/hwinfo-21.70/src/isdn/cdbisdn.c:261:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(cdb_date, CDBISDN_DATE, 31);

ANALYSIS SUMMARY:

Hits = 643
Lines analyzed = 55916 in approximately 1.71 seconds (32665 lines/second)
Physical Source Lines of Code (SLOC) = 45082
Hits@level = [0] 767 [1] 248 [2] 298 [3]  17 [4]  75 [5]   5
Hits@level+ = [0+] 1410 [1+] 643 [2+] 395 [3+]  97 [4+]  80 [5+]   5
Hits/KSLOC@level+ = [0+] 31.2763 [1+] 14.2629 [2+] 8.76181 [3+] 2.15163 [4+] 1.77454 [5+] 0.110909
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.