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/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/squashfs.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/squashfs2_0.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs_i.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs_sb.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/block.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/cache.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/dir.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/export.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/file.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/fragment.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/id.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/inode.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/namei.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/squashfs.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/squashfs_fs.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/squashfs_fs_i.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/squashfs_fs_sb.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/super.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/symlink.c
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/include/linux/squashfs_fs.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/include/linux/squashfs_fs_i.h
Examining data/squashfs-tools-4.4/kernel/kernel-2.6/include/linux/squashfs_fs_sb.h
Examining data/squashfs-tools-4.4/squashfs-tools/action.c
Examining data/squashfs-tools-4.4/squashfs-tools/action.h
Examining data/squashfs-tools-4.4/squashfs-tools/caches-queues-lists.c
Examining data/squashfs-tools-4.4/squashfs-tools/caches-queues-lists.h
Examining data/squashfs-tools-4.4/squashfs-tools/compressor.c
Examining data/squashfs-tools-4.4/squashfs-tools/compressor.h
Examining data/squashfs-tools-4.4/squashfs-tools/error.h
Examining data/squashfs-tools-4.4/squashfs-tools/fnmatch_compat.h
Examining data/squashfs-tools-4.4/squashfs-tools/gzip_wrapper.c
Examining data/squashfs-tools-4.4/squashfs-tools/info.c
Examining data/squashfs-tools-4.4/squashfs-tools/info.h
Examining data/squashfs-tools-4.4/squashfs-tools/lz4_wrapper.c
Examining data/squashfs-tools-4.4/squashfs-tools/lzma_wrapper.c
Examining data/squashfs-tools-4.4/squashfs-tools/lzma_xz_wrapper.c
Examining data/squashfs-tools-4.4/squashfs-tools/lzo_wrapper.c
Examining data/squashfs-tools-4.4/squashfs-tools/process_fragments.c
Examining data/squashfs-tools-4.4/squashfs-tools/process_fragments.h
Examining data/squashfs-tools-4.4/squashfs-tools/progressbar.c
Examining data/squashfs-tools-4.4/squashfs-tools/progressbar.h
Examining data/squashfs-tools-4.4/squashfs-tools/pseudo.c
Examining data/squashfs-tools-4.4/squashfs-tools/pseudo.h
Examining data/squashfs-tools-4.4/squashfs-tools/read_file.c
Examining data/squashfs-tools-4.4/squashfs-tools/read_fs.h
Examining data/squashfs-tools-4.4/squashfs-tools/restore.c
Examining data/squashfs-tools-4.4/squashfs-tools/restore.h
Examining data/squashfs-tools-4.4/squashfs-tools/sort.c
Examining data/squashfs-tools-4.4/squashfs-tools/sort.h
Examining data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h
Examining data/squashfs-tools-4.4/squashfs-tools/squashfs_fs.h
Examining data/squashfs-tools-4.4/squashfs-tools/squashfs_swap.h
Examining data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquash-123.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquash-34.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquash-4.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquashfs_info.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquashfs_info.h
Examining data/squashfs-tools-4.4/squashfs-tools/unsquashfs_xattr.c
Examining data/squashfs-tools-4.4/squashfs-tools/xattr.c
Examining data/squashfs-tools-4.4/squashfs-tools/xattr.h
Examining data/squashfs-tools-4.4/squashfs-tools/xz_wrapper.c
Examining data/squashfs-tools-4.4/squashfs-tools/zstd_wrapper.c
Examining data/squashfs-tools-4.4/squashfs-tools/zstd_wrapper.h
Examining data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c
Examining data/squashfs-tools-4.4/squashfs-tools/read_fs.c
Examining data/squashfs-tools-4.4/squashfs-tools/read_xattrs.c
Examining data/squashfs-tools-4.4/squashfs-tools/swap.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c
Examining data/squashfs-tools-4.4/squashfs-tools/unsquashfs.h
Examining data/squashfs-tools-4.4/squashfs-tools/xz_wrapper.h
Examining data/squashfs-tools-4.4/squashfs-tools/gzip_wrapper.h
Examining data/squashfs-tools-4.4/squashfs-tools/lz4_wrapper.h
Examining data/squashfs-tools-4.4/squashfs-tools/lzo_wrapper.h
Examining data/squashfs-tools-4.4/squashfs-tools/mksquashfs.h

