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/udftools-2.2/wrudf/ide-pc.h
Examining data/udftools-2.2/wrudf/wrudf.h
Examining data/udftools-2.2/wrudf/ide-pc.c
Examining data/udftools-2.2/wrudf/wrudf-cdr.c
Examining data/udftools-2.2/wrudf/wrudf-cdrw.c
Examining data/udftools-2.2/wrudf/wrudf-desc.c
Examining data/udftools-2.2/wrudf/wrudf-cmnd.c
Examining data/udftools-2.2/wrudf/wrudf.c
Examining data/udftools-2.2/udflabel/options.h
Examining data/udftools-2.2/udflabel/options.c
Examining data/udftools-2.2/udflabel/main.c
Examining data/udftools-2.2/udfinfo/options.h
Examining data/udftools-2.2/udfinfo/readdisc.h
Examining data/udftools-2.2/udfinfo/options.c
Examining data/udftools-2.2/udfinfo/readdisc.c
Examining data/udftools-2.2/udfinfo/main.c
Examining data/udftools-2.2/udffsck/main.c
Examining data/udftools-2.2/pktsetup/pktsetup.c
Examining data/udftools-2.2/cdrwtool/cdrwtool.h
Examining data/udftools-2.2/cdrwtool/options.h
Examining data/udftools-2.2/cdrwtool/cdrwtool.c
Examining data/udftools-2.2/cdrwtool/options.c
Examining data/udftools-2.2/cdrwtool/main.c
Examining data/udftools-2.2/mkudffs/options.h
Examining data/udftools-2.2/mkudffs/file.h
Examining data/udftools-2.2/mkudffs/defaults.h
Examining data/udftools-2.2/mkudffs/mkudffs.h
Examining data/udftools-2.2/mkudffs/options.c
Examining data/udftools-2.2/mkudffs/file.c
Examining data/udftools-2.2/mkudffs/defaults.c
Examining data/udftools-2.2/mkudffs/mkudffs.c
Examining data/udftools-2.2/mkudffs/main.c
Examining data/udftools-2.2/libudffs/unicode.c
Examining data/udftools-2.2/libudffs/misc.c
Examining data/udftools-2.2/libudffs/extent.c
Examining data/udftools-2.2/libudffs/crc.c
Examining data/udftools-2.2/include/bswap.h
Examining data/udftools-2.2/include/osta_udf.h
Examining data/udftools-2.2/include/ecma_167.h
Examining data/udftools-2.2/include/libudffs.h

FINAL RESULTS:

data/udftools-2.2/mkudffs/mkudffs.c:112: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(uuid, sizeof(uuid), "%08" PRIx32 "%08" PRIx32, uuid_time, randu32());
data/udftools-2.2/mkudffs/mkudffs.c:238: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((char *)disc->udf_pd[0]->partitionContents.ident, PD_PARTITION_CONTENTS_NSR03);
data/udftools-2.2/mkudffs/mkudffs.c:243: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((char *)disc->udf_pd[0]->partitionContents.ident, PD_PARTITION_CONTENTS_NSR02);
data/udftools-2.2/mkudffs/mkudffs.c:1424: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((char *)ea->impIdent.ident, UDF_ID_VAT_LVEXTENSION);
data/udftools-2.2/pktsetup/pktsetup.c:194:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		if (system("/sbin/modprobe pktcdvd") != 0) {
data/udftools-2.2/wrudf/ide-pc.c:47:5:  [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, args);
data/udftools-2.2/wrudf/wrudf-cdr.c:325:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy((char *)id->ident, UDF_ID_ALLOC);
data/udftools-2.2/wrudf/wrudf-cmnd.c:411:6:  [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(dir->name, name);
data/udftools-2.2/wrudf/wrudf-cmnd.c:425: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(dir->name, name);
data/udftools-2.2/wrudf/wrudf-cmnd.c:673:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(newDir->name, name);
data/udftools-2.2/wrudf/wrudf-cmnd.c:1073:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    if( system(cmnd) != 0 )
data/udftools-2.2/cdrwtool/options.c:75:19:  [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 ((retval = getopt_long(argc, argv, "r:t:im:u:v:d:sgq::c:C:b:p:z:l:w:f:o:h", long_options, NULL)) != EOF)
data/udftools-2.2/libudffs/misc.c:145:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		srand(time(NULL) * getpid());
data/udftools-2.2/mkudffs/options.c:143:19:  [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 ((retval = getopt_long(argc, argv, "l:u:b:m:r:nh", long_options, NULL)) != EOF)
data/udftools-2.2/pktsetup/pktsetup.c:431:14:  [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 ((c = getopt(argc, argv, "ds?")) != EOF) {
data/udftools-2.2/udfinfo/options.c:56:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ret = getopt_long(argc, argv, "b:h", long_options, NULL)) != EOF)
data/udftools-2.2/udflabel/options.c:165:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((ret = getopt_long(argc, argv, "b:nu:h", long_options, NULL)) != EOF)
data/udftools-2.2/cdrwtool/cdrwtool.c:181: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 header[0x10];
data/udftools-2.2/cdrwtool/cdrwtool.c:251: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 header[0x10];
data/udftools-2.2/cdrwtool/cdrwtool.c:340:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((file = open(disc->filename, O_RDONLY)) < 0) {
data/udftools-2.2/cdrwtool/cdrwtool.c:426: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 buffer[16];
data/udftools-2.2/cdrwtool/main.c:87:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(buffer + offset, data->buffer, bufferlen - offset);
data/udftools-2.2/cdrwtool/main.c:93:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(buffer, (uint8_t *)data->buffer + (bufferlen - offset), data->length - (bufferlen - offset));
data/udftools-2.2/cdrwtool/main.c:99:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(buffer + offset, data->buffer, data->length);
data/udftools-2.2/cdrwtool/main.c:189: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(&disc->udf_disc.sizing[i], &default_sizing[DEFAULT_CDRW][i], sizeof(default_sizing[DEFAULT_CDRW][i]));
data/udftools-2.2/cdrwtool/main.c:223: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(&disc->udf_disc.sizing[i], &default_sizing[DEFAULT_CDRW][i], sizeof(default_sizing[DEFAULT_CDRW][i]));
data/udftools-2.2/cdrwtool/main.c:258:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (((fd = open(filename, O_RDWR | O_NONBLOCK)) < 0) &&
data/udftools-2.2/cdrwtool/main.c:260:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		((fd = open(filename, O_RDONLY | O_NONBLOCK)) < 0)))
data/udftools-2.2/include/libudffs.h:205: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			boot_code[440];
data/udftools-2.2/libudffs/misc.c:36:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
size_t gen_uuid_from_vol_set_ident(char uuid[17], const dstring *vol_set_ident, size_t size)
data/udftools-2.2/libudffs/misc.c:41: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[127*4+1];
data/udftools-2.2/libudffs/misc.c:46:47:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		len = decode_utf8((dchars *)vol_set_ident, (char *)buf, vol_set_ident[size-1], sizeof(buf));
data/udftools-2.2/libudffs/misc.c:132: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("/dev/urandom", O_RDONLY);
data/udftools-2.2/libudffs/unicode.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 cbuf[MB_LEN_MAX];
data/udftools-2.2/libudffs/unicode.c:281: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(out+len, cbuf, clen);
data/udftools-2.2/libudffs/unicode.c:398: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(out, &in[1], inlen);
data/udftools-2.2/libudffs/unicode.c:462: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(&out[1], in, inlen);
data/udftools-2.2/mkudffs/file.c:459: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(adiu->impUse, &uniqueID_le32, sizeof(uniqueID_le32));
data/udftools-2.2/mkudffs/file.c:465: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(fid->impUseAndFileIdent, name, length);
data/udftools-2.2/mkudffs/file.c:492: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(adiu->impUse, &uniqueID_le32, sizeof(uniqueID_le32));
data/udftools-2.2/mkudffs/file.c:498: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(fid->impUseAndFileIdent, name, length);
data/udftools-2.2/mkudffs/file.c:605: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(&extendedAttr[location], ea, length);
data/udftools-2.2/mkudffs/file.c:645: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(&extendedAttr[location], ea, length);
data/udftools-2.2/mkudffs/file.c:669: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(&extendedAttr[le32_to_cpu(lengthExtendedAttr)], ea, length);
data/udftools-2.2/mkudffs/file.c:723: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(efe, &default_efe, sizeof(struct extendedFileEntry));
data/udftools-2.2/mkudffs/file.c:724: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(&efe->accessTime, &disc->udf_pvd[0]->recordingDateAndTime, sizeof(timestamp));
data/udftools-2.2/mkudffs/file.c:725: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(&efe->modificationTime, &efe->accessTime, sizeof(timestamp));
data/udftools-2.2/mkudffs/file.c:726: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(&efe->attrTime, &efe->accessTime, sizeof(timestamp));
data/udftools-2.2/mkudffs/file.c:727: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(&efe->createTime, &efe->accessTime, sizeof(timestamp));
data/udftools-2.2/mkudffs/file.c:738: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(disc->udf_lvid->logicalVolContentsUse, &uniqueID_le64, sizeof(uniqueID_le64));
data/udftools-2.2/mkudffs/file.c:786: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(fe, &default_fe, sizeof(struct fileEntry));
data/udftools-2.2/mkudffs/file.c:787: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(&fe->accessTime, &disc->udf_pvd[0]->recordingDateAndTime, sizeof(timestamp));
data/udftools-2.2/mkudffs/file.c:788: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(&fe->modificationTime, &fe->accessTime, sizeof(timestamp));
data/udftools-2.2/mkudffs/file.c:789: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(&fe->attrTime, &fe->accessTime, sizeof(timestamp));
data/udftools-2.2/mkudffs/file.c:800: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(disc->udf_lvid->logicalVolContentsUse, &uniqueID_le64, sizeof(uniqueID_le64));
data/udftools-2.2/mkudffs/file.c:919: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(&tmp, p, (size+7)/8);
data/udftools-2.2/mkudffs/file.c:940:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&tmp, p, (size+7)/8);
data/udftools-2.2/mkudffs/file.c:973: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(&tmp, p, (size+7)/8);
data/udftools-2.2/mkudffs/file.c:994:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&tmp, p, (size+7)/8);
data/udftools-2.2/mkudffs/file.c:1118: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(&disc->udf_lvid->data[sizeof(uint32_t)*0], &value, sizeof(value));
data/udftools-2.2/mkudffs/main.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[512];
data/udftools-2.2/mkudffs/main.c:223: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[512];
data/udftools-2.2/mkudffs/main.c:235:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int rem_fd = open(buf, O_RDONLY);
data/udftools-2.2/mkudffs/main.c:293: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(buffer + offset, data->buffer, data->length);
data/udftools-2.2/mkudffs/main.c:335: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[128*3];
data/udftools-2.2/mkudffs/main.c:342:31:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (fcntl(0, F_GETFL) < 0 && open("/dev/null", O_RDONLY) < 0)
data/udftools-2.2/mkudffs/main.c:344:31:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (fcntl(1, F_GETFL) < 0 && open("/dev/null", O_WRONLY) < 0)
data/udftools-2.2/mkudffs/main.c:346:31:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (fcntl(2, F_GETFL) < 0 && open("/dev/null", O_WRONLY) < 0)
data/udftools-2.2/mkudffs/main.c:358: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(filename, O_RDONLY);
data/udftools-2.2/mkudffs/main.c:377: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 filename2[64];
data/udftools-2.2/mkudffs/main.c:407:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd2 = open(filename2, flags2);
data/udftools-2.2/mkudffs/main.c:412:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				fd2 = open(filename, flags2);
data/udftools-2.2/mkudffs/main.c:490: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(filename, O_RDWR | O_CREAT | O_EXCL, 0660);
data/udftools-2.2/mkudffs/mkudffs.c:56: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		uuid[17];
data/udftools-2.2/mkudffs/mkudffs.c:110: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(disc->udf_pvd[0], &default_pvd, sizeof(struct primaryVolDesc));
data/udftools-2.2/mkudffs/mkudffs.c:111: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(&disc->udf_pvd[0]->recordingDateAndTime, &ts, sizeof(timestamp));
data/udftools-2.2/mkudffs/mkudffs.c:113: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(&disc->udf_pvd[0]->volSetIdent[1], uuid, 16);
data/udftools-2.2/mkudffs/mkudffs.c:123: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(disc->udf_lvd[0], &default_lvd, sizeof(struct logicalVolDesc));
data/udftools-2.2/mkudffs/mkudffs.c:132: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(disc->udf_pd[0], &default_pd, sizeof(struct partitionDesc));
data/udftools-2.2/mkudffs/mkudffs.c:140: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(disc->udf_usd[0], &default_usd, sizeof(struct unallocSpaceDesc));
data/udftools-2.2/mkudffs/mkudffs.c:148: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(disc->udf_iuvd[0], &default_iuvd, sizeof(struct impUseVolDesc));
data/udftools-2.2/mkudffs/mkudffs.c:149: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(query_iuvdiu(disc), &default_iuvdiu, sizeof(struct impUseVolDescImpUse));
data/udftools-2.2/mkudffs/mkudffs.c:161: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(disc->udf_td[0], &default_td, sizeof(struct terminatingDesc));
data/udftools-2.2/mkudffs/mkudffs.c:169: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(disc->udf_lvid, &default_lvid, sizeof(struct logicalVolIntegrityDesc));
data/udftools-2.2/mkudffs/mkudffs.c:170: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(&disc->udf_lvid->recordingDateAndTime, &ts, sizeof(timestamp));
data/udftools-2.2/mkudffs/mkudffs.c:171: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(query_lvidiu(disc), &default_lvidiu, sizeof(struct logicalVolIntegrityDescImpUse));
data/udftools-2.2/mkudffs/mkudffs.c:179: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(disc->udf_stable[0], &default_stable, sizeof(struct sparingTable));
data/udftools-2.2/mkudffs/mkudffs.c:187: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(disc->udf_fsd, &default_fsd, sizeof(struct fileSetDesc));
data/udftools-2.2/mkudffs/mkudffs.c:188:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&disc->udf_fsd->recordingDateAndTime, &ts, sizeof(timestamp));
data/udftools-2.2/mkudffs/mkudffs.c:520: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(&disc->udf_lvid->data[sizeof(uint32_t)*i], &value, sizeof(value));
data/udftools-2.2/mkudffs/mkudffs.c:528: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(&disc->udf_lvid->data[sizeof(uint32_t)*le32_to_cpu(disc->udf_lvd[0]->numPartitionMaps) + sizeof(uint32_t)*i], &value, sizeof(value));
data/udftools-2.2/mkudffs/mkudffs.c:593: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(mbr, &default_mbr, sizeof(struct mbr));
data/udftools-2.2/mkudffs/mkudffs.c:672: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(disc->udf_vrs[0]->stdIdent, VSD_STD_ID_BEA01, VSD_STD_ID_LEN);
data/udftools-2.2/mkudffs/mkudffs.c:682: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(disc->udf_vrs[1]->stdIdent, VSD_STD_ID_NSR03, VSD_STD_ID_LEN);
data/udftools-2.2/mkudffs/mkudffs.c:684: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(disc->udf_vrs[1]->stdIdent, VSD_STD_ID_NSR02, VSD_STD_ID_LEN);
data/udftools-2.2/mkudffs/mkudffs.c:693: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(disc->udf_vrs[2]->stdIdent, VSD_STD_ID_TEA01, VSD_STD_ID_LEN);
data/udftools-2.2/mkudffs/mkudffs.c:842: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(&disc->udf_lvid->data[sizeof(uint32_t)*0], &value, sizeof(value));
data/udftools-2.2/mkudffs/mkudffs.c:960: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(disc->udf_lvd[0]->logicalVolContentsUse, &ad, sizeof(ad));
data/udftools-2.2/mkudffs/mkudffs.c:1147: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(disc->udf_pvd[1] = desc->data->buffer, disc->udf_pvd[0], length);
data/udftools-2.2/mkudffs/mkudffs.c:1167: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(disc->udf_lvd[1] = desc->data->buffer, disc->udf_lvd[0], length);
data/udftools-2.2/mkudffs/mkudffs.c:1194: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(disc->udf_pd[1] = desc->data->buffer, disc->udf_pd[0], length);
data/udftools-2.2/mkudffs/mkudffs.c:1230: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(disc->udf_usd[1] = desc->data->buffer, disc->udf_usd[0], length);
data/udftools-2.2/mkudffs/mkudffs.c:1247: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(disc->udf_iuvd[1] = desc->data->buffer, disc->udf_iuvd[0], length);
data/udftools-2.2/mkudffs/mkudffs.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(disc->udf_td[1] = desc->data->buffer, disc->udf_td[0], length);
data/udftools-2.2/mkudffs/mkudffs.c:1354: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(disc->udf_stable[i] = desc->data->buffer, disc->udf_stable[0], length);
data/udftools-2.2/mkudffs/mkudffs.c:1410: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(vat20->logicalVolIdent, disc->udf_lvd[0]->logicalVolIdent, 128);
data/udftools-2.2/mkudffs/mkudffs.c:1420: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(&buffer, &default_iuea, sizeof(default_iuea));
data/udftools-2.2/mkudffs/mkudffs.c:1442: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(ea_lv->logicalVolIdent, disc->udf_lvd[0]->logicalVolIdent, 128);
data/udftools-2.2/mkudffs/mkudffs.c:1519: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(pm, &default_sparmap, sizeof(struct sparablePartitionMap));
data/udftools-2.2/mkudffs/mkudffs.c:1592: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(pm, &default_virtmap, sizeof(struct virtualPartitionMap));
data/udftools-2.2/mkudffs/mkudffs.c:1614: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 *udf_space_type_str[UDF_SPACE_TYPE_SIZE] = { "RESERVED", "VRS", "ANCHOR", "MVDS", "RVDS", "LVID", "STABLE", "SSPACE", "PSPACE", "USPACE", "BAD", "MBR" };
data/udftools-2.2/mkudffs/mkudffs.h:61: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.
extern char *udf_space_type_str[UDF_SPACE_TYPE_SIZE];
data/udftools-2.2/mkudffs/options.c:274:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(iuvdiu->logicalVolIdent, disc->udf_lvd[0]->logicalVolIdent, 128);
data/udftools-2.2/mkudffs/options.c:275:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(disc->udf_fsd->logicalVolIdent, disc->udf_lvd[0]->logicalVolIdent, 128);
data/udftools-2.2/mkudffs/options.c:287:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(disc->udf_pvd[0]->volIdent, disc->udf_lvd[0]->logicalVolIdent, 32);
data/udftools-2.2/mkudffs/options.c:340:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&disc->udf_pvd[0]->volSetIdent[1+16*(ts[0]/8)], &ts[1], len-1+(ts[0]/8));
data/udftools-2.2/mkudffs/options.c:364:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&disc->udf_pvd[0]->volSetIdent[1], optarg, 16);
data/udftools-2.2/mkudffs/options.c:671: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(*device, O_RDONLY);
data/udftools-2.2/mkudffs/options.c:681:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			unsigned char features[8];
data/udftools-2.2/mkudffs/options.c:682:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			unsigned char discinfo[36];
data/udftools-2.2/pktsetup/pktsetup.c:95:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((pkt_fd = open(pkt_device, O_RDONLY)) == -1) {
data/udftools-2.2/pktsetup/pktsetup.c:102:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((dev_fd = open(device, O_RDONLY | O_NONBLOCK)) == -1) {
data/udftools-2.2/pktsetup/pktsetup.c:162: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[64];
data/udftools-2.2/pktsetup/pktsetup.c:165:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((f = fopen("/proc/misc", "r")) == NULL)
data/udftools-2.2/pktsetup/pktsetup.c:179: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[512];
data/udftools-2.2/pktsetup/pktsetup.c:283:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((ctl_fd = open(pkt_dev_name(CTL_DEV), O_RDONLY)) < 0) {
data/udftools-2.2/pktsetup/pktsetup.c:289:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((dev_fd = open(device, O_RDONLY | O_NONBLOCK)) == -1) {
data/udftools-2.2/pktsetup/pktsetup.c:394:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((ctl_fd = open(pkt_dev_name(CTL_DEV), O_RDONLY)) < 0) {
data/udftools-2.2/udfinfo/main.c: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 buf[256];
data/udftools-2.2/udfinfo/main.c:144:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *udf_space_type_str[UDF_SPACE_TYPE_SIZE] = { "RESERVED", "VRS", "ANCHOR", "MVDS", "RVDS", "LVID", "STABLE", "SSPACE", "PSPACE", "USPACE", "BAD", "MBR" };
data/udftools-2.2/udfinfo/main.c:169: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 uuid[17];
data/udftools-2.2/udfinfo/main.c:202: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(filename, O_RDONLY);
data/udftools-2.2/udfinfo/main.c:211:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd2 = open(filename, O_RDONLY|O_EXCL);
data/udftools-2.2/udfinfo/main.c:264: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(vsid, pvd->volSetIdent, 128);
data/udftools-2.2/udfinfo/main.c:277: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(vsid + 1, pvd->volSetIdent + vsid[0]*ret + 1, vsid[127] - 1);
data/udftools-2.2/udfinfo/readdisc.c:107: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(disc->udf_vrs[0], &vsd, sizeof(vsd));
data/udftools-2.2/udfinfo/readdisc.c:122: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(disc->udf_vrs[1], &vsd, sizeof(vsd));
data/udftools-2.2/udfinfo/readdisc.c:136: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(disc->udf_vrs[2], &vsd, sizeof(vsd));
data/udftools-2.2/udfinfo/readdisc.c:220: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(disc->udf_anchor[i], &avdp, sizeof(avdp));
data/udftools-2.2/udfinfo/readdisc.c:520: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 buffer[512];
data/udftools-2.2/udfinfo/readdisc.c:624:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(gd_ptr, &buffer, sizeof(buffer));
data/udftools-2.2/udfinfo/readdisc.c:719:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(lvd, &buffer, gd_length);
data/udftools-2.2/udfinfo/readdisc.c:722:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(lvd, &buffer, sizeof(buffer));
data/udftools-2.2/udfinfo/readdisc.c:778:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(usd, &buffer, gd_length);
data/udftools-2.2/udfinfo/readdisc.c:781:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(usd, &buffer, sizeof(buffer));
data/udftools-2.2/udfinfo/readdisc.c:837: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 buffer[512];
data/udftools-2.2/udfinfo/readdisc.c:914: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(lvid, &buffer, lvid_length);
data/udftools-2.2/udfinfo/readdisc.c:917: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(lvid, &buffer, sizeof(buffer));
data/udftools-2.2/udfinfo/readdisc.c:1177: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 buffer[512];
data/udftools-2.2/udfinfo/readdisc.c:1239: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(disc->udf_stable[i], &buffer, st_len);
data/udftools-2.2/udfinfo/readdisc.c:1242: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(disc->udf_stable[i], &buffer, sizeof(buffer));
data/udftools-2.2/udfinfo/readdisc.c:1297: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 buffer[512];
data/udftools-2.2/udfinfo/readdisc.c:1601: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(disc->udf_lvd[0]->logicalVolIdent, ea_lv.logicalVolIdent, sizeof(ea_lv.logicalVolIdent));
data/udftools-2.2/udfinfo/readdisc.c:1603: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(disc->udf_lvd[1]->logicalVolIdent, ea_lv.logicalVolIdent, sizeof(ea_lv.logicalVolIdent));
data/udftools-2.2/udfinfo/readdisc.c:1627: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(disc->udf_lvd[0]->logicalVolIdent, vat20->logicalVolIdent, sizeof(vat20->logicalVolIdent));
data/udftools-2.2/udfinfo/readdisc.c:1629: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(disc->udf_lvd[1]->logicalVolIdent, vat20->logicalVolIdent, sizeof(vat20->logicalVolIdent));
data/udftools-2.2/udfinfo/readdisc.c:1670: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 buffer[512];
data/udftools-2.2/udfinfo/readdisc.c:2071:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			((unsigned char *)buffer)[bytes-1] &= (1 << bits) - 1;
data/udftools-2.2/udfinfo/readdisc.c:2089: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 buffer[512];
data/udftools-2.2/udfinfo/readdisc.c:2136: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(use, &buffer, use_len);
data/udftools-2.2/udfinfo/readdisc.c:2139: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(use, &buffer, sizeof(buffer));
data/udftools-2.2/udflabel/main.c:194: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/udftools-2.2/udflabel/main.c:199: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 new_uuid[17];
data/udftools-2.2/udflabel/main.c:208:31:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (fcntl(0, F_GETFL) < 0 && open("/dev/null", O_RDONLY) < 0)
data/udftools-2.2/udflabel/main.c:210:31:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (fcntl(1, F_GETFL) < 0 && open("/dev/null", O_WRONLY) < 0)
data/udftools-2.2/udflabel/main.c:212:31:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (fcntl(2, F_GETFL) < 0 && open("/dev/null", O_WRONLY) < 0)
data/udftools-2.2/udflabel/main.c:268: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(filename, O_RDONLY);
data/udftools-2.2/udflabel/main.c:284: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 filename2[64];
data/udftools-2.2/udflabel/main.c:302:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd2 = open(filename2, flags2);
data/udftools-2.2/udflabel/main.c:307:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				fd2 = open(filename, flags2);
data/udftools-2.2/udflabel/main.c:321:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd2 = open(filename, O_RDONLY|O_EXCL);
data/udftools-2.2/udflabel/main.c:509: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(new_vsid+1, disc.udf_pvd[0]->volSetIdent+1+32, 127-1-32);
data/udftools-2.2/udflabel/main.c:515: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(new_vsid+1, disc.udf_pvd[0]->volSetIdent+1+16, 127-1-16);
data/udftools-2.2/udflabel/main.c:523: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(new_fullvsid+1, new_uuid, 16);
data/udftools-2.2/udflabel/main.c:526: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(new_fullvsid+1+16, new_vsid+1, 127-1-16);
data/udftools-2.2/udflabel/main.c:540: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(new_fullvsid+1+32, new_vsid+1, 127-1-32);
data/udftools-2.2/udflabel/main.c:588: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(disc.udf_lvd[0]->logicalVolIdent, new_lvid, sizeof(new_lvid));
data/udftools-2.2/udflabel/main.c:589: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(disc.udf_lvd[1]->logicalVolIdent, new_lvid, sizeof(new_lvid));
data/udftools-2.2/udflabel/main.c:591: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(iuvdiu->logicalVolIdent, new_lvid, sizeof(new_lvid));
data/udftools-2.2/udflabel/main.c:593: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(iuvdiu->logicalVolIdent, new_lvid, sizeof(new_lvid));
data/udftools-2.2/udflabel/main.c:594: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(disc.udf_fsd->logicalVolIdent, new_lvid, sizeof(new_lvid));
data/udftools-2.2/udflabel/main.c:602: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(disc.udf_pvd[0]->volIdent, new_vid, sizeof(new_vid));
data/udftools-2.2/udflabel/main.c:603: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(disc.udf_pvd[1]->volIdent, new_vid, sizeof(new_vid));
data/udftools-2.2/udflabel/main.c:611: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(disc.udf_fsd->fileSetIdent, new_fsid, sizeof(new_fsid));
data/udftools-2.2/udflabel/main.c:645: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(disc.udf_pvd[0]->volSetIdent, new_fullvsid, sizeof(new_fullvsid));
data/udftools-2.2/udflabel/main.c:646: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(disc.udf_pvd[1]->volSetIdent, new_fullvsid, sizeof(new_fullvsid));
data/udftools-2.2/udflabel/options.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(new_uuid, arg, 17);
data/udftools-2.2/udflabel/options.c:153: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(new_vid, new_lvid, 32);
data/udftools-2.2/wrudf/ide-pc.c:60:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char str[128];
data/udftools-2.2/wrudf/ide-pc.c:62:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(str, "Stat %d Err %02X  Key %02Xx; ASC %02Xx; ASCQ %02Xx; Info %02X%02X%02X%02Xx",
data/udftools-2.2/wrudf/ide-pc.c:85: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(&pc.cmd[2], &start_be32, sizeof(start_be32));/* blank track tail : lba to start blanking
data/udftools-2.2/wrudf/ide-pc.c:139: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(&pc.cmd[2], &readspeed_be16, sizeof(readspeed_be16));
data/udftools-2.2/wrudf/ide-pc.c:140: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(&pc.cmd[4], &writespeed_be16, sizeof(writespeed_be16));
data/udftools-2.2/wrudf/ide-pc.c:242: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(&pc.cmd[7], &size_be16, sizeof(size_be16));
data/udftools-2.2/wrudf/ide-pc.c:259: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(&pc.cmd[5], &size_be32, sizeof(size_be32));
data/udftools-2.2/wrudf/ide-pc.c:284: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(&pc.cmd[7], &size_be16, sizeof(size_be16));
data/udftools-2.2/wrudf/ide-pc.c:305: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(&pc.cmd[2], &block_be32, sizeof(block_be32));
data/udftools-2.2/wrudf/ide-pc.c:306: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(&pc.cmd[7], &size_be16, sizeof(size_be16));
data/udftools-2.2/wrudf/ide-pc.c:326: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(&pc.cmd[2], &trackno_be32, sizeof(trackno_be32));
data/udftools-2.2/wrudf/ide-pc.c:327: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(&pc.cmd[7], &size_be16, sizeof(size_be16));	/* 28; if higher data underrun error */
data/udftools-2.2/wrudf/ide-pc.c:351: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(&pc.cmd[2], &lba_be32, sizeof(lba_be32));
data/udftools-2.2/wrudf/ide-pc.c:370: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(&pc.cmd[2], &lba_be32, sizeof(lba_be32));
data/udftools-2.2/wrudf/ide-pc.c:371: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(&pc.cmd[7], &nblks_be16, sizeof(nblks_be16));
data/udftools-2.2/wrudf/ide-pc.c:388: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(&pc.cmd[2], &lba_be32, sizeof(lba_be32));
data/udftools-2.2/wrudf/ide-pc.c:426: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(&pc.cmd[7], &len_be16, sizeof(len_be16));
data/udftools-2.2/wrudf/ide-pc.c:445: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(&pc.cmd[7], &size_be16, sizeof(size_be16));
data/udftools-2.2/wrudf/ide-pc.c:464: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(&pc.cmd[7], &len_be16, sizeof(len_be16));
data/udftools-2.2/wrudf/ide-pc.c:482: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(&pc.cmd[2], &tmp_be16, sizeof(tmp_be16));
data/udftools-2.2/wrudf/ide-pc.c:484: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(&pc.cmd[7], &tmp_be16, sizeof(tmp_be16));	// only to see how much will be returned
data/udftools-2.2/wrudf/ide-pc.c:501: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(&pc.cmd[7], &tmp_be16, sizeof(tmp_be16));
data/udftools-2.2/wrudf/ide-pc.h: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	vendor_info[8];		/*  8 */
data/udftools-2.2/wrudf/ide-pc.h:56: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	prod_ident[16];		/* 16 */
data/udftools-2.2/wrudf/ide-pc.h: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	prod_revision[4];	/* 32 */
data/udftools-2.2/wrudf/ide-pc.h:58: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_uniq[20];	/* 36 */
data/udftools-2.2/wrudf/ide-pc.h:59: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	reserved[40];		/* 56 to 96 */
data/udftools-2.2/wrudf/wrudf-cdr.c:192: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(ext+1, ext, sizeof(long_ad));
data/udftools-2.2/wrudf/wrudf-cdr.c:302: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(vat, fe->extendedAttrAndAllocDescs + fe->lengthExtendedAttr, fe->informationLength - 36);
data/udftools-2.2/wrudf/wrudf-cdr.c:327: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(id->identSuffix, &udf_rev_le16, sizeof(udf_rev_le16));
data/udftools-2.2/wrudf/wrudf-cdr.c:331: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((uint8_t *)id+sizeof(*id), &prevVATlbn_le32, sizeof(prevVATlbn_le32));
data/udftools-2.2/wrudf/wrudf-cdr.c:345:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(fe->extendedAttrAndAllocDescs, vat, size);
data/udftools-2.2/wrudf/wrudf-cdrw.c:92: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(&lvid->data[sizeof(uint32_t)*pd->partitionNumber], &value, sizeof(value));
data/udftools-2.2/wrudf/wrudf-cdrw.c:393: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, st, sizeof(struct sparingTable) + st->reallocationTableLen * sizeof(struct sparingEntry));
data/udftools-2.2/wrudf/wrudf-cdrw.c:636: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(p, src, 2048);
data/udftools-2.2/wrudf/wrudf-cdrw.c:711: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, p, 2048);
data/udftools-2.2/wrudf/wrudf-cdrw.c:802:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if( (device = open(filename, O_RDWR)) < 0 ) {
data/udftools-2.2/wrudf/wrudf-cdrw.c:835:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if( (device = open(filename, O_RDONLY | O_NONBLOCK )) < 0 )
data/udftools-2.2/wrudf/wrudf-cmnd.c:57:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(inName, O_RDONLY);
data/udftools-2.2/wrudf/wrudf-cmnd.c:136:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&adiu->impUse, &fe->uniqueID, sizeof(uint32_t));
data/udftools-2.2/wrudf/wrudf-cmnd.c:143:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&adiu->impUse, &fe->uniqueID, sizeof(uint32_t));
data/udftools-2.2/wrudf/wrudf-cmnd.c:247: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(&adiu->impUse, &fe->uniqueID, sizeof(uint32_t));
data/udftools-2.2/wrudf/wrudf-cmnd.c:428: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(dir->fe, p, 2048);
data/udftools-2.2/wrudf/wrudf-cmnd.c:432: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(dir->data, fe->extendedAttrAndAllocDescs + fe->lengthExtendedAttr, fe->lengthAllocDescs);
data/udftools-2.2/wrudf/wrudf-cmnd.c:483: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(fe->extendedAttrAndAllocDescs + fe->lengthExtendedAttr, dir->data, fe->lengthAllocDescs);
data/udftools-2.2/wrudf/wrudf-cmnd.c:508:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(&adiu->impUse, &fe->uniqueID, sizeof(uint32_t));
data/udftools-2.2/wrudf/wrudf-cmnd.c:632: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(&adiu->impUse, &fe->uniqueID, sizeof(uint32_t));
data/udftools-2.2/wrudf/wrudf-cmnd.c:675: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(&newDir->fe, fe, 2048);
data/udftools-2.2/wrudf/wrudf-cmnd.c:676: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(newDir->data, backFid, fe->informationLength);
data/udftools-2.2/wrudf/wrudf-cmnd.c:991:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	*name, filename[512];
data/udftools-2.2/wrudf/wrudf-cmnd.c:1015:6:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	    strcpy(filename, "..");
data/udftools-2.2/wrudf/wrudf-cmnd.c:1063:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	cmnd[128];
data/udftools-2.2/wrudf/wrudf-cmnd.c:1068:5:  [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(cmnd, "ls -l ");
data/udftools-2.2/wrudf/wrudf-desc.c:40: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(fid, (char *)fid + lenFID, lenMove);
data/udftools-2.2/wrudf/wrudf-desc.c:220: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(fid->impUseAndFileIdent + fid->lengthOfImpUse, uName, fid->lengthFileIdent);
data/udftools-2.2/wrudf/wrudf-desc.c:245: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(dir->data + fe->informationLength, fid, lenFid);
data/udftools-2.2/wrudf/wrudf.c:33: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	line[256];
data/udftools-2.2/wrudf/wrudf.c:99:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char			zeroes[5];
data/udftools-2.2/wrudf/wrudf.c:100:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char                        fsdOut[91];
data/udftools-2.2/wrudf/wrudf.c:196:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(pd, p, 512);
data/udftools-2.2/wrudf/wrudf.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(lvd, p, 512);
data/udftools-2.2/wrudf/wrudf.c:219: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(usd, p, 512);
data/udftools-2.2/wrudf/wrudf.c:249: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(st, p, spm->sizeSparingTable);
data/udftools-2.2/wrudf/wrudf.c:287:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(fsd, p, 512);
data/udftools-2.2/wrudf/wrudf.c:308:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy( (uint8_t*)spaceMap + i, (uint8_t*) p, 2048);
data/udftools-2.2/wrudf/wrudf.c:349:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(lvid, p, size);
data/udftools-2.2/wrudf/wrudf.c:412: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(lvid->data + 2 * sizeof(uint32_t) * lvid->numOfPartitions, &entityWRUDF, sizeof(regid));
data/udftools-2.2/wrudf/wrudf.c:424: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( p, lvid, size);
data/udftools-2.2/wrudf/wrudf.c:452: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( p, (uint8_t*)spaceMap + i, 2048);
data/udftools-2.2/wrudf/wrudf.c:471: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, lvid, size);
data/udftools-2.2/wrudf/wrudf.c:495:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(p, usd, size);
data/udftools-2.2/wrudf/wrudf.c:504:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(p, usd, size);
data/udftools-2.2/wrudf/wrudf.c:671:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char	prompt[256];
data/udftools-2.2/wrudf/wrudf.c:701:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ptr, d->name, len);
data/udftools-2.2/wrudf/wrudf.c:708:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ptr, "...", 3);
data/udftools-2.2/wrudf/wrudf.c:713:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy(ptr, d->name, len);
data/udftools-2.2/wrudf/wrudf.c:717: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(ptr, " > ", 4);
data/udftools-2.2/wrudf/wrudf.h:52: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.
extern char	line[256];
data/udftools-2.2/cdrwtool/main.c:138:2:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	getchar();
data/udftools-2.2/libudffs/misc.c:135:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(fd, &value, sizeof(value)) == sizeof(value))
data/udftools-2.2/libudffs/misc.c:164:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	do ret = read(fd, buf, count);
data/udftools-2.2/libudffs/unicode.c:104: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).
	size_t inlen = strlen(in);
