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/tgt-1.0.80/usr/be_byteshift.h
Examining data/tgt-1.0.80/usr/bs.c
Examining data/tgt-1.0.80/usr/bs_aio.c
Examining data/tgt-1.0.80/usr/bs_aio.h
Examining data/tgt-1.0.80/usr/bs_null.c
Examining data/tgt-1.0.80/usr/bs_rbd.c
Examining data/tgt-1.0.80/usr/bs_rdwr.c
Examining data/tgt-1.0.80/usr/bs_sg.c
Examining data/tgt-1.0.80/usr/bs_sheepdog.c
Examining data/tgt-1.0.80/usr/bs_ssc.c
Examining data/tgt-1.0.80/usr/bs_ssc.h
Examining data/tgt-1.0.80/usr/bs_thread.h
Examining data/tgt-1.0.80/usr/bsg.h
Examining data/tgt-1.0.80/usr/concat_buf.c
Examining data/tgt-1.0.80/usr/crc32c.h
Examining data/tgt-1.0.80/usr/driver.c
Examining data/tgt-1.0.80/usr/driver.h
Examining data/tgt-1.0.80/usr/iscsi/chap.c
Examining data/tgt-1.0.80/usr/iscsi/conn.c
Examining data/tgt-1.0.80/usr/iscsi/iscsi_if.h
Examining data/tgt-1.0.80/usr/iscsi/iscsi_proto.h
Examining data/tgt-1.0.80/usr/iscsi/iscsi_tcp.c
Examining data/tgt-1.0.80/usr/iscsi/iscsid.c
Examining data/tgt-1.0.80/usr/iscsi/iscsid.h
Examining data/tgt-1.0.80/usr/iscsi/iser.c
Examining data/tgt-1.0.80/usr/iscsi/iser.h
Examining data/tgt-1.0.80/usr/iscsi/iser_text.c
Examining data/tgt-1.0.80/usr/iscsi/isns.c
Examining data/tgt-1.0.80/usr/iscsi/isns_proto.h
Examining data/tgt-1.0.80/usr/iscsi/md5.c
Examining data/tgt-1.0.80/usr/iscsi/md5.h
Examining data/tgt-1.0.80/usr/iscsi/param.c
Examining data/tgt-1.0.80/usr/iscsi/param.h
Examining data/tgt-1.0.80/usr/iscsi/session.c
Examining data/tgt-1.0.80/usr/iscsi/sha1.c
Examining data/tgt-1.0.80/usr/iscsi/sha1.h
Examining data/tgt-1.0.80/usr/iscsi/target.c
Examining data/tgt-1.0.80/usr/iscsi/transport.c
Examining data/tgt-1.0.80/usr/iscsi/transport.h
Examining data/tgt-1.0.80/usr/libcrc32c.c
Examining data/tgt-1.0.80/usr/libssc.c
Examining data/tgt-1.0.80/usr/libssc.h
Examining data/tgt-1.0.80/usr/list.h
Examining data/tgt-1.0.80/usr/log.c
Examining data/tgt-1.0.80/usr/log.h
Examining data/tgt-1.0.80/usr/media.h
Examining data/tgt-1.0.80/usr/mgmt.c
Examining data/tgt-1.0.80/usr/mmc.c
Examining data/tgt-1.0.80/usr/osd.c
Examining data/tgt-1.0.80/usr/parser.c
Examining data/tgt-1.0.80/usr/parser.h
Examining data/tgt-1.0.80/usr/sbc.c
Examining data/tgt-1.0.80/usr/scc.c
Examining data/tgt-1.0.80/usr/scsi.c
Examining data/tgt-1.0.80/usr/scsi.h
Examining data/tgt-1.0.80/usr/scsi_cmnd.h
Examining data/tgt-1.0.80/usr/smc.c
Examining data/tgt-1.0.80/usr/smc.h
Examining data/tgt-1.0.80/usr/spc.c
Examining data/tgt-1.0.80/usr/spc.h
Examining data/tgt-1.0.80/usr/ssc.c
Examining data/tgt-1.0.80/usr/ssc.h
Examining data/tgt-1.0.80/usr/target.c
Examining data/tgt-1.0.80/usr/target.h
Examining data/tgt-1.0.80/usr/tgtadm.c
Examining data/tgt-1.0.80/usr/tgtadm.h
Examining data/tgt-1.0.80/usr/tgtadm_error.h
Examining data/tgt-1.0.80/usr/tgtd.c
Examining data/tgt-1.0.80/usr/tgtd.h
Examining data/tgt-1.0.80/usr/tgtimg.c
Examining data/tgt-1.0.80/usr/util.c
Examining data/tgt-1.0.80/usr/util.h
Examining data/tgt-1.0.80/usr/work.c
Examining data/tgt-1.0.80/usr/work.h
Examining data/tgt-1.0.80/usr/bs_glfs.c

FINAL RESULTS:

data/tgt-1.0.80/usr/bs_rbd.c:572:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(libvir_uuid_file_path_buf, virsecretuuid);
data/tgt-1.0.80/usr/bs_sg.c:322:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	sscanf(path, "/dev/bsg/%s", tmp);
data/tgt-1.0.80/usr/bs_sg.c:323:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dev, "/sys/class/bsg/%s/dev", tmp);
data/tgt-1.0.80/usr/bs_sheepdog.c:1262: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(filename, orig_filename);
data/tgt-1.0.80/usr/concat_buf.c:44:14:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		nprinted = vfprintf(b->streamf, format, args);
data/tgt-1.0.80/usr/iscsi/iscsid.c:194: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(buffer, key);
data/tgt-1.0.80/usr/iscsi/iscsid.c:197: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(buffer, value);
data/tgt-1.0.80/usr/iscsi/iscsid.c:2455:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(buf + 4, "%s", session->initiator);
data/tgt-1.0.80/usr/iscsi/iser_text.c:128: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(buffer, key);
data/tgt-1.0.80/usr/iscsi/iser_text.c:131: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(buffer, value);
data/tgt-1.0.80/usr/iscsi/isns.c:319: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(mgmt->name, EID_NAME_KEY);
data/tgt-1.0.80/usr/iscsi/session.c:118:2:  [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(session->info, 1024, _TAB3 "Initiator: %s alias: %s\n"
data/tgt-1.0.80/usr/iscsi/target.c:285:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		p += sprintf(p, "%s ", target->redirect_info.callback);
data/tgt-1.0.80/usr/iscsi/target.c:286:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		p += sprintf(p, "%s ", tgt_targetname(target->tid));
data/tgt-1.0.80/usr/iscsi/target.c:291:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(p, "%s", dst);
data/tgt-1.0.80/usr/iscsi/target.c:341:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, "%s:%s", addr, port);
data/tgt-1.0.80/usr/log.c:39:36:  [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 logdbg(file, fmt, args...) fprintf(file, fmt, ##args)
data/tgt-1.0.80/usr/log.c:189:2:  [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(buff, MAX_MSG_SIZE, fmt, ap);
data/tgt-1.0.80/usr/log.c:292:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/tgt-1.0.80/usr/log.h:69:26:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__ ((format (printf, 1, 2)));
data/tgt-1.0.80/usr/log.h:71:26:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__ ((format (printf, 1, 2)));
data/tgt-1.0.80/usr/log.h:73:26:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__ ((format (printf, 1, 2)));
data/tgt-1.0.80/usr/log.h:78:2:  [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(stderr, "%s: " fmt, program_name, ##args);		\
data/tgt-1.0.80/usr/log.h:84:3:  [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(stderr, "%s %d: " fmt,				\
data/tgt-1.0.80/usr/mgmt.c:777:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(mgmt_lock_path, "%s.%d.lock", path, control_port);
data/tgt-1.0.80/usr/mgmt.c:809: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(addr.sun_path, mgmt_path);
data/tgt-1.0.80/usr/smc.c:740: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(s->barcode, tmp->barcode);
data/tgt-1.0.80/usr/smc.c:741: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(s->volume_tag, tmp->volume_tag);
data/tgt-1.0.80/usr/spc.c:2106:2:  [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(lu->attrs.scsi_id, sizeof(lu->attrs.scsi_id),
data/tgt-1.0.80/usr/spc.c:2108:2:  [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(lu->attrs.scsi_sn, sizeof(lu->attrs.scsi_sn),
data/tgt-1.0.80/usr/tgtadm.c:231: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(addr.sun_path, mgmt_path);
data/tgt-1.0.80/usr/tgtd.c:369:3:  [4] (shell) execv:
  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.
		execv(argv[0], argv);
data/tgt-1.0.80/usr/tgtimg.c:265: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(capacity, "%" SCNu64, &size);
data/tgt-1.0.80/usr/tgtimg.c:301:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf((char *)mi.medium_serial_number, "%s_%d", barcode,
data/tgt-1.0.80/usr/tgtimg.c:303:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf((char *)mi.barcode, "%-31s", barcode);
data/tgt-1.0.80/usr/tgtimg.c:304:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf((char *)current_media, "%s", barcode);
data/tgt-1.0.80/usr/util.c:54:7:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
		if (sscanf(buf, "%d %s", &major, name) != 2)
data/tgt-1.0.80/usr/util.h:247:3:  [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(buf, sizeof(buf), format, ## __VA_ARGS__); \
data/tgt-1.0.80/usr/mgmt.c:771:14:  [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 ((path = getenv("TGT_IPC_SOCKET")) == NULL) {
data/tgt-1.0.80/usr/tgtadm.c:222:14:  [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 ((path = getenv("TGT_IPC_SOCKET")) == NULL)
data/tgt-1.0.80/usr/tgtadm.c:488:15:  [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 ((ch = getopt_long(argc, argv, short_options,
data/tgt-1.0.80/usr/tgtadm.c:527:15:  [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 ((ch = getopt_long(argc, argv, short_options,
data/tgt-1.0.80/usr/tgtd.c:569:15:  [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 ((ch = getopt_long(argc, argv, short_options, long_options,
data/tgt-1.0.80/usr/tgtimg.c:509:15:  [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 ((ch = getopt_long(argc, argv, short_options,
data/tgt-1.0.80/usr/bs_glfs.c:527:15:  [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).
			loglevel = atoi(sloglevel);
data/tgt-1.0.80/usr/bs_rbd.c:522: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 disc_cephx_key[256];
data/tgt-1.0.80/usr/bs_rbd.c:524: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 clientid_full[128];
data/tgt-1.0.80/usr/bs_rbd.c:571: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 libvir_uuid_file_path_buf[256] = "/etc/libvirt/secrets/";
data/tgt-1.0.80/usr/bs_rbd.c:573:3:  [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(libvir_uuid_file_path_buf, ".base64");
data/tgt-1.0.80/usr/bs_rbd.c:576: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(libvir_uuid_file_path_buf , "r");
data/tgt-1.0.80/usr/bs_sg.c:319: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 dev[64];
data/tgt-1.0.80/usr/bs_sg.c:320: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 tmp[16];
data/tgt-1.0.80/usr/bs_sg.c:324:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	devfd = fopen(dev, "r");
data/tgt-1.0.80/usr/bs_sg.c:392: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 cmd[6];
data/tgt-1.0.80/usr/bs_sg.c:393: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 resp[36];
data/tgt-1.0.80/usr/bs_sg.c:452: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).
	sg_fd = open(path, O_RDWR);
data/tgt-1.0.80/usr/bs_sheepdog.c:234: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 name[SD_MAX_VDI_LEN];
data/tgt-1.0.80/usr/bs_sheepdog.c:235: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 tag[SD_MAX_VDI_TAG_LEN];
data/tgt-1.0.80/usr/bs_sheepdog.c:270: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 hostname[HOST_NAME_MAX + 1];
data/tgt-1.0.80/usr/bs_sheepdog.c:274: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 uds_path[UNIX_PATH_MAX];
data/tgt-1.0.80/usr/bs_sheepdog.c:378: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 hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
data/tgt-1.0.80/usr/bs_sheepdog.c:381: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 port_s[6];
data/tgt-1.0.80/usr/bs_sheepdog.c:661: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 tag[SD_MAX_VDI_TAG_LEN];
data/tgt-1.0.80/usr/bs_sheepdog.c:1084: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 buf[SD_MAX_VDI_LEN + SD_MAX_VDI_TAG_LEN];
data/tgt-1.0.80/usr/bs_sheepdog.c:1129: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 vdi_name[SD_MAX_VDI_LEN + 1];
data/tgt-1.0.80/usr/bs_sheepdog.c:1192:15:  [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).
			ai->port = atoi(result);
data/tgt-1.0.80/usr/bs_ssc.c:54: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(cmd->sense_buffer + 3, info, 4);
data/tgt-1.0.80/usr/bs_ssc.c:153: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(&ssc->c_blk, eod, sizeof(*eod));
data/tgt-1.0.80/usr/iscsi/chap.c:175: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(strptr, "%.2hhx", intnum[i]);
data/tgt-1.0.80/usr/iscsi/chap.c:336: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 text[CHAP_CHALLENGE_MAX * 2 + 8];
data/tgt-1.0.80/usr/iscsi/chap.c:359:2:  [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(text, "%u", (unsigned char)conn->auth.chap.id);
data/tgt-1.0.80/usr/iscsi/chap.c:374:2:  [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(p, "0x");
data/tgt-1.0.80/usr/iscsi/chap.c:378: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(p, "%.2hhx", conn->auth.chap.challenge[i]);
data/tgt-1.0.80/usr/iscsi/chap.c:391: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 pass[ISCSI_NAME_LEN];
data/tgt-1.0.80/usr/iscsi/chap.c:494: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 pass[ISCSI_NAME_LEN], name[ISCSI_NAME_LEN];
data/tgt-1.0.80/usr/iscsi/iscsi_if.h:263: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 desc[ISCSI_STATS_CUSTOM_DESC_MAX];
data/tgt-1.0.80/usr/iscsi/iscsi_tcp.c:295: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 servname[64];
data/tgt-1.0.80/usr/iscsi/iscsi_tcp.c:298: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 addrstr[64];
data/tgt-1.0.80/usr/iscsi/iscsi_tcp.c:552: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 dst[INET6_ADDRSTRLEN];
data/tgt-1.0.80/usr/iscsi/iscsid.c:322: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[32];
data/tgt-1.0.80/usr/iscsi/iscsid.c:401: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 buf[32];
data/tgt-1.0.80/usr/iscsi/iscsid.c:439: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 buf[NI_MAXHOST + NI_MAXSERV + 4];
data/tgt-1.0.80/usr/iscsi/iscsid.c:443: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->isid, req->isid, sizeof(req->isid));
data/tgt-1.0.80/usr/iscsi/iscsid.c:663: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->rsp.data, &conn->req.bhs, BHS_SIZE);
data/tgt-1.0.80/usr/iscsi/iscsid.c:846: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 *p, buf[NI_MAXHOST + 128];
data/tgt-1.0.80/usr/iscsi/iscsid.c:892: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(p, ":%d,1", port);
data/tgt-1.0.80/usr/iscsi/iscsid.c:1216: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(&task->req, req, sizeof(*req));
data/tgt-1.0.80/usr/iscsi/iscsid.c:1337:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(p, req->cdb, sizeof(req->cdb));
data/tgt-1.0.80/usr/iscsi/iscsid.c:2459: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.
	p += sprintf(p, ",i,0x");
data/tgt-1.0.80/usr/iscsi/iscsid.c:2461:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(p, session->isid, sizeof(session->isid));
data/tgt-1.0.80/usr/iscsi/iscsid.c:2493:12:  [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).
				port = atoi(q + 1);
data/tgt-1.0.80/usr/iscsi/iscsid.c:2507: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(tmp, addr, len);
data/tgt-1.0.80/usr/iscsi/iscsid.c:2520:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			iscsi_set_nop_interval(atoi(p+13));
data/tgt-1.0.80/usr/iscsi/iscsid.c:2522:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			iscsi_set_nop_count(atoi(p+10));
data/tgt-1.0.80/usr/iscsi/iscsid.h:196: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 rx_digest[4];
data/tgt-1.0.80/usr/iscsi/iscsid.h:197: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 tx_digest[4];
data/tgt-1.0.80/usr/iscsi/iscsid.h:266: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 addr[NI_MAXHOST + 1];
data/tgt-1.0.80/usr/iscsi/iscsid.h:267: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 port[NI_MAXSERV + 1];
data/tgt-1.0.80/usr/iscsi/iser.c:1396: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 host[NI_MAXHOST];
data/tgt-1.0.80/usr/iscsi/iser.c:1430: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(sa, &conn->self_addr, *len);
data/tgt-1.0.80/usr/iscsi/iser.c:1441: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(sa, &conn->peer_addr, *len);
data/tgt-1.0.80/usr/iscsi/iser.c:2033:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, cur_buf->addr, cur_buf->size);
data/tgt-1.0.80/usr/iscsi/iser.c:2117: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(sense->data, scmd->sense_buffer, sense_len);
data/tgt-1.0.80/usr/iscsi/iser.c:2342:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(p, req_bhs->cdb, sizeof(req_bhs->cdb));
data/tgt-1.0.80/usr/iscsi/iser.c:2344:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(p, ahs_extcdb->ecdb, extcdb_len);
data/tgt-1.0.80/usr/iscsi/iser.c:3427: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 servname[64];
data/tgt-1.0.80/usr/iscsi/iser.c:3615:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			buf_pool_sz_mb = atoi(q);
data/tgt-1.0.80/usr/iscsi/iser.c:3621:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			membuf_size = atoi(q);
data/tgt-1.0.80/usr/iscsi/iser.c:3628: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).
			cq_vector = atoi(q);
data/tgt-1.0.80/usr/iscsi/iser_text.c:261: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[32];
data/tgt-1.0.80/usr/iscsi/iser_text.c:338: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 buf[32];
data/tgt-1.0.80/usr/iscsi/iser_text.c:380: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(&fake_iscsi_conn, iscsi_conn, sizeof(*iscsi_conn));
data/tgt-1.0.80/usr/iscsi/iser_text.c:393:10:  [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(iscsi_conn, &fake_iscsi_conn, sizeof(*iscsi_conn));
data/tgt-1.0.80/usr/iscsi/iser_text.c:418: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 buf[NI_MAXHOST + NI_MAXSERV + 4];
data/tgt-1.0.80/usr/iscsi/iser_text.c:422: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(iscsi_conn->isid, req_bhs->isid, sizeof(req_bhs->isid));
data/tgt-1.0.80/usr/iscsi/iser_text.c:832: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 *p, buf[NI_MAXHOST + 128];
data/tgt-1.0.80/usr/iscsi/iser_text.c:866: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(p, ":%d,1", port);
data/tgt-1.0.80/usr/iscsi/isns.c:55: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 name[ISCSI_NAME_LEN];
data/tgt-1.0.80/usr/iscsi/isns.c:61: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 name[ISCSI_NAME_LEN];
data/tgt-1.0.80/usr/iscsi/isns.c:73: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 eid[ISCSI_NAME_LEN];
data/tgt-1.0.80/usr/iscsi/isns.c:99: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 isns_addr[NI_MAXHOST];
data/tgt-1.0.80/usr/iscsi/isns.c:194: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((*tlv)->value, value, length);
data/tgt-1.0.80/usr/iscsi/isns.c:216: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 buf[2048];
data/tgt-1.0.80/usr/iscsi/isns.c:259: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 buf[4096];
data/tgt-1.0.80/usr/iscsi/isns.c:299: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 buf[4096];
data/tgt-1.0.80/usr/iscsi/isns.c:345: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 buf[4096];
data/tgt-1.0.80/usr/iscsi/isns.c:398: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 buf[4096];
data/tgt-1.0.80/usr/iscsi/isns.c:523: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 buf[4096];
data/tgt-1.0.80/usr/iscsi/isns.c:664: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.
	static char iscsi_name[224];
data/tgt-1.0.80/usr/iscsi/isns.c:840: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 buf[1024];
data/tgt-1.0.80/usr/iscsi/isns.c:985: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 p[8];
data/tgt-1.0.80/usr/iscsi/isns.c:997: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(&ss, res->ai_addr, sizeof(*res->ai_addr));
data/tgt-1.0.80/usr/iscsi/isns.c:1027: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 buf[4096];
data/tgt-1.0.80/usr/iscsi/isns.c:1123: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 tmp[16];
data/tgt-1.0.80/usr/iscsi/md5.c:74: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((md5byte *)ctx->in + 64 - t, buf, len);
data/tgt-1.0.80/usr/iscsi/md5.c:78: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((md5byte *)ctx->in + 64 - t, buf, t);
data/tgt-1.0.80/usr/iscsi/md5.c:86: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(ctx->in, buf, 64);
data/tgt-1.0.80/usr/iscsi/md5.c:94:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ctx->in, buf, len);
data/tgt-1.0.80/usr/iscsi/md5.c:129: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(digest, ctx->buf, 16);
data/tgt-1.0.80/usr/iscsi/md5.h:52:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void MD5Final(unsigned char digest[16], struct MD5Context *context);
data/tgt-1.0.80/usr/iscsi/param.c:51:2:  [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(str, "%u", val);
data/tgt-1.0.80/usr/iscsi/param.c:67:3:  [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(str, "No");
data/tgt-1.0.80/usr/iscsi/param.c:70:3:  [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(str, "Yes");
data/tgt-1.0.80/usr/iscsi/param.c:170:3:  [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(str, "CRC32C");
data/tgt-1.0.80/usr/iscsi/param.c:172:3:  [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(str, "None");
data/tgt-1.0.80/usr/iscsi/param.c:216:3:  [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(str, "Irrelevant");
data/tgt-1.0.80/usr/iscsi/param.c:218:3:  [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(str, "Reject");
data/tgt-1.0.80/usr/iscsi/session.c:71: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 addr[128];
data/tgt-1.0.80/usr/iscsi/sha1.c:118: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(&sctx->buffer[j], data, (i = 64-j));
data/tgt-1.0.80/usr/iscsi/sha1.c:126: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(&sctx->buffer[j], &data[i], len - i);
data/tgt-1.0.80/usr/iscsi/target.c:274: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[NI_MAXHOST + NI_MAXSERV + 4];
data/tgt-1.0.80/usr/iscsi/target.c:275: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 dst[INET6_ADDRSTRLEN], in_buf[1024];
data/tgt-1.0.80/usr/iscsi/target.c:558:5:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				atoi(&name[10]));
data/tgt-1.0.80/usr/iscsi/target.c:564:5:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				atoi(&name[13]));
data/tgt-1.0.80/usr/iscsi/target.c:590: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 value[64];
data/tgt-1.0.80/usr/iscsi/target.c:635: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 addr[128];
data/tgt-1.0.80/usr/libssc.c:41: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((i)->member, (m)->member, sizeof((m)->member));\
data/tgt-1.0.80/usr/libssc.c:116: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((m)->member, (i)->member, sizeof((m)->member));\
data/tgt-1.0.80/usr/log.c:178: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 buff[MAX_MSG_SIZE];
data/tgt-1.0.80/usr/log.c:214: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((void *)&msg->str, buff, len);
data/tgt-1.0.80/usr/log.c:240: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(dst, src,  len);
data/tgt-1.0.80/usr/mgmt.c:66:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char mgmt_path[256];
data/tgt-1.0.80/usr/mgmt.c:67:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char mgmt_lock_path[256];
data/tgt-1.0.80/usr/mgmt.c:778: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).
	ipc_lock_fd = open(mgmt_lock_path, O_WRONLY | O_CREAT,
data/tgt-1.0.80/usr/mmc.c:277: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(scsi_get_in_buffer(cmd), data,
data/tgt-1.0.80/usr/mmc.c:298: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 buf[34];
data/tgt-1.0.80/usr/mmc.c:458: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(scsi_get_in_buffer(cmd), buf,
data/tgt-1.0.80/usr/mmc.c:855: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(data, vpd_pg->data, 8);
data/tgt-1.0.80/usr/mmc.c:968: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 buf[1024];
data/tgt-1.0.80/usr/mmc.c:1012: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(scsi_get_in_buffer(cmd), buf,
data/tgt-1.0.80/usr/mmc.c:1360: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 buf[4096];
data/tgt-1.0.80/usr/mmc.c:1394: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(scsi_get_in_buffer(cmd), buf,
data/tgt-1.0.80/usr/mmc.c:1409: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 buf[12];
data/tgt-1.0.80/usr/mmc.c:1449: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(scsi_get_in_buffer(cmd), buf,
data/tgt-1.0.80/usr/mmc.c:1733: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 buf[256];
data/tgt-1.0.80/usr/mmc.c:1765: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(scsi_get_in_buffer(cmd), buf,
data/tgt-1.0.80/usr/mmc.c:2116: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 buf[4096];
data/tgt-1.0.80/usr/mmc.c:2149:4:  [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(scsi_get_in_buffer(cmd), buf,
data/tgt-1.0.80/usr/parser.c:136: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(buf, s->from, s->to - s->from);
data/tgt-1.0.80/usr/scsi.c:42:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char scsi_command_size[8] = {6, 10, 10, 12, 16, 12, 10, 10};
data/tgt-1.0.80/usr/scsi.c:62:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const unsigned char usage[16];
data/tgt-1.0.80/usr/scsi_cmnd.h:47: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 sense_buffer[SCSI_SENSE_BUFFERSIZE];
data/tgt-1.0.80/usr/smc.c:185: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[sizeof(attr->scsi_sn) + 1];
data/tgt-1.0.80/usr/smc.c:188:4:  [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 *)&data[i + 28], buf, 10);
data/tgt-1.0.80/usr/smc.c:399: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(scsi_get_in_buffer(cmd), data, min(len, alloc_len));
data/tgt-1.0.80/usr/smc.c:469: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(&dest_slot->barcode, &src_slot->barcode, sizeof(s->barcode));
data/tgt-1.0.80/usr/smc.c:470: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(&dest_slot->volume_tag, &src_slot->volume_tag,
data/tgt-1.0.80/usr/smc.c:473: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[128];
data/tgt-1.0.80/usr/smc.c:768: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 buf[256];
data/tgt-1.0.80/usr/smc.c:779:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			sv_param.element_type = atoi(buf);
data/tgt-1.0.80/usr/smc.c:783:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			sv_param.start_addr = atoi(buf);
data/tgt-1.0.80/usr/smc.c:788:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			sv_param.quantity = atoi(buf);
data/tgt-1.0.80/usr/smc.c:792:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			sv_param.sides = atoi(buf);
data/tgt-1.0.80/usr/smc.c:796:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			sv_param.clear_slot = atoi(buf);
data/tgt-1.0.80/usr/smc.c:800: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).
			sv_param.address = atoi(buf);
data/tgt-1.0.80/usr/smc.c:813:19:  [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).
			sv_param.tid = atoi(buf);
data/tgt-1.0.80/usr/smc.c:817:19:  [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).
			sv_param.lun = atoi(buf);
data/tgt-1.0.80/usr/smc.h:60: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 barcode[11];
data/tgt-1.0.80/usr/smc.h:63: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 volume_tag[32];
data/tgt-1.0.80/usr/smc.h:120: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 barcode[20];
data/tgt-1.0.80/usr/smc.h:123: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 volume_tag[32];
data/tgt-1.0.80/usr/spc.c:354:4:  [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(&data[4], vpd_pg->data, vpd_pg->size);
data/tgt-1.0.80/usr/spc.c:546: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(cmd->dev->mode_block_descriptor, data + offset,
data/tgt-1.0.80/usr/spc.c:625: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(pg->mode_data + pg->pcode_size, mask, pg->pcode_size);
data/tgt-1.0.80/usr/spc.c:908: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(data, get_scsi_cdb_usage_data(opcode, sa), cdb_length);
data/tgt-1.0.80/usr/spc.c:1648: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 tpid[300]; /* large enough? */
data/tgt-1.0.80/usr/spc.c:1979: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 buf[1024];
data/tgt-1.0.80/usr/spc.c:2021:26:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			attrs->sense_format = atoi(buf);
data/tgt-1.0.80/usr/spc.c:2025:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			attrs->lbppbe = atoi(buf);
data/tgt-1.0.80/usr/spc.c:2030:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			attrs->la_lba = atoi(buf);
data/tgt-1.0.80/usr/spc.c:2034:32:  [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).
			update_b0_opt_xfer_gran(lu, atoi(buf));
data/tgt-1.0.80/usr/spc.c:2038:31:  [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).
			update_b0_opt_xfer_len(lu, atoi(buf));
data/tgt-1.0.80/usr/spc.c:2042: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).
			attrs->removable = atoi(buf);
data/tgt-1.0.80/usr/spc.c:2046:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			attrs->readonly = atoi(buf);
data/tgt-1.0.80/usr/spc.c:2050:30:  [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).
			attrs->thinprovisioning = atoi(buf);
data/tgt-1.0.80/usr/spc.c:2057:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			attrs->rotation_rate = atoi(buf);
data/tgt-1.0.80/usr/spc.c:2063:8:  [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).
			if (atoi(buf))
data/tgt-1.0.80/usr/ssc.c:153: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(scsi_get_in_buffer(cmd), buf, READ_BLK_LIMITS_SZ);
data/tgt-1.0.80/usr/target.c:143: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(cmd->sense_buffer, uas->ua_sense_buffer,
data/tgt-1.0.80/usr/target.c:491: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 strflags[128];
data/tgt-1.0.80/usr/target.c:1603: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, target->account.in_aids,
data/tgt-1.0.80/usr/target.c:1964: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.
	static char buf[64];
data/tgt-1.0.80/usr/target.c:1969:2:  [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, "%" PRIu64 " MB", mb);
data/tgt-1.0.80/usr/target.c:2011: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 strflags[128];
data/tgt-1.0.80/usr/target.c:2376: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 strflags[128];
data/tgt-1.0.80/usr/tgtadm.c:212: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 mgmt_path[256], *path;
data/tgt-1.0.80/usr/tgtadm.c:366: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 path[PATH_MAX], *p;
data/tgt-1.0.80/usr/tgtadm.h:44: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 lld[TGT_LLD_NAME_LEN];
data/tgt-1.0.80/usr/tgtd.c:131:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_WRONLY);
data/tgt-1.0.80/usr/tgtd.c:153: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 buf[64];
data/tgt-1.0.80/usr/tgtd.c:157:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_RDONLY);
data/tgt-1.0.80/usr/tgtd.c:169:8:  [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).
	max = atoi(buf);
data/tgt-1.0.80/usr/tgtd.c:185: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 buf[32] = {0};
data/tgt-1.0.80/usr/tgtd.c:187:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_RDWR | O_CREAT, mode);
data/tgt-1.0.80/usr/tgtd.c:332: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 *pos, arg[256];
data/tgt-1.0.80/usr/tgtd.c:333: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 *argv[sizeof(arg) / 2];
data/tgt-1.0.80/usr/tgtd.h:70: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 scsi_id[SCSI_ID_LEN + 1];
data/tgt-1.0.80/usr/tgtd.h:71: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 scsi_sn[SCSI_SN_LEN + 1];
data/tgt-1.0.80/usr/tgtd.h:74: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 vendor_id[VENDOR_ID_LEN + 1];
data/tgt-1.0.80/usr/tgtd.h:75: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 product_id[PRODUCT_ID_LEN + 1];
data/tgt-1.0.80/usr/tgtd.h:76: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 product_rev[PRODUCT_REV_LEN + 1];
data/tgt-1.0.80/usr/tgtd.h:101: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 ua_sense_buffer[SCSI_SENSE_BUFFERSIZE];
data/tgt-1.0.80/usr/tgtimg.c:185: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).
	ofp = open(path, O_RDONLY|O_LARGEFILE);
data/tgt-1.0.80/usr/tgtimg.c:290: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(mi.medium_manufacturer, "Foo     ", 8);
data/tgt-1.0.80/usr/tgtimg.c:291: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(mi.application_vendor, "Bar     ", 8);
data/tgt-1.0.80/usr/util.c:40: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 name[256], buf[256];
data/tgt-1.0.80/usr/util.c:43: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).
	fp = fopen("/proc/devices", "r");
data/tgt-1.0.80/usr/util.c:76: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(devpath, O_RDWR);
data/tgt-1.0.80/usr/util.c:90:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, oflag);
data/tgt-1.0.80/usr/util.c:172:3:  [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(dest, "sync");
data/tgt-1.0.80/usr/util.c:176:3:  [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(dest, "direct");
data/tgt-1.0.80/usr/util.c:212: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(dst, src, copy_len);
data/tgt-1.0.80/usr/util.h:245: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[size + 1]; \
data/tgt-1.0.80/usr/util.h:248: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(str, buf, size); \
data/tgt-1.0.80/usr/bs.c:115:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(command_fd[0], &command, sizeof(command));
data/tgt-1.0.80/usr/bs.c:162:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(done_fd[0], &nr_events, sizeof(nr_events));
data/tgt-1.0.80/usr/bs.c:196:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, (char *)siginfo, sizeof(siginfo));
data/tgt-1.0.80/usr/bs_aio.c:281:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(info->evt_fd, &evts_complete, sizeof(evts_complete));
data/tgt-1.0.80/usr/bs_glfs.c:482: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).
		end = *p + strlen(*p);
data/tgt-1.0.80/usr/bs_glfs.c:485:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ret, *p, len);
data/tgt-1.0.80/usr/bs_glfs.c:497:6:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	if (equal) {
data/tgt-1.0.80/usr/bs_glfs.c:508: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(p, opt, strlen(opt)) == 0) &&
data/tgt-1.0.80/usr/bs_glfs.c:509: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).
		(p[strlen(opt)] == '=')) {
data/tgt-1.0.80/usr/bs_glfs.c:522: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).
	while (bsopts && strlen(bsopts)) {
data/tgt-1.0.80/usr/bs_rbd.c:477: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).
		end = *p + strlen(*p);
data/tgt-1.0.80/usr/bs_rbd.c:480:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ret, *p, len);
data/tgt-1.0.80/usr/bs_rbd.c:492:6:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	if (equal) {
data/tgt-1.0.80/usr/bs_rbd.c:504: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(p, opt, strlen(opt)) == 0) &&
data/tgt-1.0.80/usr/bs_rbd.c:505: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(opt)] == '=')) {
data/tgt-1.0.80/usr/bs_rbd.c:531: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).
	while (bsopts && strlen(bsopts)) {
data/tgt-1.0.80/usr/bs_sg.c:59:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		err = read(fd, p_read, to_read);
data/tgt-1.0.80/usr/bs_sheepdog.c:445:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(un.sun_path, path, sizeof(un.sun_path) - 1);
data/tgt-1.0.80/usr/bs_sheepdog.c:522:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(sockfd, buf, len);
data/tgt-1.0.80/usr/bs_sheepdog.c:1087:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf, filename, SD_MAX_VDI_LEN - 1);
data/tgt-1.0.80/usr/bs_sheepdog.c:1088:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buf + SD_MAX_VDI_LEN, tag, SD_MAX_VDI_TAG_LEN - 1);
data/tgt-1.0.80/usr/bs_sheepdog.c:1174:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(ai->uds_path, result, UNIX_PATH_MAX - 1);
data/tgt-1.0.80/usr/bs_sheepdog.c:1178:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(ai->hostname, result, HOST_NAME_MAX);
data/tgt-1.0.80/usr/bs_sheepdog.c:1182: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(result);
data/tgt-1.0.80/usr/bs_sheepdog.c:1196:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(vdi_name, result, SD_MAX_VDI_LEN);
data/tgt-1.0.80/usr/iscsi/chap.c:77: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).
	j = strlen(hex_string);
data/tgt-1.0.80/usr/iscsi/chap.c:124:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(string);
data/tgt-1.0.80/usr/iscsi/chap.c:231: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).
	if ((strlen(encoded) < 3) || (encoded[0] != '0'))
data/tgt-1.0.80/usr/iscsi/chap.c:249: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).
	i = strlen(encoded);
data/tgt-1.0.80/usr/iscsi/chap.c:278: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(encoded) - 2) > (2 * buf_len)) {
data/tgt-1.0.80/usr/iscsi/chap.c:280: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).
				  buf_len, (int) strlen(encoded));
data/tgt-1.0.80/usr/iscsi/chap.c:286: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(encoded) - 2) > ((buf_len - 1) / 3 + 1) * 4) {
data/tgt-1.0.80/usr/iscsi/chap.c:288: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).
				buf_len, (int) strlen(encoded));
data/tgt-1.0.80/usr/iscsi/chap.c:455: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).
		chap_calc_digest_md5(conn->auth.chap.id, pass, strlen(pass),
data/tgt-1.0.80/usr/iscsi/chap.c:461: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).
		chap_calc_digest_sha1(conn->auth.chap.id, pass, strlen(pass),
data/tgt-1.0.80/usr/iscsi/chap.c:591: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).
		chap_calc_digest_md5(chap_id, pass, strlen(pass),
data/tgt-1.0.80/usr/iscsi/chap.c:595: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).
		chap_calc_digest_sha1(chap_id, pass, strlen(pass),
data/tgt-1.0.80/usr/iscsi/iscsi_tcp.c:506:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return read(tcp_conn->fd, buf, nbytes);
data/tgt-1.0.80/usr/iscsi/iscsid.c:107: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).
	keylen = strlen(searchKey);
data/tgt-1.0.80/usr/iscsi/iscsid.c:161:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int keylen = strlen(key);
data/tgt-1.0.80/usr/iscsi/iscsid.c:162: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 valuelen = strlen(value);
data/tgt-1.0.80/usr/iscsi/iscsid.c:880: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).
			p = buf + strlen(buf);
data/tgt-1.0.80/usr/iscsi/iscsid.c:2439: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(session->initiator) + 1;
data/tgt-1.0.80/usr/iscsi/iscsid.c:2457: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).
	p = buf + (4 + strlen(session->initiator) + 1);
data/tgt-1.0.80/usr/iscsi/iscsid.c:2501: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(addr);
data/tgt-1.0.80/usr/iscsi/iser.c:3587: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).
		if (!strncmp(p, lld_param_port, strlen(lld_param_port))) {
data/tgt-1.0.80/usr/iscsi/iser.c:3590: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).
			q = p + strlen(lld_param_port) + 1;
data/tgt-1.0.80/usr/iscsi/iser.c:3599: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 (!strncmp(p, lld_param_nop, strlen(lld_param_nop))) {
data/tgt-1.0.80/usr/iscsi/iser.c:3600: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).
			q = p + strlen(lld_param_nop) + 1;
data/tgt-1.0.80/usr/iscsi/iser.c:3601:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (!strncmp(q, lld_param_on, strlen(lld_param_on)))
data/tgt-1.0.80/usr/iscsi/iser.c:3604: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).
			if (!strncmp(q, lld_param_off, strlen(lld_param_off)))
data/tgt-1.0.80/usr/iscsi/iser.c:3613: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).
				    strlen(lld_param_pool_sz_mb))) {
data/tgt-1.0.80/usr/iscsi/iser.c:3614: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).
			q = p + strlen(lld_param_pool_sz_mb) + 1;
data/tgt-1.0.80/usr/iscsi/iser.c:3619: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).
				    strlen(lld_param_buf_sz_kb))) {
data/tgt-1.0.80/usr/iscsi/iser.c:3620: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).
			q = p + strlen(lld_param_buf_sz_kb) + 1;
data/tgt-1.0.80/usr/iscsi/iser.c:3626: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).
				    strlen(lld_param_cq_vector))) {
data/tgt-1.0.80/usr/iscsi/iser.c:3627: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).
			q = p + strlen(lld_param_cq_vector) + 1;
data/tgt-1.0.80/usr/iscsi/iser_text.c:83:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int keylen = strlen(searchKey);
data/tgt-1.0.80/usr/iscsi/iser_text.c:112:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int keylen = strlen(key);
data/tgt-1.0.80/usr/iscsi/iser_text.c:113: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 valuelen = strlen(value);
data/tgt-1.0.80/usr/iscsi/iser_text.c:854: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).
			p = buf + strlen(buf);
data/tgt-1.0.80/usr/iscsi/isns.c:164: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).
	if (!strlen(eid)) {
data/tgt-1.0.80/usr/iscsi/isns.c:209:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return isns_tlv_set(tlv, tag, strlen(str) + 1, str);
data/tgt-1.0.80/usr/iscsi/isns.c:572:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		err = read(fd, rx->buf + rx->offset,
data/tgt-1.0.80/usr/iscsi/isns.c:624:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		err = read(fd, rx->buf + rx->offset,
data/tgt-1.0.80/usr/iscsi/isns.c:727: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).
	if (!strlen(mgmt->name)) {
data/tgt-1.0.80/usr/iscsi/param.c:187:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (!strncmp(p, "None", strlen("None")))
data/tgt-1.0.80/usr/iscsi/param.c:189: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).
		else if (!strncmp(p, "CRC32C", strlen("CRC32C")))
data/tgt-1.0.80/usr/iscsi/target.c:300: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(target->redirect_info.addr))
data/tgt-1.0.80/usr/iscsi/target.c:524:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		str = name + strlen(name) + 1;
data/tgt-1.0.80/usr/iscsi/target.c:726: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).
		else if (strlen(target->redirect_info.addr))
data/tgt-1.0.80/usr/log.c:186: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).
		      strlen((char *)&lastmsg->str) * sizeof(char) + 1;
data/tgt-1.0.80/usr/log.c:190:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(buff) * sizeof(char) + 1;
data/tgt-1.0.80/usr/log.c:236: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).
	int len = strlen((char *)&src->str) * sizeof(char) +
data/tgt-1.0.80/usr/mgmt.c:117: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).
				p += strlen("initiator-address=");
data/tgt-1.0.80/usr/mgmt.c:127: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).
				p += strlen("initiator-name=");
data/tgt-1.0.80/usr/mgmt.c:144: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).
				p += strlen("initiator-address=");
data/tgt-1.0.80/usr/mgmt.c:154: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).
				p += strlen("initiator-name=");
data/tgt-1.0.80/usr/mgmt.c:296: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).
			password += strlen("password=");