FINAL RESULTS:

data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3580:11:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
			byte = readlink(filename, buff, 65536);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:810:6:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
		if(chown(pathname, uid, guid) == -1) {
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:819:37:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if((set_mode || (mode & 07000)) && chmod(pathname, (mode_t) mode) == -1) {
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:827:5:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
				chmod(pathname, (mode_t) (mode & ~01000)) == -1) {
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1625:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			res = chmod(parent_name, S_IRUSR|S_IWUSR|S_IXUSR);
data/squashfs-tools-4.4/squashfs-tools/action.c:2549:3:  [4] (shell) execlp:
  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.
		execlp("file", "file", "-b", action_data->pathname,
data/squashfs-tools-4.4/squashfs-tools/action.c:2645:3:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execl("/bin/sh", "sh", "-c", atom->argv[0], (char *) NULL);
data/squashfs-tools-4.4/squashfs-tools/action.h:75:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "Syntax error: "S, ##ARGS); \
data/squashfs-tools-4.4/squashfs-tools/action.h:84:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, "Syntax error in \"%s()\", arg %d: "S, TEST->name, \
data/squashfs-tools-4.4/squashfs-tools/error.h:56:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(stderr, s, ## args); \
data/squashfs-tools-4.4/squashfs-tools/error.h:65:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				fprintf(stderr, s, ## args); \
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3037:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
				strcat(strcat(b_buffer, "/"), pathname);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3041:4:  [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(b_buffer, pathname);
data/squashfs-tools-4.4/squashfs-tools/progressbar.c:236: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, fmt, ap);
data/squashfs-tools-4.4/squashfs-tools/progressbar.c:254:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(fmt, ap);
data/squashfs-tools-4.4/squashfs-tools/pseudo.c:239:3:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execl("/bin/sh", "sh", "-c", dev->command, (char *) NULL);
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:299:4:  [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->dirs[dir->dir_count].name, dire->name);
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:400:4:  [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->dirs[dir->dir_count].name, dire->name);
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:427:4:  [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->dirs[dir->dir_count].name, dire->name);
data/squashfs-tools-4.4/squashfs-tools/unsquash-4.c:363:4:  [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->dirs[dir->dir_count].name, dire->name);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:2432: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, fmt, ap);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:2449:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(fmt, ap);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:5324:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *time_string = getenv("SOURCE_DATE_EPOCH");
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:218: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(c_buffer + bytes, bh[k]->b_data + offset, avail_bytes);
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:343: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, msblk->block_cache[i].data +
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:356: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, msblk->block_cache[i].data +
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:976: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(sblk, &ssblk, sizeof(struct squashfs_super_block));
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1288: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 sblock_list[blocks << 2];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1455: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 block_list[SIZE];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1522: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(pageaddr, data_ptr + byte_offset,
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1534: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(pageaddr, data_ptr + byte_offset,
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1572: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 block_list[SIZE];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1598: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(pageaddr, msblk->read_page, bytes);
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1612: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(pageaddr, fragment->data + SQUASHFS_I(inode)->
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1692:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_index) + SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1694: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 str[SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1743:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_entry) + SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1878:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_entry) + SQUASHFS_NAME_LEN];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/squashfs2_0.c:483:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_index_2) + SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/squashfs2_0.c:485: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 str[SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/squashfs2_0.c:534:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_entry_2) + SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/squashfs2_0.c:641:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_entry_2) + SQUASHFS_NAME_LEN];
data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h:249:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char		name[0];
data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h:279: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			symlink[0];
data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h:337: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[0];
data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h:588: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			symlink[0];
data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h:674: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		name[0];
data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h:705: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			symlink[0];
data/squashfs-tools-4.4/kernel/kernel-2.4/include/linux/squashfs_fs.h:764: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[0];
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/block.c:249: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[page] + pg_offset,
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/cache.c:311: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(buffer, buff, remaining);
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/cache.c:316: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, buff, bytes);
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/squashfs_fs.h:243: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		name[0];
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/squashfs_fs.h:285: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			symlink[0];
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/squashfs_fs.h:366:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char			name[0];
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/super.c:71:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char b[BDEVNAME_SIZE];
data/squashfs-tools-4.4/kernel/kernel-2.6/include/linux/squashfs_fs.h:242: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		name[0];
data/squashfs-tools-4.4/kernel/kernel-2.6/include/linux/squashfs_fs.h:284: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			symlink[0];
data/squashfs-tools-4.4/kernel/kernel-2.6/include/linux/squashfs_fs.h:365: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[0];
data/squashfs-tools-4.4/squashfs-tools/action.c:647: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(expr_msg + cur_size, string, size);
data/squashfs-tools-4.4/squashfs-tools/action.c:2509:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char str[1024]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/action.c:2612:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open("/dev/null", O_RDWR);
data/squashfs-tools-4.4/squashfs-tools/action.c:2871: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(&eval_action, action_data, sizeof(struct action_data));
data/squashfs-tools-4.4/squashfs-tools/caches-queues-lists.h:124: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 data[0] __attribute__((aligned));
data/squashfs-tools-4.4/squashfs-tools/gzip_wrapper.c:76:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		compression_level = atoi(argv[1]);
data/squashfs-tools-4.4/squashfs-tools/gzip_wrapper.c:92:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		window_size = atoi(argv[1]);
data/squashfs-tools-4.4/squashfs-tools/gzip_wrapper.c:440: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(d, selected->buffer, selected->length);
data/squashfs-tools-4.4/squashfs-tools/lzma_xz_wrapper.c:104: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 lzma_header[LZMA_HEADER_SIZE];
data/squashfs-tools-4.4/squashfs-tools/lzma_xz_wrapper.c:112: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(lzma_header, src, LZMA_HEADER_SIZE);
data/squashfs-tools-4.4/squashfs-tools/lzo_wrapper.c:95:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		user_comp_level = atoi(argv[1]);
data/squashfs-tools-4.4/squashfs-tools/lzo_wrapper.c:368: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, stream->buffer, compsize);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:400: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_cache, sdata_cache, cache_bytes = scache_bytes);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:401: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(directory_data_cache, sdirectory_data_cache,
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:406: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(directory_table + directory_bytes, sdirectory_compressed,
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:448: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(d, s, size);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1009:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(p, index[i].name, index[i].index.size + 1);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1253: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(directory_data_cache + directory_cache_bytes, dir->buff,
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1312: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 buffer[SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1441: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->data, compressed_buffer->data, size);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1653: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((*fragment)->data + (*fragment)->size, file_buffer->data,
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1669: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 cbuffer[(SQUASHFS_METADATA_SIZE << 2) + 2];
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1737: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 read_from_file_buffer[SQUASHFS_FILE_MAX_SIZE];
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1750: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 read_from_file_buffer2[SQUASHFS_FILE_MAX_SIZE];
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:2231: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).
	file = open(pathname_reader(dir_ent), O_RDONLY);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:2309:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, &buf2, sizeof(struct stat));
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3114: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(&inode->symlink, symlink, bytes);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3115: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(&inode->buf, buf, sizeof(struct stat));
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3578: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.
			static char buff[65536]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4561: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 str[1024]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4728:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[MAX_LINE + 1]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4731: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).
	fd = fopen(argv, "r");
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4816: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).
	recoverfd = open(recovery_file, O_CREAT | O_TRUNC | O_RDWR, S_IRWXU);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4852: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 header2[RECOVER_ID_SIZE];
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4854: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).
	recoverfd = open(recovery_file, O_RDONLY);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4863: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(destination_file, O_RDWR);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4952: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 temp[4096] = {0};
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:5314:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	log_fd=fopen(filename, "w");
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:6039: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).
			fd = open(argv[source + 1], O_CREAT | O_TRUNC | O_RDWR,
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:6053: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(argv[source + 1], O_RDWR)) == -1) {
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:6061: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).
			fd = open(argv[source + 1], (delete ? O_TRUNC : 0) |
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:6250: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(sdata_cache, data_cache, scache_bytes);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:6251: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(sdirectory_data_cache, directory_data_cache +
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:6304: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(sdirectory_compressed, directory_table +
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.h:66: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			symlink[0];
data/squashfs-tools-4.4/squashfs-tools/process_fragments.c:200: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->data, compressed_buffer->data, size);
data/squashfs-tools-4.4/squashfs-tools/process_fragments.c:264: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(destination_file, O_RDONLY);
data/squashfs-tools-4.4/squashfs-tools/process_fragments.c:358: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(dup, file_buffer, sizeof(*dup));
data/squashfs-tools-4.4/squashfs-tools/pseudo.c:277: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 suid[100], sgid[100]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/read_file.c:51: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).
	fd = fopen(filename, "r");
data/squashfs-tools-4.4/squashfs-tools/read_fs.c:80:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buffer[c_byte];
data/squashfs-tools-4.4/squashfs-tools/read_fs.c:500:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[SQUASHFS_METADATA_SIZE] __attribute__ ((aligned));
data/squashfs-tools-4.4/squashfs-tools/read_fs.c:631:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_entry) + SQUASHFS_NAME_LEN + 1]
data/squashfs-tools-4.4/squashfs-tools/read_fs.c:694: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(dire->name, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/read_fs.c:974: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_cache, inode_table + root_inode_block,
data/squashfs-tools-4.4/squashfs-tools/read_fs.c:982: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(*directory_data_cache, directory_table,
data/squashfs-tools-4.4/squashfs-tools/read_xattrs.c:136:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(xattr->full_name, prefix_table[i].prefix, len);
data/squashfs-tools-4.4/squashfs-tools/read_xattrs.c:137: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(xattr->full_name + len, name, entry->size);
data/squashfs-tools-4.4/squashfs-tools/sort.c:220:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line_buffer[MAX_LINE + 1]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/sort.c:221: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 sort_filename[MAX_LINE + 1]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/sort.c:225: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((fd = fopen(filename, "r")) == NULL) {
data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h:71: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		name[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h: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			symlink[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h:191: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[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h:492: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			symlink[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h:594: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		name[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h:625: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			symlink[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_compat.h:684: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[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_fs.h:315: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		name[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_fs.h:380: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			symlink[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_fs.h:463: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[0];
data/squashfs-tools-4.4/squashfs-tools/squashfs_swap.h:389:34:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define SQUASHFS_MEMCPY(s, d, n)	memcpy(d, s, n)
data/squashfs-tools-4.4/squashfs-tools/squashfs_swap.h:390:39:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define SQUASHFS_SWAP_SHORTS(s, d, n)	memcpy(d, s, n * sizeof(short))
data/squashfs-tools-4.4/squashfs-tools/squashfs_swap.h:391:37:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define SQUASHFS_SWAP_INTS(s, d, n)	memcpy(d, s, n * sizeof(int))
data/squashfs-tools-4.4/squashfs-tools/squashfs_swap.h:393: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(d, s, n * sizeof(long long))
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:42: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(&sblock_size, block_ptr, sizeof(unsigned short));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:45: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(&block_size, block_ptr, sizeof(unsigned short));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:69: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(&sinode, block_ptr, sizeof(header.base));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:85: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(inodep, block_ptr, sizeof(*inodep));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:113: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(&sinode, block_ptr, sizeof(header.dir));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:117: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(inode, block_ptr, sizeof(header.dir));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:134: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(inode, block_ptr, sizeof(*inode));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:158: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(inodep, block_ptr, sizeof(*inodep));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:181: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(inodep, block_ptr, sizeof(*inodep));
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:204:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(squashfs_dir_entry_2) + SQUASHFS_NAME_LEN + 1]
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:275: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(dire, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:285: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(dire->name, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:40: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(block_list, block_ptr, blocks * sizeof(unsigned int));
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:130:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy((char *) &fragment_table[i], (char *) &sfragment,
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:172: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(&sinode, block_ptr, sizeof(header.base));
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:193: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(&sinode, block_ptr, sizeof(header.dir));
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:211: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(&sinode, block_ptr, sizeof(header.ldir));
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:233: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(inode, block_ptr, sizeof(*inode));
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:260: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(inodep, block_ptr, sizeof(*inodep));
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:283: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(inodep, block_ptr, sizeof(*inodep));
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:305:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(squashfs_dir_entry_2) + SQUASHFS_NAME_LEN + 1]
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:376: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(dire, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:386: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(dire->name, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:61: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(block_list, block_ptr, blocks * sizeof(unsigned int));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:141:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy((char *) &fragment_table[i], (char *) &sfragment,
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:177: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(&sinode, block_ptr, sizeof(header.base));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:198: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(&sinode, block_ptr, sizeof(header.dir));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:215: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(&sinode, block_ptr, sizeof(header.ldir));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:236: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(inode, block_ptr, sizeof(*inode));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:261: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(inode, block_ptr, sizeof(*inode));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:287: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(inodep, block_ptr, sizeof(*inodep));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:310: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(inodep, block_ptr, sizeof(*inodep));
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:331:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(squashfs_dir_entry_3) + SQUASHFS_NAME_LEN + 1]
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:403: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(dire, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:413: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(dire->name, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/unsquash-4.c:38: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(block_list, block_ptr, blocks * sizeof(unsigned int));
data/squashfs-tools-4.4/squashfs-tools/unsquash-4.c:278:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[sizeof(struct squashfs_dir_entry) + SQUASHFS_NAME_LEN + 1]
data/squashfs-tools-4.4/squashfs-tools/unsquash-4.c:349: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(dire->name, directory_table + bytes,
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:506:2:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
	strcpy(str, "----------");
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:520: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 str[11], dummy[12], dummy2[12]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:926: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).
	return open(pathname, flags, mode);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1378: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 str[1024]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1715: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 buffer[SQUASHFS_METADATA_SIZE] __attribute__ ((aligned));
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1817:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[SQUASHFS_METADATA_SIZE] __attribute__ ((aligned));
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1866: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(&sBlk, &sBlk_4, sizeof(sBlk_4));
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1892: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(&sBlk_3, &sblk, sizeof(squashfs_super_block_3));
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1962:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[MAX_LINE + 1]; /* overflow safe */
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1965: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).
	fd = fopen(filename, "r");
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:2174: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(entry->data, tmp, res);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:2871: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).
	if((fd = open(argv[i], O_RDONLY)) == -1) {
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.h:168:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char		name[SQUASHFS_NAME_LEN + 1];
data/squashfs-tools-4.4/squashfs-tools/xattr.c:570: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(xp + sizeof(val), xattr->value, xattr->vsize);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:587: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(xp + sizeof(entry), xattr->name, xattr->size);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:601: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(xp + sizeof(val), xattr->value, xattr->vsize);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:696: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(sdata_cache, data_cache, cache_bytes);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:714: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_cache, sdata_cache, scache_bytes);
data/squashfs-tools-4.4/squashfs-tools/xz_wrapper.c:473: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(dest, selected->buffer, selected->length);
data/squashfs-tools-4.4/squashfs-tools/zstd_wrapper.c:58:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		compression_level = atoi(argv[1]);
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/inode.c:1698:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(str, name, size);
data/squashfs-tools-4.4/kernel/kernel-2.4/fs/squashfs/squashfs2_0.c:489:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(str, name, size);
data/squashfs-tools-4.4/kernel/kernel-2.6/fs/squashfs/namei.c:94:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(str, name, len);
data/squashfs-tools-4.4/squashfs-tools/action.c:636: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(string) ? : 1; 
data/squashfs-tools-4.4/squashfs-tools/action.c:1749: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).
	return strlen(source->subpath) <= strlen(dest->subpath) &&
data/squashfs-tools-4.4/squashfs-tools/action.c:1749: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).
	return strlen(source->subpath) <= strlen(dest->subpath) &&
data/squashfs-tools-4.4/squashfs-tools/action.c:1750: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).
		(dest->subpath[strlen(source->subpath)] == '/' ||
data/squashfs-tools-4.4/squashfs-tools/action.c:1751: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).
		dest->subpath[strlen(source->subpath)] == '\0') &&
data/squashfs-tools-4.4/squashfs-tools/action.c:1753:3:  [1] (buffer) strlen:
  Does not handle 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(source->subpath)) == 0;
data/squashfs-tools-4.4/squashfs-tools/action.c:2451: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(atom->argv[0]) != 1)
data/squashfs-tools-4.4/squashfs-tools/gzip_wrapper.c:113:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int n = strlen(strategy[i].name);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:519:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		res = read(fd, buff + count, bytes - count);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1081:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int byte = strlen(dir_ent->inode->symlink);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1088:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(inode + off, dir_ent->inode->symlink, byte);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1094:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int byte = strlen(dir_ent->inode->symlink);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1102:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(inode + off, dir_ent->inode->symlink, byte);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1145:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned int size = strlen(name);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1219:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *) dir->p + name_off, name, size);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:1326:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(buffer, idirp->name, idir.size + 1);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:2222:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if(inode->read)
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3035: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).
			if(result && strlen(pathname) + 2 <=
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3036: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).
						b_size - strlen(b_buffer)) {
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3037:12:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
				strcat(strcat(b_buffer, "/"), pathname);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3040: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).
		} else if(strlen(pathname) < b_size) {
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3739: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(pseudo_ent->dev->symlink) + 1), dir);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:3996: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).
		byte_count += strlen(dir_ent->name) +
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.c:4737:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen(filename);
data/squashfs-tools-4.4/squashfs-tools/mksquashfs.h:59:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	char			read;
data/squashfs-tools-4.4/squashfs-tools/pseudo.c:290:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	filename = malloc(strlen(def) + 1);
data/squashfs-tools-4.4/squashfs-tools/pseudo.c:319:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	n = sscanf(def, " %c %o %99s %99s %n", &type, &mode, suid, sgid,
data/squashfs-tools-4.4/squashfs-tools/pseudo.c:408: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(def) > 65535) {
data/squashfs-tools-4.4/squashfs-tools/read_file.c:74: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(line + total);
data/squashfs-tools-4.4/squashfs-tools/read_xattrs.c:131: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(prefix_table[i].prefix);
data/squashfs-tools-4.4/squashfs-tools/sort.c:114: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).
	if(strlen(path) > 1 && strcmp(path + strlen(path) - 2, "/*") == 0)
data/squashfs-tools-4.4/squashfs-tools/sort.c:114: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).
	if(strlen(path) > 1 && strcmp(path + strlen(path) - 2, "/*") == 0)
data/squashfs-tools-4.4/squashfs-tools/sort.c:115: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).
		path[strlen(path) - 2] = '\0';
