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/squashfuse-0.1.103/squashfuse.h
Examining data/squashfuse-0.1.103/squashfs_fs.h
Examining data/squashfuse-0.1.103/fuseprivate.c
Examining data/squashfuse-0.1.103/nonstd-makedev.c
Examining data/squashfuse-0.1.103/nonstd-enoattr.c
Examining data/squashfuse-0.1.103/fuseprivate.h
Examining data/squashfuse-0.1.103/swap.c
Examining data/squashfuse-0.1.103/cache.c
Examining data/squashfuse-0.1.103/table.c
Examining data/squashfuse-0.1.103/dir.c
Examining data/squashfuse-0.1.103/file.c
Examining data/squashfuse-0.1.103/fs.c
Examining data/squashfuse-0.1.103/decompress.c
Examining data/squashfuse-0.1.103/xattr.c
Examining data/squashfuse-0.1.103/hash.c
Examining data/squashfuse-0.1.103/stack.c
Examining data/squashfuse-0.1.103/traverse.c
Examining data/squashfuse-0.1.103/util.c
Examining data/squashfuse-0.1.103/nonstd-pread.c
Examining data/squashfuse-0.1.103/nonstd-stat.c
Examining data/squashfuse-0.1.103/common.h
Examining data/squashfuse-0.1.103/nonstd-internal.h
Examining data/squashfuse-0.1.103/nonstd.h
Examining data/squashfuse-0.1.103/swap.h
Examining data/squashfuse-0.1.103/cache.h
Examining data/squashfuse-0.1.103/table.h
Examining data/squashfuse-0.1.103/dir.h
Examining data/squashfuse-0.1.103/file.h
Examining data/squashfuse-0.1.103/decompress.h
Examining data/squashfuse-0.1.103/xattr.h
Examining data/squashfuse-0.1.103/hash.h
Examining data/squashfuse-0.1.103/stack.h
Examining data/squashfuse-0.1.103/traverse.h
Examining data/squashfuse-0.1.103/util.h
Examining data/squashfuse-0.1.103/fs.h
Examining data/squashfuse-0.1.103/hl.c
Examining data/squashfuse-0.1.103/extract.c
Examining data/squashfuse-0.1.103/ll_inode.c
Examining data/squashfuse-0.1.103/nonstd-daemon.c
Examining data/squashfuse-0.1.103/ll.h
Examining data/squashfuse-0.1.103/ls.c
Examining data/squashfuse-0.1.103/win/config.h
Examining data/squashfuse-0.1.103/win/tinfl.c
Examining data/squashfuse-0.1.103/win/win32.h
Examining data/squashfuse-0.1.103/ll.c

FINAL RESULTS:

data/squashfuse-0.1.103/extract.c:155:21:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
                    chmod (prefixed_path_to_extract, st.st_mode);
