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-ng-1.0.3/bin/gensquashfs/dirscan.c
Examining data/squashfs-tools-ng-1.0.3/bin/gensquashfs/dirscan_xattr.c
Examining data/squashfs-tools-ng-1.0.3/bin/gensquashfs/mkfs.c
Examining data/squashfs-tools-ng-1.0.3/bin/gensquashfs/mkfs.h
Examining data/squashfs-tools-ng-1.0.3/bin/gensquashfs/options.c
Examining data/squashfs-tools-ng-1.0.3/bin/gensquashfs/selinux.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/describe.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/dump_xattrs.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/fill_files.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/list_files.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/options.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/rdsquashfs.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/rdsquashfs.h
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/restore_fstree.c
Examining data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/stat.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/options.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.h
Examining data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/write_tree.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/xattr.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/compare_dir.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/compare_files.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/extract.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/node_compare.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/options.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/sqfsdiff.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/sqfsdiff.h
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/super.c
Examining data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/util.c
Examining data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/options.c
Examining data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/process_tarball.c
Examining data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/tar2sqfs.c
Examining data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/tar2sqfs.h
Examining data/squashfs-tools-ng-1.0.3/extras/browse.c
Examining data/squashfs-tools-ng-1.0.3/extras/list_files.c
Examining data/squashfs-tools-ng-1.0.3/extras/mk42sqfs.c
Examining data/squashfs-tools-ng-1.0.3/extras/mknastyfs.c
Examining data/squashfs-tools-ng-1.0.3/include/common.h
Examining data/squashfs-tools-ng-1.0.3/include/compat.h
Examining data/squashfs-tools-ng-1.0.3/include/fstree.h
Examining data/squashfs-tools-ng-1.0.3/include/hash_table.h
Examining data/squashfs-tools-ng-1.0.3/include/rbtree.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/block.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/block_processor.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/block_writer.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/compressor.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/data_reader.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/dir.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/dir_reader.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/dir_writer.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/error.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/frag_table.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/id_table.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/inode.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/io.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/meta_reader.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/meta_writer.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/predef.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/super.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/table.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/xattr.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/xattr_reader.h
Examining data/squashfs-tools-ng-1.0.3/include/sqfs/xattr_writer.h
Examining data/squashfs-tools-ng-1.0.3/include/str_table.h
Examining data/squashfs-tools-ng-1.0.3/include/tar.h
Examining data/squashfs-tools-ng-1.0.3/include/util.h
Examining data/squashfs-tools-ng-1.0.3/lib/common/comp_lzo.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/comp_opt.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/compress.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/data_reader_dump.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/data_writer.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/get_path.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/hardlink.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/inode_stat.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/io_stdin.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/mkdir_p.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/parse_size.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/perror.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/print_size.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/print_version.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/serialize_fstree.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/statistics.c
Examining data/squashfs-tools-ng-1.0.3/lib/common/writer.c
Examining data/squashfs-tools-ng-1.0.3/lib/compat/chdir.c
Examining data/squashfs-tools-ng-1.0.3/lib/compat/getline.c
Examining data/squashfs-tools-ng-1.0.3/lib/compat/getsubopt.c
Examining data/squashfs-tools-ng-1.0.3/lib/compat/mockups.c
Examining data/squashfs-tools-ng-1.0.3/lib/compat/path_to_windows.c
Examining data/squashfs-tools-ng-1.0.3/lib/compat/strndup.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/add_by_path.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/canonicalize_name.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/filename_sane.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/fstree.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/fstree_from_file.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/fstree_sort.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/get_by_path.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/get_path.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/hardlink.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/internal.h
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/mknode.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/post_process.c
Examining data/squashfs-tools-ng-1.0.3/lib/fstree/source_date_epoch.c
Examining data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c
Examining data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.h
Examining data/squashfs-tools-ng-1.0.3/lib/lz4/lz4hc.c
Examining data/squashfs-tools-ng-1.0.3/lib/lz4/lz4hc.h
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/common.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/frontend.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/internal.h
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/serial.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/winpthread.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/block_writer.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/compressor.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/gzip.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/internal.h
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/lz4.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/lzma.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/xz.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/zstd.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/data_reader.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_reader.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_writer.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/frag_table.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/id_table.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/inode.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/meta_reader.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/meta_writer.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/read_inode.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/read_super.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/read_table.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/read_tree.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/readdir.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/super.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/unix/io_file.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/win32/io_file.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/write_inode.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/write_super.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/write_table.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_reader.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer.h
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer_flush.c
Examining data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer_record.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/base64.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/checksum.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/cleanup.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/internal.h
Examining data/squashfs-tools-ng-1.0.3/lib/tar/number.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/padd_file.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/pax_header.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/read_header.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/read_retry.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/read_sparse_map.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/read_sparse_map_new.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/read_sparse_map_old.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/skip.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/urldecode.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c
Examining data/squashfs-tools-ng-1.0.3/lib/tar/write_retry.c
Examining data/squashfs-tools-ng-1.0.3/lib/util/alloc.c
Examining data/squashfs-tools-ng-1.0.3/lib/util/fast_urem_by_const.h
Examining data/squashfs-tools-ng-1.0.3/lib/util/hash_table.c
Examining data/squashfs-tools-ng-1.0.3/lib/util/rbtree.c
Examining data/squashfs-tools-ng-1.0.3/lib/util/str_table.c
Examining data/squashfs-tools-ng-1.0.3/lib/util/xxhash.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/adler32.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/crc32.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/crc32.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/deflate.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/deflate.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/inffast.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/inffast.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/inffixed.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/inflate.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/inflate.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/inftrees.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/inftrees.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/trees.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/trees.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/zconf.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/zlib.h
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.c
Examining data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h
Examining data/squashfs-tools-ng-1.0.3/tests/abi.c
Examining data/squashfs-tools-ng-1.0.3/tests/add_by_path.c
Examining data/squashfs-tools-ng-1.0.3/tests/canonicalize_name.c
Examining data/squashfs-tools-ng-1.0.3/tests/filename_sane.c
Examining data/squashfs-tools-ng-1.0.3/tests/fstree_from_file.c
Examining data/squashfs-tools-ng-1.0.3/tests/fstree_fuzz.c
Examining data/squashfs-tools-ng-1.0.3/tests/fstree_init.c
Examining data/squashfs-tools-ng-1.0.3/tests/fstree_sort.c
Examining data/squashfs-tools-ng-1.0.3/tests/gen_inode_numbers.c
Examining data/squashfs-tools-ng-1.0.3/tests/get_path.c
Examining data/squashfs-tools-ng-1.0.3/tests/mknode_dir.c
Examining data/squashfs-tools-ng-1.0.3/tests/mknode_reg.c
Examining data/squashfs-tools-ng-1.0.3/tests/mknode_simple.c
Examining data/squashfs-tools-ng-1.0.3/tests/mknode_slink.c
Examining data/squashfs-tools-ng-1.0.3/tests/rbtree.c
Examining data/squashfs-tools-ng-1.0.3/tests/str_table.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_big_file.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_fuzz.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_simple.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_sparse.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_sparse_gnu.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_target_filled.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_xattr.c
Examining data/squashfs-tools-ng-1.0.3/tests/tar_xattr_bin.c
Examining data/squashfs-tools-ng-1.0.3/tests/test.h
Examining data/squashfs-tools-ng-1.0.3/tests/xxhash.c