data/udftools-2.2/libudffs/unicode.c:213:9:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t wcslen, clen;
data/udftools-2.2/libudffs/unicode.c:458:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t inlen = strlen(in);
data/udftools-2.2/mkudffs/mkudffs.c:114: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).
	disc->udf_pvd[0]->volIdent[31] = strlen((char *)disc->udf_pvd[0]->volIdent);
data/udftools-2.2/mkudffs/mkudffs.c:115: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).
	disc->udf_pvd[0]->volSetIdent[127] = strlen((char *)disc->udf_pvd[0]->volSetIdent);
data/udftools-2.2/mkudffs/mkudffs.c:124:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	disc->udf_lvd[0]->logicalVolIdent[127] = strlen((char *)disc->udf_lvd[0]->logicalVolIdent);
data/udftools-2.2/mkudffs/mkudffs.c:150:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	query_iuvdiu(disc)->logicalVolIdent[127] = strlen((char *)query_iuvdiu(disc)->logicalVolIdent);
data/udftools-2.2/mkudffs/mkudffs.c:151:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	query_iuvdiu(disc)->LVInfo1[35] = strlen((char *)query_iuvdiu(disc)->LVInfo1);
data/udftools-2.2/mkudffs/mkudffs.c:152:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	query_iuvdiu(disc)->LVInfo2[35] = strlen((char *)query_iuvdiu(disc)->LVInfo2);
data/udftools-2.2/mkudffs/mkudffs.c:153:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	query_iuvdiu(disc)->LVInfo3[35] = strlen((char *)query_iuvdiu(disc)->LVInfo3);
data/udftools-2.2/mkudffs/mkudffs.c:189: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).
	disc->udf_fsd->logicalVolIdent[127] = strlen((char *)disc->udf_fsd->logicalVolIdent);
