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/istgt-0.4~20111008/src/istgt.h
Examining data/istgt-0.4~20111008/src/istgt_lu_dvd.c
Examining data/istgt-0.4~20111008/src/istgt_log.c
Examining data/istgt-0.4~20111008/src/istgt_queue.c
Examining data/istgt-0.4~20111008/src/istgt_ver.h
Examining data/istgt-0.4~20111008/src/istgt_conf.c
Examining data/istgt-0.4~20111008/src/istgt_misc.h
Examining data/istgt-0.4~20111008/src/istgt_sock.c
Examining data/istgt-0.4~20111008/src/istgt_iscsi_param.h
Examining data/istgt-0.4~20111008/src/istgt_md5.c
Examining data/istgt-0.4~20111008/src/istgt_scsi.h
Examining data/istgt-0.4~20111008/src/istgt_iscsi.c
Examining data/istgt-0.4~20111008/src/istgt_crc32c.h
Examining data/istgt-0.4~20111008/src/istgt_misc.c
Examining data/istgt-0.4~20111008/src/istgt_queue.h
Examining data/istgt-0.4~20111008/src/istgt_conf.h
Examining data/istgt-0.4~20111008/src/istgt_lu_pass.c
Examining data/istgt-0.4~20111008/src/istgt_log.h
Examining data/istgt-0.4~20111008/src/istgt_iscsi.h
Examining data/istgt-0.4~20111008/src/istgt_crc32c.c
Examining data/istgt-0.4~20111008/src/istgt_sock.h
Examining data/istgt-0.4~20111008/src/istgt_iscsi_param.c
Examining data/istgt-0.4~20111008/src/istgt_md5.h
Examining data/istgt-0.4~20111008/src/istgt_lu_tape.c
Examining data/istgt-0.4~20111008/src/istgt_lu.h
Examining data/istgt-0.4~20111008/src/istgt_proto.h
Examining data/istgt-0.4~20111008/src/istgt_lu_disk.c
Examining data/istgt-0.4~20111008/src/istgt_lu_ctl.c
Examining data/istgt-0.4~20111008/src/istgtcontrol.c
Examining data/istgt-0.4~20111008/src/istgt_lu.c
Examining data/istgt-0.4~20111008/src/istgt.c

FINAL RESULTS:

data/istgt-0.4~20111008/src/istgt.c:82:2:  [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, msg, ap);
data/istgt-0.4~20111008/src/istgt_iscsi.c:2041: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(conn->initiator_port, sizeof conn->initiator_port,
data/istgt-0.4~20111008/src/istgt_log.c:110: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(buf, sizeof buf, format, ap);
data/istgt-0.4~20111008/src/istgt_log.c:133: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(buf, sizeof buf, format, ap);
data/istgt-0.4~20111008/src/istgt_log.c:157:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		vsnprintf(buf, sizeof buf, format, ap);
data/istgt-0.4~20111008/src/istgt_log.c:176: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(buf, sizeof buf, format, ap);
data/istgt-0.4~20111008/src/istgt_log.c:194: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(buf, sizeof buf, format, ap);
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:149:7:  [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.
	rc = vsnprintf(uctl->sendbuf, uctl->sendbufsize, format, ap);
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:553:5:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
				snprintf(workp, worksize, "%"PRIu64,
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:574:4:  [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(workp, worksize, "%"PRIu64,
data/istgt-0.4~20111008/src/istgt_lu_disk.c:918: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(buf, sizeof buf, "%s,%16.16" PRIx64,
data/istgt-0.4~20111008/src/istgt_lu_dvd.c:257:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(spec->file, W_OK) != 0) {
data/istgt-0.4~20111008/src/istgt_lu_tape.c:1062:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(spec->file, W_OK) != 0) {
data/istgt-0.4~20111008/src/istgt_misc.c:61: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(buf, sizeof buf, format, ap);
data/istgt-0.4~20111008/src/istgtcontrol.c:127:2:  [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, format, ap);
data/istgt-0.4~20111008/src/istgtcontrol.c:187:7:  [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.
	rc = vsnprintf(uctl->sendbuf, uctl->sendbufsize, format, ap);
data/istgt-0.4~20111008/src/istgt.c:1541:15:  [3] (buffer) getopt:
  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(argc, argv, "c:p:l:m:t:qDHV")) != -1) {
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:884:9:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	file = realpath(fullpath, abspath);
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:896:19:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	file = abspath = realpath(fullpath, NULL);
data/istgt-0.4~20111008/src/istgt_misc.c:481:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(seed);
data/istgt-0.4~20111008/src/istgt_misc.c:498:19:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	r1 = (uint32_t) (random() & 0xffff);
data/istgt-0.4~20111008/src/istgt_misc.c:499:19:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	r2 = (uint32_t) (random() & 0xffff);
data/istgt-0.4~20111008/src/istgt_misc.c:514:7:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		l = random();
data/istgt-0.4~20111008/src/istgtcontrol.c:1135:15:  [3] (buffer) getopt:
  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(argc, argv, "c:h:p:t:l:f:s:qvA:U:S:M:R:VH")) != -1) {
data/istgt-0.4~20111008/src/istgt.c:109: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(*host, portal + 1, n);
data/istgt-0.4~20111008/src/istgt.c:116: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(*host, portal, n);
data/istgt-0.4~20111008/src/istgt.c:138: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(*host, portal, n);
data/istgt-0.4~20111008/src/istgt.c:573: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(istgt->pidfile, "w");
data/istgt-0.4~20111008/src/istgt_conf.c:426: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(file, "r");
data/istgt-0.4~20111008/src/istgt_conf.c:452: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(q, p, n);
data/istgt-0.4~20111008/src/istgt_conf.c:453: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(q + n, lp2, n2);
data/istgt-0.4~20111008/src/istgt_iscsi.c:673: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_pdu->bhs, &src_pdu->bhs, ISCSI_BHS_LEN);
data/istgt-0.4~20111008/src/istgt_iscsi.c:676: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(dst_pdu->ahs, src_pdu->ahs, 4 * total_ahs_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:682: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(dst_pdu->header_digest, src_pdu->header_digest,
data/istgt-0.4~20111008/src/istgt_iscsi.c:687: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(dst_pdu->data, src_pdu->data, data_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:693: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(dst_pdu->data_digest, src_pdu->data_digest,
data/istgt-0.4~20111008/src/istgt_iscsi.c:751: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(spp, (uint8_t *) &pdu->bhs, ISCSI_BHS_LEN);
data/istgt-0.4~20111008/src/istgt_iscsi.c:758: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(spp + total, pdu->data, data_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:899: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_pdu->bhs, &src_pdu->bhs, ISCSI_BHS_LEN);
data/istgt-0.4~20111008/src/istgt_iscsi.c:901: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_pdu->header_digest, src_pdu->header_digest,
data/istgt-0.4~20111008/src/istgt_iscsi.c:904: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_pdu->shortdata, src_pdu->shortdata,
data/istgt-0.4~20111008/src/istgt_iscsi.c:910: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_pdu->data_digest, src_pdu->data_digest, ISCSI_DIGEST_LEN);
data/istgt-0.4~20111008/src/istgt_iscsi.c:1763: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, &pdu->bhs, ISCSI_BHS_LEN);
data/istgt-0.4~20111008/src/istgt_iscsi.c:1766: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 + data_len, pdu->ahs, (4 * total_ahs_len));
data/istgt-0.4~20111008/src/istgt_iscsi.c:1770: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 + data_len, pdu->header_digest, ISCSI_DIGEST_LEN);
data/istgt-0.4~20111008/src/istgt_iscsi.c:1931: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_iscsi.c:2806: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_iscsi.c:3798: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, pdu->data, data_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:3931: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(r2t_task->iobuf, lu_cmd->pdu->data, data_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:4131: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 + buffer_offset, pdu->data, data_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:4248: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, r2t_task->iobuf, offset);
data/istgt-0.4~20111008/src/istgt_iscsi.c:4292: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 + offset, lu_cmd->pdu->data, data_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:4485: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 + buffer_offset, data_pdu.data, data_len);
data/istgt-0.4~20111008/src/istgt_iscsi.c:4774: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 tmp[1];
data/istgt-0.4~20111008/src/istgt_iscsi.c:4923: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_iscsi.c:5332: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 tmp[1];
data/istgt-0.4~20111008/src/istgt_iscsi.c:5514: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_iscsi.h:256: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 initiator_addr[MAX_INITIATOR_ADDR];
data/istgt-0.4~20111008/src/istgt_iscsi.h:257: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 target_addr[MAX_TARGET_ADDR];
data/istgt-0.4~20111008/src/istgt_iscsi.h:260: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 initiator_name[MAX_INITIATOR_NAME];
data/istgt-0.4~20111008/src/istgt_iscsi.h:261: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 target_name[MAX_TARGET_NAME];
data/istgt-0.4~20111008/src/istgt_iscsi.h:262: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 initiator_port[MAX_INITIATOR_NAME];
data/istgt-0.4~20111008/src/istgt_iscsi.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 target_port[MAX_TARGET_NAME];
data/istgt-0.4~20111008/src/istgt_iscsi_param.c:157: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_iscsi_param.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(key, p, n);
data/istgt-0.4~20111008/src/istgt_iscsi_param.c:226: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(val, p, n);
data/istgt-0.4~20111008/src/istgt_log.c:106: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_log.c:129: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_log.c:152: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_log.c:172: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_log.c:190: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:83: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 mask[MAX_MASKBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:98: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(mask, netmask + 1, n);
data/istgt-0.4~20111008/src/istgt_lu.c:141: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 mask[MAX_MASKBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:155: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(mask, netmask, n);
data/istgt-0.4~20111008/src/istgt_lu.c:326: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:615: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(file, O_RDONLY, 0);
data/istgt-0.4~20111008/src/istgt_lu.c:784: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:928: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:1205: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[MAX_TMPBUF], buf2[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:2112: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu.c:2527: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_pdu->bhs, &src_pdu->bhs, ISCSI_BHS_LEN);
data/istgt-0.4~20111008/src/istgt_lu.c:2529: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_pdu->header_digest, src_pdu->header_digest, ISCSI_DIGEST_LEN);
data/istgt-0.4~20111008/src/istgt_lu.c:2531: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_pdu->shortdata, src_pdu->shortdata,
data/istgt-0.4~20111008/src/istgt_lu.c:2537: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_pdu->data_digest, src_pdu->data_digest, ISCSI_DIGEST_LEN);
data/istgt-0.4~20111008/src/istgt_lu.h:143: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 *file[MAX_LU_LUN_SLOT];
data/istgt-0.4~20111008/src/istgt_lu.h:288: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 initiator_name[MAX_INITIATOR_NAME];
data/istgt-0.4~20111008/src/istgt_lu.h:289: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 initiator_port[MAX_INITIATOR_NAME];
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:68: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 caddr[MAX_ADDRBUF];
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:69: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 saddr[MAX_ADDRBUF];
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:88: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 recvtmp[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:89: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 recvbuf[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:90: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 sendbuf[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:91: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 work[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:1430: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu_disk.c:179: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).
	rc = open(spec->file, flags, mode);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:865: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, len);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:868: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, size);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:892: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu_disk.c:913: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu_disk.c:2759: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(*tid, data, plen);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:4121: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(conn->workbuf + (nblocks * nbytes), data, nbytes);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:4995: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[1];
data/istgt-0.4~20111008/src/istgt_lu_disk.c:5041: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(iobuf, lu_cmd->pdu->data,
data/istgt-0.4~20111008/src/istgt_lu_disk.c:5913: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, sense_data + 2, data_len);
data/istgt-0.4~20111008/src/istgt_lu_dvd.c:121: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).
	rc = open(spec->file, flags, mode);
data/istgt-0.4~20111008/src/istgt_lu_dvd.c:3436: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, sense_data + 2, data_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:192: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(spec->ccb->csio.cdb_io.cdb_bytes, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:221: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(spec->inq_standard, data, data_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:271: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(spec->ccb->csio.cdb_io.cdb_bytes, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:378: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(spec->ccb->csio.cdb_io.cdb_bytes, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:505: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(spec->ccb->csio.cdb_io.cdb_bytes, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:619: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(spec->ccb->csio.cdb_io.cdb_bytes, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:727: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1123: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(spec->ccb->csio.cdb_io.cdb_bytes, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1153: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(sense_data + 2, &spec->ccb->csio.sense_data, SSD_FULL_SIZE);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1183: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(sense_data + 2, &spec->ccb->csio.sense_data, SSD_FULL_SIZE);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1264: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(spec->ccb->csio.cdb_io.cdb_bytes, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1290: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1297: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1301: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1308: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1312: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1319: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1323: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1330: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1334: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1341: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1346: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1353: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1358: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1365: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1370: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(fixcdb, cdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1377: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(spec->ccb->csio.cdb_io.cdb_bytes, fixcdb, cdb_len);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1410: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(sense_data + 2, &spec->ccb->csio.sense_data, SSD_FULL_SIZE);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1440: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(sense_data + 2, &spec->ccb->csio.sense_data, SSD_FULL_SIZE);
data/istgt-0.4~20111008/src/istgt_lu_pass.c:1475: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(lu_cmd->data, lu_cmd->data + pad_len, data_len);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:290: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).
	rc = open(spec->file, flags, mode);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:491: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(mbp->magic, MARK_EOFMAGIC, MARK_MAGICLEN);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:556: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(mbp->magic, MARK_BOTMAGIC, MARK_MAGICLEN);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:618: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(mbp->magic, MARK_EODMAGIC, MARK_MAGICLEN);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:916: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(cbp->magic, CTLMAGIC, CTLMAGICLEN);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:1556: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_lu_tape.c:4023: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(mbp->magic, MARK_DATAMAGIC, MARK_MAGICLEN);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:4151: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(mbp->magic, MARK_DATAMAGIC, MARK_MAGICLEN);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:4903: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, sense_data + 2, data_len);
data/istgt-0.4~20111008/src/istgt_misc.c:57: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_misc.c:114: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, s, size - 1);
data/istgt-0.4~20111008/src/istgt_misc.c:440: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 tmpbuf[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_misc.c:441: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 buf8[8+1];
data/istgt-0.4~20111008/src/istgt_misc.c:620: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/istgt-0.4~20111008/src/istgt_sock.c:94: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_sock.c:95: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 portnum[PORTNUMLEN];
data/istgt-0.4~20111008/src/istgt_sock.c:184: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[MAX_TMPBUF];
data/istgt-0.4~20111008/src/istgt_sock.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 portnum[PORTNUMLEN];
data/istgt-0.4~20111008/src/istgtcontrol.c:95: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 caddr[MAX_ADDRBUF];
data/istgt-0.4~20111008/src/istgtcontrol.c:96: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 saddr[MAX_ADDRBUF];
data/istgt-0.4~20111008/src/istgtcontrol.c:111: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 recvtmp[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgtcontrol.c:112: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 recvbuf[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgtcontrol.c:113: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 sendbuf[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgtcontrol.c:114: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 work[MAX_LINEBUF];
data/istgt-0.4~20111008/src/istgt.c:134: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 = portal + strlen(portal);
data/istgt-0.4~20111008/src/istgt.c:1081:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				strlen("AuthGroup")) != 0
data/istgt-0.4~20111008/src/istgt_conf.c:305: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).
						   strlen(cfst_table[i].name)) == 0) {
data/istgt-0.4~20111008/src/istgt_conf.c:394: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(p);
data/istgt-0.4~20111008/src/istgt_conf.c:443: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).
		n = strlen(p);
data/istgt-0.4~20111008/src/istgt_conf.c:450: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).
			n2 = strlen(lp2);
data/istgt-0.4~20111008/src/istgt_iscsi.c:1627: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(conn->auth.secret));
data/istgt-0.4~20111008/src/istgt_iscsi.c:1689: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).
			    strlen(conn->auth.msecret));
data/istgt-0.4~20111008/src/istgt_iscsi.c:2368: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 (val != NULL && strlen(val) != 0) {
data/istgt-0.4~20111008/src/istgt_iscsi.c:4776:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = read(conn->task_pipe[0], tmp, 1);
data/istgt-0.4~20111008/src/istgt_iscsi.c:5336:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = read(conn->task_pipe[0], tmp, 1);
data/istgt-0.4~20111008/src/istgt_lu.c:149: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 = netmask + strlen(netmask);
data/istgt-0.4~20111008/src/istgt_lu.c:587: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).
	p = buf + strlen(buf);
data/istgt-0.4~20111008/src/istgt_lu.c:588: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).
	rest = len - strlen(buf);
data/istgt-0.4~20111008/src/istgt_lu.c:592: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).
	p = buf + strlen(buf);
data/istgt-0.4~20111008/src/istgt_lu.c:593: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).
	rest = len - strlen(buf);
data/istgt-0.4~20111008/src/istgt_lu.c:941: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).
	istgt_md5update(&md5ctx, buf, strlen(buf));
data/istgt-0.4~20111008/src/istgt_lu.c:1324:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				strlen("PortalGroup")) != 0
data/istgt-0.4~20111008/src/istgt_lu.c:1330:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				strlen("InitiatorGroup")) != 0
data/istgt-0.4~20111008/src/istgt_lu.c:1417:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				strlen("AuthGroup")) != 0
data/istgt-0.4~20111008/src/istgt_lu.c:1507:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (vendor == NULL || strlen(vendor) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1509:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (product == NULL || strlen(product) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1511: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 (revision == NULL || strlen(revision) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1513:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (serial == NULL || strlen(serial) == 0) {
data/istgt-0.4~20111008/src/istgt_lu.c:1519:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (vendor == NULL || strlen(vendor) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1521:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (product == NULL || strlen(product) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1523: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 (revision == NULL || strlen(revision) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1525:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (serial == NULL || strlen(serial) == 0) {
data/istgt-0.4~20111008/src/istgt_lu.c:1531:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (vendor == NULL || strlen(vendor) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1533:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (product == NULL || strlen(product) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1535: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 (revision == NULL || strlen(revision) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1537:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (serial == NULL || strlen(serial) == 0) {
data/istgt-0.4~20111008/src/istgt_lu.c:1547:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (vendor == NULL || strlen(vendor) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1549:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (product == NULL || strlen(product) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1551: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 (revision == NULL || strlen(revision) == 0)
data/istgt-0.4~20111008/src/istgt_lu.c:1553:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (serial == NULL || strlen(serial) == 0) {
data/istgt-0.4~20111008/src/istgt_lu.c:1776:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					if (strlen(val) == 0) {
data/istgt-0.4~20111008/src/istgt_lu.c:2481:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(lu_task->initiator_name, conn->initiator_name,
data/istgt-0.4~20111008/src/istgt_lu.c:2483:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(lu_task->initiator_port, conn->initiator_port,
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:131: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).
	expect = strlen(uctl->sendbuf);
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:329: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(uctl->auth.secret));
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:373: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).
			    strlen(uctl->auth.msecret));
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:545: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).
			worksize -= strlen(mflags) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:546: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).
			workp += strlen(mflags) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:557: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).
			worksize -= strlen(msize) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:558: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).
			workp += strlen(msize) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:561: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).
			worksize -= strlen(msize) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:562: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).
			workp += strlen(msize) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:577: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).
			worksize -= strlen(msize) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:578: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).
			workp += strlen(msize) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:861: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 = 1 + strlen(uctl->mediadirectory) + 1 + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:869: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(safedir) > 1 && safedir[strlen(safedir) - 1] != '/') {
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:869:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(safedir) > 1 && safedir[strlen(safedir) - 1] != '/') {
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:870: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).
		safedir[strlen(safedir) + 1] = '\0';
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:871: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).
		safedir[strlen(safedir)] = '/';
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:875: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(safedir) + strlen(file) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:875:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(safedir) + strlen(file) + 1;
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:915: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).
	} else if (strncasecmp(file, safedir, strlen(safedir)) != 0) {
data/istgt-0.4~20111008/src/istgt_lu_ctl.c:1665:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				strlen("AuthGroup")) != 0
data/istgt-0.4~20111008/src/istgt_lu_disk.c:240:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = (int64_t) read(spec->fd, buf, (size_t) nbytes);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:255:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			rc = (int64_t) read(spec->fd, buf, (size_t) request);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:280:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = (int64_t) read(spec->fd, buf, (size_t) nbytes);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:863: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(src);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:903: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).
	crc32c = istgt_crc32c((uint8_t *) buf, strlen(buf));
data/istgt-0.4~20111008/src/istgt_lu_disk.c:922: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).
	istgt_md5update(&md5ctx, buf, strlen(buf));