FINAL RESULTS:

data/squashfs-tools-ng-1.0.3/bin/gensquashfs/options.c:278:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			printf(help_string,
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/xattr.c:26: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(ent->key, (const char *)key->key);
data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/extract.c:16:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(temp, "%s/%s", prefix, path);
data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/options.c:205:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			printf(usagestr, SQFS_DEFAULT_BLOCK_SIZE,
data/squashfs-tools-ng-1.0.3/include/compat.h:60:35:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#	error Cannot figure out propper printf specifier for size_t
data/squashfs-tools-ng-1.0.3/lib/common/print_version.c:24:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(version_string, progname, PACKAGE_NAME, PACKAGE_VERSION);
data/squashfs-tools-ng-1.0.3/lib/fstree/mknode.c:53: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(ptr, extra);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:231:21:  [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, __FILE__ ": ");           \
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:232:21:  [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, __VA_ARGS__);             \
data/squashfs-tools-ng-1.0.3/lib/sqfs/read_tree.c:69: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((char *)n->name, name);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:164:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(fp, PRI_SZ " %s%s=", len, prefix, it->key);
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:250:39:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:251:39:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:252:40:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:253:48:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:254:49:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
data/squashfs-tools-ng-1.0.3/tests/canonicalize_name.c:49: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(buffer, must_work[i].in);
data/squashfs-tools-ng-1.0.3/tests/canonicalize_name.c:66: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(buffer, must_not_work[i]);
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/options.c:175:7:  [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.
		i = getopt_long(argc, argv, short_opts, long_opts, NULL);
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/options.c:124:7:  [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.
		i = getopt_long(argc, argv, short_opts, long_opts, NULL);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/options.c:87:7:  [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.
		i = getopt_long(argc, argv, short_opts, long_opts, NULL);
data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/options.c:69:7:  [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.
		i = getopt_long(argc, argv, short_opts, long_opts, NULL);
data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/options.c:110:7:  [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.
		i = getopt_long(argc, argv, short_opts, long_opts, NULL);
data/squashfs-tools-ng-1.0.3/lib/fstree/source_date_epoch.c:18:8:  [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.
	str = getenv("SOURCE_DATE_EPOCH");
data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/winpthread.c:13:15:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
#	define LOCK EnterCriticalSection
data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/winpthread.c:25:21:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
#	define MUTEX_INIT InitializeCriticalSection
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/dirscan.c:115:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC);
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/dirscan_xattr.c:37: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(path, prefix, prefix_len);
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/mkfs.c:153:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(opt->infile, "rb");
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/describe.c:105:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buffer[32];
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/describe.c:115:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%c %d %d",
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/fill_files.c:142:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(files[i].path, "wb");
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/list_files.c:97:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%u:%u", major(devno), minor(devno));
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/list_files.c:110: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 modestr[12], sizestr[32];
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/restore_fstree.c:100:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open(name, O_WRONLY | O_CREAT | O_EXCL, mode);
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/stat.c:36:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[64];
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c:44: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(name, root_becomes, len);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c:62: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[1024];
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/write_tree.c:49: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(name, root_becomes, len);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/xattr.c:27: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(ent->value, value->value, value->size + 1);
data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/compare_files.c:9:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char old_buf[MAX_WINDOW_SIZE];
data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/compare_files.c:10:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char new_buf[MAX_WINDOW_SIZE];
data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/extract.c:24:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(temp, "wb");
data/squashfs-tools-ng-1.0.3/extras/browse.c:219: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[64];
data/squashfs-tools-ng-1.0.3/extras/browse.c:273:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(buffer, "-- error --");
data/squashfs-tools-ng-1.0.3/extras/browse.c:275:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%u", uid);
data/squashfs-tools-ng-1.0.3/extras/browse.c:281:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(buffer, "-- error --");
data/squashfs-tools-ng-1.0.3/extras/browse.c:283:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%u", gid);
data/squashfs-tools-ng-1.0.3/extras/browse.c:419: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[512];
data/squashfs-tools-ng-1.0.3/extras/mk42sqfs.c:64:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[32];
data/squashfs-tools-ng-1.0.3/extras/mk42sqfs.c:132:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%02u.sqfs", i + 1);
data/squashfs-tools-ng-1.0.3/include/tar.h:24: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[100];
data/squashfs-tools-ng-1.0.3/include/tar.h:25: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 mode[8];
data/squashfs-tools-ng-1.0.3/include/tar.h:26: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 uid[8];
data/squashfs-tools-ng-1.0.3/include/tar.h:27: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 gid[8];
data/squashfs-tools-ng-1.0.3/include/tar.h:28: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 size[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:29: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 mtime[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:30: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 chksum[8];
data/squashfs-tools-ng-1.0.3/include/tar.h:32: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 linkname[100];
data/squashfs-tools-ng-1.0.3/include/tar.h:33: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 magic[6];
data/squashfs-tools-ng-1.0.3/include/tar.h:34:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char version[2];
data/squashfs-tools-ng-1.0.3/include/tar.h:35: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 uname[32];
data/squashfs-tools-ng-1.0.3/include/tar.h:36:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char gname[32];
data/squashfs-tools-ng-1.0.3/include/tar.h:37: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 devmajor[8];
data/squashfs-tools-ng-1.0.3/include/tar.h:38: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 devminor[8];
data/squashfs-tools-ng-1.0.3/include/tar.h:41: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 prefix[155];
data/squashfs-tools-ng-1.0.3/include/tar.h:42: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 padding[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:46:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char atime[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:47:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char ctime[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:48: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 offset[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:49: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 deprecated[4];
data/squashfs-tools-ng-1.0.3/include/tar.h:52: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 offset[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:53: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 numbytes[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:56: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 realsize[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:57: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 padding[17];
data/squashfs-tools-ng-1.0.3/include/tar.h:64: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 offset[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:65: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 numbytes[12];
data/squashfs-tools-ng-1.0.3/include/tar.h:68:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char padding[7];
data/squashfs-tools-ng-1.0.3/lib/common/comp_lzo.c:87: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(buffer + 2, &opt, sizeof(opt));
data/squashfs-tools-ng-1.0.3/lib/common/comp_lzo.c:161: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, scratch, len);
data/squashfs-tools-ng-1.0.3/lib/common/comp_lzo.c:211:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(lzo, other, sizeof(*lzo));
data/squashfs-tools-ng-1.0.3/lib/common/get_path.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(ptr, (const char *)it->name, len);
data/squashfs-tools-ng-1.0.3/lib/common/print_size.c:29:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(buffer, "%u%c", (unsigned int)size,
data/squashfs-tools-ng-1.0.3/lib/common/print_size.c:32:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
			sprintf(buffer, "%u.%c%c", (unsigned int)size,
data/squashfs-tools-ng-1.0.3/lib/common/print_size.c:36:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%u", (unsigned int)size);
data/squashfs-tools-ng-1.0.3/lib/common/serialize_fstree.c:41: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->extra, node->data.target, extra);
data/squashfs-tools-ng-1.0.3/lib/common/statistics.c:17: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 read_sz[32], written_sz[32];
data/squashfs-tools-ng-1.0.3/lib/compat/path_to_windows.c:19:11:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
	length = MultiByteToWideChar(CP_UTF8, 0, input, -1, NULL, 0);
data/squashfs-tools-ng-1.0.3/lib/compat/path_to_windows.c:33:2:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
	MultiByteToWideChar(CP_UTF8, 0, input, -1, wpath, length + 1);
data/squashfs-tools-ng-1.0.3/lib/compat/strndup.c:25: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, str, len);
data/squashfs-tools-ng-1.0.3/lib/fstree/fstree_from_file.c:122: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 keyword[16], *path, *ptr;
data/squashfs-tools-ng-1.0.3/lib/fstree/fstree_from_file.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(keyword, line, i);
data/squashfs-tools-ng-1.0.3/lib/fstree/get_path.c:38: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(ptr, it->name, len);
data/squashfs-tools-ng-1.0.3/lib/fstree/mknode.c:49: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(n->name, name, name_len);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:325: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(memPtr, &value, sizeof(value));
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:330: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(memPtr, &value, sizeof(value));
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:365: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.
    do { memcpy(d,s,8); d+=8; s+=8; } while (d<e);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:396:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dstPtr+4, srcPtr, 4);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:400:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dstPtr, srcPtr, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:418: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.
    do { memcpy(d,s,16); memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:418:26:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    do { memcpy(d,s,16); memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:437:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(v, srcPtr, 2);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:438:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&v[2], srcPtr, 2);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:439:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&v[4], &v[0], 4);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:442:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(v, srcPtr, 4);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:443:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(&v[4], srcPtr, 4);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:450: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(dstPtr, v, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:453:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(dstPtr, v, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1144:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(op, anchor, lastRun);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1376:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op, ip, 16);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1380:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op, ip, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1381: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.
                    if (length > 8) { memcpy(op+8, ip+8, 8); }
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1417:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(op, match, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1418:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(op+8, match+8, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1419:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(op+16, match+16, 2);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1442:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op, dictEnd - copySize, copySize);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1449:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(op, lowPrefix, restSize);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1490:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(op, ip, endOnInput ? 16 : 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1505:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op + 0, match + 0, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1506:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op + 8, match + 8, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1507:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op +16, match +16, 2);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1620:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op, dictEnd - copySize, copySize);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1627:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(op, lowPrefix, restSize);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1646:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(op, match, mlen);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1660:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(op+4, match, 4);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1663:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(op, match, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4.c:1678:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(op, match, 8);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4hc.c:732:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(op, anchor, lastRunSize);
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4hc.c:854:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ctx, ctx->dictCtx, sizeof(LZ4HC_CCtx_internal));
data/squashfs-tools-ng-1.0.3/lib/lz4/lz4hc.c:1329: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(op, anchor, lastRunSize);
data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/common.c:145: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->data + offset, it->data, it->size);
data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/common.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(block->data, scratch, ret);
data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/frontend.c:118:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(proc->blk_current->data + proc->blk_current->size,
data/squashfs-tools-ng-1.0.3/lib/sqfs/block_processor/frontend.c:197: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(blk->data, data, size);
data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/compressor.c:49: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(buffer + 2, data, size);
data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/compressor.c:72:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data, buffer + 2, size);
data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/gzip.c:232: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(gzip, cmp, sizeof(*gzip));
data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/lz4.c:131: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(lz4, cmp, sizeof(*lz4));
data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/lzma.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(copy, cmp, sizeof(*copy));
data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/xz.c:262: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(xz, cmp, sizeof(*xz));
data/squashfs-tools-ng-1.0.3/lib/sqfs/comp/zstd.c:117: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(zstd, cmp, sizeof(*zstd));
data/squashfs-tools-ng-1.0.3/lib/sqfs/data_reader.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(copy, data, sizeof(*data) + data->block_size);
data/squashfs-tools-ng-1.0.3/lib/sqfs/data_reader.c:160: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(copy->data_block, data->data_block,
data/squashfs-tools-ng-1.0.3/lib/sqfs/data_reader.c:169: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(copy->frag_block, data->frag_block,
data/squashfs-tools-ng-1.0.3/lib/sqfs/data_reader.c:288: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(*out, (char *)data->frag_block + frag_off, frag_sz);
data/squashfs-tools-ng-1.0.3/lib/sqfs/data_reader.c:339: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, (char *)data->data_block + offset, diff);
data/squashfs-tools-ng-1.0.3/lib/sqfs/data_reader.c:363: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, ptr, size);
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_reader.c:56: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(copy, rd, sizeof(*copy));
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_reader.c:271: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, start,
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_writer.c:222: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(ent->name, name, ent->name_len);
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_writer.c:430: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(ptr, &ent, sizeof(ent));
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_writer.c:431: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(ptr + sizeof(ent), idx->ent->name,
data/squashfs-tools-ng-1.0.3/lib/sqfs/frag_table.c:45: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(copy, tbl, sizeof(*tbl));
data/squashfs-tools-ng-1.0.3/lib/sqfs/id_table.c:44: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(copy, tbl, sizeof(*tbl));
data/squashfs-tools-ng-1.0.3/lib/sqfs/id_table.c:55: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(copy->ids, tbl->ids, tbl->num_ids * sizeof(tbl->ids[0]));
data/squashfs-tools-ng-1.0.3/lib/sqfs/inode.c:383: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(*out, &ent, sizeof(ent));
data/squashfs-tools-ng-1.0.3/lib/sqfs/inode.c:384: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((*out)->name, ptr + offset + sizeof(ent), ent.size + 1);
data/squashfs-tools-ng-1.0.3/lib/sqfs/meta_reader.c:60: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(copy, m, sizeof(*m));
data/squashfs-tools-ng-1.0.3/lib/sqfs/meta_reader.c:131: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(m->data, m->scratch, ret);
data/squashfs-tools-ng-1.0.3/lib/sqfs/meta_reader.c:171: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, m->data + m->offset, diff);
data/squashfs-tools-ng-1.0.3/lib/sqfs/meta_writer.c:117: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(outblk->data + 2, m->data, m->offset);
data/squashfs-tools-ng-1.0.3/lib/sqfs/meta_writer.c:160: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(m->data + m->offset, data, diff);
data/squashfs-tools-ng-1.0.3/lib/sqfs/read_inode.c:292: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((char *)out->extra + index_used, &ent, sizeof(ent));
data/squashfs-tools-ng-1.0.3/lib/sqfs/read_super.c:81: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(super, &temp, sizeof(temp));
data/squashfs-tools-ng-1.0.3/lib/sqfs/unix/io_file.c:53: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(copy, file, sizeof(*file));
data/squashfs-tools-ng-1.0.3/lib/sqfs/unix/io_file.c:171: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).
	file->fd = open(filename, open_mode, 0644);
data/squashfs-tools-ng-1.0.3/lib/sqfs/win32/io_file.c:51: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(copy, file, sizeof(*file));
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_reader.c:46: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(copy, xr, sizeof(*xr));
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_reader.c:66: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(copy->id_block_starts, xr->id_block_starts,
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_reader.c:216: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(out->key, prefix, plen);
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer.c:19: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(copy, xwr, sizeof(*xwr));
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer.c:34: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(copy->kv_pairs, xwr->kv_pairs,
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer.c:44: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(blk, it, sizeof(*it));
data/squashfs-tools-ng-1.0.3/lib/tar/checksum.c:33:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(hdr->chksum, "%06o", chksum);
data/squashfs-tools-ng-1.0.3/lib/tar/pax_header.c:23: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->key, key, keylen);
data/squashfs-tools-ng-1.0.3/lib/tar/pax_header.c:24: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->value, value, valuelen);
data/squashfs-tools-ng-1.0.3/lib/tar/read_header.c:20: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(hdr->magic) + sizeof(hdr->version)];
data/squashfs-tools-ng-1.0.3/lib/tar/read_header.c:54: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(out->name, hdr->tail.posix.prefix, len2);
data/squashfs-tools-ng-1.0.3/lib/tar/read_header.c:56: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(out->name + len2 + 1, hdr->name, len1);
data/squashfs-tools-ng-1.0.3/lib/tar/read_sparse_map_new.c:35: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[1024];
data/squashfs-tools-ng-1.0.3/lib/tar/read_sparse_map_new.c:73: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, buffer + 512, 512);
data/squashfs-tools-ng-1.0.3/lib/tar/skip.c:15: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[1024];
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:16:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		((unsigned char *)dst)[digits - 1] = value & 0xFF;
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:21: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 *)dst)[0] |= 0x80;
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:27: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[64];
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:34:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%0*o ", digits - 1, (unsigned int)value);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:35:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst, buffer, digits);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:37:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "%0*o", digits, (unsigned int)value);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:38:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst, buffer, digits);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:81: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(hdr.linkname, slink_target, sb->st_size);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:84:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(hdr.uname, "%u", sb->st_uid);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:85:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(hdr.gname, "%u", sb->st_gid);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:177: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[64];
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:181:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "pax/xattr%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:191:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "gnu/target%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:199:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "gnu/name%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:206:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "gnu/data%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:235:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[64];
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:242:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "gnu/target%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:246:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(hdr.linkname, "hardlink_%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:248:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(hdr.linkname, target, len);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:253:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buffer, "gnu/name%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:258:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(hdr.name, "gnu/data%u", counter);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:260: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(hdr.name, name, len);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:271:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(hdr.uname, "%u", sb->st_uid);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:272:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(hdr.gname, "%u", sb->st_gid);
data/squashfs-tools-ng-1.0.3/lib/util/hash_table.c:174: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(ht, src, sizeof(struct hash_table));
data/squashfs-tools-ng-1.0.3/lib/util/hash_table.c:182: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(ht->table, src->table, ht->size * sizeof(struct hash_entry));
data/squashfs-tools-ng-1.0.3/lib/util/rbtree.c:103: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(node->data, key, t->key_size);
data/squashfs-tools-ng-1.0.3/lib/util/rbtree.c:104: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(node->data + t->key_size_padded, value, t->value_size);
data/squashfs-tools-ng-1.0.3/lib/zlib/crc32.c:143:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out = fopen("crc32.h", "w");
data/squashfs-tools-ng-1.0.3/lib/zlib/inflate.c:646:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
data/squashfs-tools-ng-1.0.3/lib/zlib/inflate.c:1426:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char buf[4];       /* to restore bit buffer to byte string */
data/squashfs-tools-ng-1.0.3/lib/zlib/trees.c:328:20:  [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).
    FILE *header = fopen("trees.h", "w");
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.c:19: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.
z_const char * const z_errmsg[10] = {
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:57:30:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 ZLIB_INTERNAL z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:117:6:  [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).
     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:210:30:  [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).
#  define F_OPEN(name, mode) fopen((name), (mode))
data/squashfs-tools-ng-1.0.3/lib/zlib/zutil.h:234:21:  [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 zmemcpy memcpy
data/squashfs-tools-ng-1.0.3/tests/canonicalize_name.c:45: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[512];
data/squashfs-tools-ng-1.0.3/tests/fstree_fuzz.c:25:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(argv[1], "r");
data/squashfs-tools-ng-1.0.3/tests/str_table.c:13:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char *strings[1000];
data/squashfs-tools-ng-1.0.3/tests/tar_fuzz.c:25:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(argv[1], "rb");
data/squashfs-tools-ng-1.0.3/tests/tar_simple.c:39:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[6];
data/squashfs-tools-ng-1.0.3/tests/tar_target_filled.c:14: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[16];
data/squashfs-tools-ng-1.0.3/tests/tar_xattr.c:14: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[6];
data/squashfs-tools-ng-1.0.3/tests/tar_xattr_bin.c:22:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[6];
data/squashfs-tools-ng-1.0.3/tests/test.h:29:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *fp = fopen(path, "rb");
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/dirscan.c:77: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).
		n = fstree_mknode(root, ent->d_name, strlen(ent->d_name),
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/dirscan_xattr.c:23: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).
	path_len = strlen(path);
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/dirscan_xattr.c:24:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	prefix_len = strlen(prefix);
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/dirscan_xattr.c:110:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		keylen = strlen(key) + 1;
data/squashfs-tools-ng-1.0.3/bin/gensquashfs/selinux.c:26: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).
				    context, strlen(context));
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/list_files.c:71: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).
		print_size(strlen((const char *)n->inode->extra), buffer, true);
data/squashfs-tools-ng-1.0.3/bin/rdsquashfs/list_files.c:122: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).
			i = strlen(sizestr);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/options.c:128:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(root_becomes) == 0) {
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c:25: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).
	new_len = strlen(name);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c:27: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).
		new_len += strlen(root_becomes) + 1;
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c:41:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(root_becomes);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c:43:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memmove(name + len + 1, name, strlen(name) + 1);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/sqfs2tar.c:49:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(name);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/write_tree.c:42:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(root_becomes);
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/xattr.c:14:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	ent = calloc(1, sizeof(*ent) + strlen((const char *)key->key) +
data/squashfs-tools-ng-1.0.3/bin/sqfs2tar/xattr.c:23:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	ent->value = (sqfs_u8 *)ent->key + strlen((const char *)key->key) + 1;
data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/extract.c:15: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).
	temp = alloca(strlen(prefix) + strlen(path) + 2);
data/squashfs-tools-ng-1.0.3/bin/sqfsdiff/extract.c:15:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	temp = alloca(strlen(prefix) + strlen(path) + 2);
data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/options.c:185:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(root_becomes) == 0) {
data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/process_tarball.c:162: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).
	rootlen = root_becomes == NULL ? 0 : strlen(root_becomes);
data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/process_tarball.c:200: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(hdr.name + rootlen + 1) + 1);
data/squashfs-tools-ng-1.0.3/bin/tar2sqfs/process_tarball.c:223:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						strlen(target + rootlen) + 1);
data/squashfs-tools-ng-1.0.3/extras/mk42sqfs.c:82:50:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (file->write_at(file, sizeof(super), README, strlen(README))) {
data/squashfs-tools-ng-1.0.3/extras/mk42sqfs.c:146:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	inode->data.file.file_size = strlen(README);
data/squashfs-tools-ng-1.0.3/lib/common/get_path.c:26: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((const char *)it->name) + 1;
data/squashfs-tools-ng-1.0.3/lib/common/get_path.c:37:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen((const char *)it->name);
data/squashfs-tools-ng-1.0.3/lib/common/mkdir_p.c:149: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(path) + 1;
data/squashfs-tools-ng-1.0.3/lib/common/serialize_fstree.c:20: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).
		extra = strlen(node->data.target);
data/squashfs-tools-ng-1.0.3/lib/compat/getline.c:24:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = fgetc(fp);
data/squashfs-tools-ng-1.0.3/lib/compat/getsubopt.c:23: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).
		*opt = str + strlen(str);
data/squashfs-tools-ng-1.0.3/lib/compat/getsubopt.c:29:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(keys[i]);
data/squashfs-tools-ng-1.0.3/lib/fstree/add_by_path.c:46:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return fstree_mknode(parent, name, strlen(name), extra, sb);
data/squashfs-tools-ng-1.0.3/lib/fstree/filename_sane.c:29:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(bad_names[i]);
data/squashfs-tools-ng-1.0.3/lib/fstree/fstree_from_file.c:109: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).
		memmove(line, line + i, strlen(line + i) + 1);