data/udftools-2.2/mkudffs/mkudffs.c:190:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	disc->udf_fsd->fileSetIdent[31] = strlen((char *)disc->udf_fsd->fileSetIdent);
data/udftools-2.2/mkudffs/mkudffs.c:191:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	disc->udf_fsd->copyrightFileIdent[31] = strlen((char *)disc->udf_fsd->copyrightFileIdent);
data/udftools-2.2/mkudffs/mkudffs.c:192: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).
	disc->udf_fsd->abstractFileIdent[31] = strlen((char *)disc->udf_fsd->abstractFileIdent);
data/udftools-2.2/mkudffs/mkudffs.c:1400:74:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		vtable = udf_create(disc, pspace, (const dchars *)"\x08" UDF_ID_ALLOC, strlen(UDF_ID_ALLOC)+1, offset, NULL, FID_FILE_CHAR_HIDDEN, ICBTAG_FILE_TYPE_VAT20, 0);
data/udftools-2.2/mkudffs/mkudffs.c:1417:74:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		vtable = udf_create(disc, pspace, (const dchars *)"\x08" UDF_ID_ALLOC, strlen(UDF_ID_ALLOC)+1, offset, NULL, FID_FILE_CHAR_HIDDEN, ICBTAG_FILE_TYPE_UNDEF, 0);
data/udftools-2.2/mkudffs/mkudffs.c:1559:64:  [1] (buffer) strlen:
  Does not handle 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((char *)pm2->partIdent.ident, UDF_ID_SPARABLE, strlen(UDF_ID_SPARABLE)))