data/tgt-1.0.80/usr/mgmt.c:484: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).
	if (!strlen(req->lld))
data/tgt-1.0.80/usr/mgmt.c:631:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		err = read(fd, (char *)req + mtask->done, len);
data/tgt-1.0.80/usr/mgmt.c:666:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		err = read(fd, mtask->req_buf + mtask->done, len);
data/tgt-1.0.80/usr/mgmt.c:801: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(mgmt_path) > (sizeof(addr.sun_path) - 1)) {
data/tgt-1.0.80/usr/mmc.c:2218:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(lu->attrs.product_id, "VIRTUAL-CDROM",
data/tgt-1.0.80/usr/osd.c:46:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(lu->attrs.product_id, "OSD", sizeof(lu->attrs.product_id));
data/tgt-1.0.80/usr/parser.c:64: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) == 0)
data/tgt-1.0.80/usr/parser.c:66: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).
			else if (len == -1 || len > strlen(s))
data/tgt-1.0.80/usr/parser.c:67:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				len = strlen(s);
data/tgt-1.0.80/usr/sbc.c:738:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(lu->attrs.product_id, "VIRTUAL-DISK", sizeof(lu->attrs.product_id));
data/tgt-1.0.80/usr/scc.c:44:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(lu->attrs.product_id, "Controller",
data/tgt-1.0.80/usr/smc.c:529:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(lu->attrs.product_id, "VIRTUAL-CHANGER",
data/tgt-1.0.80/usr/smc.c:735: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).
		if (strlen(tmp->barcode) > sizeof(s->barcode) ||
data/tgt-1.0.80/usr/smc.c:736: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).
		    strlen(tmp->volume_tag) > sizeof(s->volume_tag)) {
data/tgt-1.0.80/usr/spc.c:132: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(sn)) {
data/tgt-1.0.80/usr/spc.c:133:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int tmp = strlen(sn);
data/tgt-1.0.80/usr/spc.c:159:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)data, id, SCSI_ID_LEN);
data/tgt-1.0.80/usr/ssc.c:171:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(lu->attrs.product_id, "VIRTUAL-TAPE",
data/tgt-1.0.80/usr/target.c:1529:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(user, ac->user, ulen);
data/tgt-1.0.80/usr/target.c:1536:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(password, ac->password, plen);
data/tgt-1.0.80/usr/tgtadm.c:227: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(mgmt_path) > (sizeof(addr.sun_path) - 1)) {
data/tgt-1.0.80/usr/tgtadm.c:300:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(fd, buf + done, len - done);
data/tgt-1.0.80/usr/tgtadm.c:381:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strncmp(namelist[i]->d_name, key, strlen(key)))
data/tgt-1.0.80/usr/tgtadm.c:383:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		p = namelist[i]->d_name + strlen(key);
data/tgt-1.0.80/usr/tgtadm.c:532:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(req->lld, optarg, sizeof(req->lld));
data/tgt-1.0.80/usr/tgtd.c:138: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).
	err = write(fd, score, strlen(score));