data/squashfs-tools-ng-1.0.3/lib/fstree/fstree_from_file.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).
	i = strlen(line);
data/squashfs-tools-ng-1.0.3/lib/fstree/get_by_path.c:51: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(path);
data/squashfs-tools-ng-1.0.3/lib/fstree/get_path.c:24: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(it->name) + 1;
data/squashfs-tools-ng-1.0.3/lib/fstree/get_path.c:35:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(it->name);
data/squashfs-tools-ng-1.0.3/lib/fstree/mknode.c:30: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(extra) + 1;
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_reader.c:182: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).
	count = sizeof(*ent) + strlen((const char *)ent->name);
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_writer.c:214: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).
	ent = alloc_flex(sizeof(*ent), 1, strlen(name));
data/squashfs-tools-ng-1.0.3/lib/sqfs/dir_writer.c:221: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).
	ent->name_len = strlen(name);
data/squashfs-tools-ng-1.0.3/lib/sqfs/read_tree.c:64:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	n = alloc_flex(sizeof(*n), 1, strlen(name) + 1);
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr.c:28:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(xattr_types[i].prefix);
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr.c:31:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    strlen(key) > len) {
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_reader.c:204: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).
	plen = strlen(prefix);
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer_flush.c:16: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(input);
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer_flush.c:48: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(key);
data/squashfs-tools-ng-1.0.3/lib/sqfs/xattr/xattr_writer_flush.c:140: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).
	return (strlen(val_str) / 2) > sizeof(sqfs_u64);