data/istgt-0.4~20111008/src/istgt_lu_disk.c:1143: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(spec->lu->lun[spec->lun].serial);
data/istgt-0.4~20111008/src/istgt_lu_disk.c:1150: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(spec->lu->inq_serial);
data/istgt-0.4~20111008/src/istgt_lu_dvd.c:161:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = (int64_t) read(spec->fd, buf, (size_t) nbytes);
data/istgt-0.4~20111008/src/istgt_lu_dvd.c:740: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(spec->lu->inq_serial);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:330:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = (int64_t) read(spec->fd, buf, (size_t) nbytes);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:1640: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(spec->lu->inq_serial);
data/istgt-0.4~20111008/src/istgt_lu_tape.c:2877:42:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
#define THREAD_YIELD do { istgt_yield(); usleep(1000); } while (0)
data/istgt-0.4~20111008/src/istgt_misc.c:112: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).
	size = strlen(s) + 1;
data/istgt-0.4~20111008/src/istgt_misc.c:229: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).
	q = p + strlen(p);
data/istgt-0.4~20111008/src/istgt_misc.c:601:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(0);
data/istgt-0.4~20111008/src/istgt_misc.c:616: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(src);
data/istgt-0.4~20111008/src/istgt_sock.c:366:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read(s, buf, nbytes);
data/istgt-0.4~20111008/src/istgtcontrol.c:169: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).
	expect = strlen(uctl->sendbuf);