data/tgt-1.0.80/usr/tgtd.c:162:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, buf, sizeof(buf));
data/tgt-1.0.80/usr/tgtd.c:194: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).
	ret = write(fd, buf, strlen(buf));
data/tgt-1.0.80/usr/tgtd.c:401:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ret = read(fds[0], output, op_len);
data/tgt-1.0.80/usr/tgtimg.c:234: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).
	for (a = strlen((const char *)mam.medium_serial_number); a > 0; a--)
data/tgt-1.0.80/usr/util.c:175:4:  [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(dest, ":");
data/tgt-1.0.80/usr/work.c:86:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		err = read(timer_fd[0], &s, sizeof(s));
data/tgt-1.0.80/usr/work.c:109:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		err = read(timer_fd[0], &n, sizeof(n));

ANALYSIS SUMMARY:

Hits = 366
Lines analyzed = 36961 in approximately 0.82 seconds (45251 lines/second)
Physical Source Lines of Code (SLOC) = 28400
Hits@level = [0] 103 [1] 112 [2] 210 [3]   6 [4]  38 [5]   0
Hits@level+ = [0+] 469 [1+] 366 [2+] 254 [3+]  44 [4+]  38 [5+]   0
Hits/KSLOC@level+ = [0+] 16.5141 [1+] 12.8873 [2+] 8.94366 [3+] 1.5493 [4+] 1.33803 [5+]   0
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.