data/udftools-2.2/mkudffs/options.c:349:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(optarg) != 16)
data/udftools-2.2/pktsetup/pktsetup.c:167:9:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	while (fscanf(f, " %d %63s", &minor, name) == 2) {
data/udftools-2.2/udflabel/options.c:111: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(arg) != 16)
data/udftools-2.2/wrudf/wrudf-cdr.c:67:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	stat = read(device, blockBuffer, 2048);
data/udftools-2.2/wrudf/wrudf-cdrw.c:434:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(device, pb->pkt, 32 * 2048);
data/udftools-2.2/wrudf/wrudf-cdrw.c:588:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(device, blockBuffer, 2048);
data/udftools-2.2/wrudf/wrudf-cdrw.c:664:89:  [1] (buffer) strlen:
  Does not handle 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((char *)((struct sparingTable*)block)->sparingIdent.ident, UDF_ID_SPARING, strlen(UDF_ID_SPARING)) != 0 ) {
data/udftools-2.2/wrudf/wrudf-cdrw.c:811:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(device, &ident, 2);
data/udftools-2.2/wrudf/wrudf-cmnd.c:182:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    nBytes += read(fd, p, 2048);
data/udftools-2.2/wrudf/wrudf-cmnd.c:237:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nBytes += read(fd, p, 2048);
data/udftools-2.2/wrudf/wrudf-cmnd.c:352:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(name, (char *)(fid->impUseAndFileIdent + fid->lengthOfImpUse), fid->lengthFileIdent);
data/udftools-2.2/wrudf/wrudf-cmnd.c:410: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).
	    dir->name = malloc(strlen(name) + 1);