data/istgt-0.4~20111008/src/istgtcontrol.c:214:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strncasecmp(s, req_auth_string, strlen(req_auth_string)) == 0)
data/istgt-0.4~20111008/src/istgtcontrol.c:227:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strncasecmp(s, chap_seq_string, strlen(chap_seq_string)) == 0)
data/istgt-0.4~20111008/src/istgtcontrol.c:714: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).
					strlen(uctl->auth.secret));
data/istgt-0.4~20111008/src/istgtcontrol.c:727: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).
	worksize -= strlen(hexmd5) + 1;
data/istgt-0.4~20111008/src/istgtcontrol.c:728: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).
	workp += strlen(hexmd5) + 1;
data/istgt-0.4~20111008/src/istgtcontrol.c:744: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).
		worksize -= strlen(hexchallenge) + 1;
data/istgt-0.4~20111008/src/istgtcontrol.c:745: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).
		workp += strlen(hexchallenge) + 1;
data/istgt-0.4~20111008/src/istgtcontrol.c:797: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(uctl->auth.msecret));
data/istgt-0.4~20111008/src/istgtcontrol.c:1193:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			memset(optarg, 'x', strlen(optarg));
data/istgt-0.4~20111008/src/istgtcontrol.c:1203:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			memset(optarg, 'x', strlen(optarg));

ANALYSIS SUMMARY:

Hits = 249
Lines analyzed = 37183 in approximately 0.91 seconds (41041 lines/second)
Physical Source Lines of Code (SLOC) = 30335
Hits@level = [0] 323 [1]  88 [2] 137 [3]   8 [4]  16 [5]   0
Hits@level+ = [0+] 572 [1+] 249 [2+] 161 [3+]  24 [4+]  16 [5+]   0
Hits/KSLOC@level+ = [0+] 18.8561 [1+] 8.20834 [2+] 5.3074 [3+] 0.791165 [4+] 0.527444 [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.