data/squashfuse-0.1.103/extract.c:83:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(prefix, F_OK ) == -1 ) {
data/squashfuse-0.1.103/extract.c:111:17:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(strcat(prefixed_path_to_extract, prefix), trv.path);
data/squashfuse-0.1.103/extract.c:111:24:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
                strcat(strcat(prefixed_path_to_extract, prefix), trv.path);
data/squashfuse-0.1.103/extract.c:115:25:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
                    if (access(prefixed_path_to_extract, F_OK ) == -1 ) {
data/squashfuse-0.1.103/extract.c:126:21:  [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( (S_ISDIR(st.st_mode)) ? "d" : "-");
data/squashfuse-0.1.103/extract.c:127:21:  [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( (st.st_mode & S_IRUSR) ? "r" : "-");
data/squashfuse-0.1.103/extract.c:128:21:  [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( (st.st_mode & S_IWUSR) ? "w" : "-");
data/squashfuse-0.1.103/extract.c:129:21:  [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( (st.st_mode & S_IXUSR) ? "x" : "-");
data/squashfuse-0.1.103/extract.c:130:21:  [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( (st.st_mode & S_IRGRP) ? "r" : "-");
data/squashfuse-0.1.103/extract.c:131:21:  [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( (st.st_mode & S_IWGRP) ? "w" : "-");
data/squashfuse-0.1.103/extract.c:132:21:  [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( (st.st_mode & S_IXGRP) ? "x" : "-");
data/squashfuse-0.1.103/extract.c:133:21:  [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( (st.st_mode & S_IROTH) ? "r" : "-");
data/squashfuse-0.1.103/extract.c:134:21:  [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( (st.st_mode & S_IWOTH) ? "w" : "-");
data/squashfuse-0.1.103/extract.c:135:21:  [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( (st.st_mode & S_IXOTH) ? "x" : "-");
data/squashfuse-0.1.103/decompress.c:135: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 *const sqfs_compression_names[SQFS_COMP_MAX] = {
data/squashfuse-0.1.103/dir.h:47: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.
typedef char sqfs_name[SQUASHFS_NAME_LEN + 1];
data/squashfuse-0.1.103/extract.c:78: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 prefixed_path_to_extract[1024];
data/squashfuse-0.1.103/extract.c:142:25:  [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).
                    f = fopen (prefixed_path_to_extract, "w+");
data/squashfuse-0.1.103/extract.c:147:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                        char buf[bytes_at_a_time];
data/squashfuse-0.1.103/extract.c:158:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char buf[size];
data/squashfuse-0.1.103/file.c:179: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(buf, (char*)block->data + data_off + read_off, take);
data/squashfuse-0.1.103/fs.c:249: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(buf, (char*)block->data + cur->offset, take);
data/squashfuse-0.1.103/hash.c:37: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(&b->value, v, h->value_size);
data/squashfuse-0.1.103/hash.h: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 value[1]; /* extended to size */
data/squashfuse-0.1.103/table.c:78:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, (char*)(block->data) + off, table->each);
data/squashfuse-0.1.103/traverse.c:236: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(trv->path + trv->path_size - 1, str, size);
data/squashfuse-0.1.103/util.c:53:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		*fd = open(path, O_RDONLY);
data/squashfuse-0.1.103/win/tinfl.c:161:31:  [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 TINFL_MEMCPY(d, s, l) memcpy(d, s, l)
data/squashfuse-0.1.103/xattr.c:130: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, p->pref, p->len);
data/squashfuse-0.1.103/extract.c:31:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t lenpre = strlen(pre),
data/squashfuse-0.1.103/extract.c:32: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).
    lenstr = strlen(str);
data/squashfuse-0.1.103/extract.c:110:17:  [1] (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 character.
                strcpy(prefixed_path_to_extract, "");
data/squashfuse-0.1.103/extract.c:157:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                    size_t size = strlen(trv.path)+1;
data/squashfuse-0.1.103/ll.c:115:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t esize = fuse_dirent_size(strlen(name));
data/squashfuse-0.1.103/ll.c:185:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	sqerr = sqfs_dir_lookup(&lli.ll->fs, &lli.inode, name, strlen(name), &entry,
data/squashfuse-0.1.103/traverse.c:259:3:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strlen(TRAVERSE_PATH_SEPARATOR));
data/squashfuse-0.1.103/traverse.c:267: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).
	sqfs_traverse_path_remove(trv, strlen(TRAVERSE_PATH_SEPARATOR));
data/squashfuse-0.1.103/xattr.c:221: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);

ANALYSIS SUMMARY:

Hits = 39
Lines analyzed = 6440 in approximately 0.19 seconds (34608 lines/second)
Physical Source Lines of Code (SLOC) = 4173
Hits@level = [0]  35 [1]   9 [2]  15 [3]   0 [4]  14 [5]   1
Hits@level+ = [0+]  74 [1+]  39 [2+]  30 [3+]  15 [4+]  15 [5+]   1
Hits/KSLOC@level+ = [0+] 17.733 [1+] 9.34579 [2+] 7.18907 [3+] 3.59454 [4+] 3.59454 [5+] 0.239636
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.