data/squashfs-tools-ng-1.0.3/lib/tar/pax_header.c:163: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).
			xattr = mkxattr(key, ptr - key, value, strlen(value));
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:73:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(hdr.name, name, sizeof(hdr.name) - 1);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:148:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(prefix) + strlen(it->key) + it->value_len + 3;
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:148:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(prefix) + strlen(it->key) + it->value_len + 3;
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:161:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(prefix) + strlen(it->key) + it->value_len + 3;
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:161:26:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(prefix) + strlen(it->key) + it->value_len + 3;
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:198: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(name) >= 100) {
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:201:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (write_gnu_header(fp, sb, name, strlen(name),
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:240: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(target);
data/squashfs-tools-ng-1.0.3/lib/tar/write_header.c:251: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(name);
data/squashfs-tools-ng-1.0.3/tests/gen_inode_numbers.c:19:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return fstree_mknode(parent, name, strlen(name), NULL, &sb);

ANALYSIS SUMMARY:

Hits = 288
Lines analyzed = 42426 in approximately 1.18 seconds (36018 lines/second)
Physical Source Lines of Code (SLOC) = 27579
Hits@level = [0] 299 [1]  60 [2] 202 [3]   8 [4]  18 [5]   0
Hits@level+ = [0+] 587 [1+] 288 [2+] 228 [3+]  26 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 21.2843 [1+] 10.4427 [2+] 8.26716 [3+] 0.942746 [4+] 0.652671 [5+]   0
Dot directories skipped = 2 (--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.