data/udftools-2.2/wrudf/wrudf-cmnd.c:424:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	dir->name = malloc(strlen(name) + 1);
data/udftools-2.2/wrudf/wrudf-cmnd.c:672: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).
    newDir->name = malloc(strlen(name)+1);
data/udftools-2.2/wrudf/wrudf-cmnd.c:723: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(comp);
data/udftools-2.2/wrudf/wrudf-cmnd.c:1071:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(cmnd, cmndv[0], sizeof(cmnd)-strlen("ls -l ")-1);
data/udftools-2.2/wrudf/wrudf-cmnd.c:1071: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).
	strncat(cmnd, cmndv[0], sizeof(cmnd)-strlen("ls -l ")-1);
data/udftools-2.2/wrudf/wrudf.c:242:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    if( strncmp((char *)spm->partIdent.ident, UDF_ID_SPARABLE, strlen(UDF_ID_SPARABLE)) == 0 ) {
data/udftools-2.2/wrudf/wrudf.c:257:71:  [1] (buffer) strlen:
  Does not handle 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((char *)spm->partIdent.ident, UDF_ID_VIRTUAL, strlen(UDF_ID_VIRTUAL)) == 0 )
data/udftools-2.2/wrudf/wrudf.c:698: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(d->name);
data/udftools-2.2/wrudf/wrudf.c:706: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(d->name);

ANALYSIS SUMMARY:

Hits = 307
Lines analyzed = 18912 in approximately 0.57 seconds (33366 lines/second)
Physical Source Lines of Code (SLOC) = 14882
Hits@level = [0] 627 [1]  41 [2] 249 [3]   6 [4]  11 [5]   0
Hits@level+ = [0+] 934 [1+] 307 [2+] 266 [3+]  17 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 62.7604 [1+] 20.6289 [2+] 17.8739 [3+] 1.14232 [4+] 0.739148 [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.