data/squashfs-tools-4.4/squashfs-tools/sort.c:232:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen(line);
data/squashfs-tools-4.4/squashfs-tools/unsquash-1.c:164:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(i.symlink, block_ptr +
data/squashfs-tools-4.4/squashfs-tools/unsquash-2.c:266:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(i.symlink, block_ptr +
data/squashfs-tools-4.4/squashfs-tools/unsquash-3.c:293:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(i.symlink, block_ptr +
data/squashfs-tools-4.4/squashfs-tools/unsquash-4.c:217:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(i.symlink, block_ptr +
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:568:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			padchars = TOTALCHARS - strlen(userstr) -
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:569: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(groupstr);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:576:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			padchars = TOTALCHARS - strlen(userstr) -
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:577: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(groupstr) - 7; 
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:643:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		res = read(fd, buff + count, bytes - count);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:1971:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		int len = strlen(name);
data/squashfs-tools-4.4/squashfs-tools/unsquashfs.c:2645:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask(0);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:101: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).
		if(strncmp(xattr->full_name, p->prefix, strlen(p->prefix)) == 0)
data/squashfs-tools-4.4/squashfs-tools/xattr.c:106: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).
		xattr->name = xattr->full_name + strlen(prefix_table[i].prefix);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:107: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).
		xattr->size = strlen(xattr->name);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:163: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).
		p += strlen(p) + 1;
data/squashfs-tools-4.4/squashfs-tools/xattr.c:305: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(xattr->full_name), checksum);
data/squashfs-tools-4.4/squashfs-tools/xattr.c:403: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).
		size += strlen(xattr_list[i].full_name) + 1 +
data/squashfs-tools-4.4/squashfs-tools/xz_wrapper.c:82:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				int n = strlen(bcj[i].name);

ANALYSIS SUMMARY:

Hits = 247
Lines analyzed = 34328 in approximately 0.83 seconds (41235 lines/second)
Physical Source Lines of Code (SLOC) = 23944
Hits@level = [0] 316 [1]  55 [2] 169 [3]   1 [4]  17 [5]   5
Hits@level+ = [0+] 563 [1+] 247 [2+] 192 [3+]  23 [4+]  22 [5+]   5
Hits/KSLOC@level+ = [0+] 23.5132 [1+] 10.3157 [2+] 8.01871 [3+] 0.960575 [4+] 0.918811 [5+] 0.208821
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.