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/fpart-1.2.0/src/utils.c
Examining data/fpart-1.2.0/src/dispatch.c
Examining data/fpart-1.2.0/src/partition.c
Examining data/fpart-1.2.0/src/file_entry.h
Examining data/fpart-1.2.0/src/fts.h
Examining data/fpart-1.2.0/src/options.h
Examining data/fpart-1.2.0/src/fpart.h
Examining data/fpart-1.2.0/src/dispatch.h
Examining data/fpart-1.2.0/src/partition.h
Examining data/fpart-1.2.0/src/utils.h
Examining data/fpart-1.2.0/src/types.h
Examining data/fpart-1.2.0/src/options.c
Examining data/fpart-1.2.0/src/fpart.c
Examining data/fpart-1.2.0/src/file_entry.c
Examining data/fpart-1.2.0/src/fts.c

FINAL RESULTS:

data/fpart-1.2.0/src/file_entry.c:306:13:  [4] (shell) execle:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            execle(_PATH_BSHELL, "sh", "-c", cmd, (char *)NULL, envp);
data/fpart-1.2.0/src/fpart.c:261:17:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while((ch = getopt(*argcp, *argvp,
data/fpart-1.2.0/src/file_entry.c:426:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                open(live_status.filename, O_WRONLY|O_CREAT|O_TRUNC, 0660)) < 0) {
data/fpart-1.2.0/src/file_entry.c:983:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                open(out_filename, O_WRONLY|O_CREAT|O_TRUNC, 0660)) < 0) {
data/fpart-1.2.0/src/fpart.c:618: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).
            if((in_fp = fopen(options.in_filename, "r")) == NULL) {
data/fpart-1.2.0/src/fpart.c:627: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.
        char line[MAX_LINE_LENGTH];
data/fpart-1.2.0/src/fts.c:53:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
#define _open open
data/fpart-1.2.0/src/fts.c:79:37:  [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).
#warning O_CLOEXEC not supported by open(2)
data/fpart-1.2.0/src/fts.c:88:39:  [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).
#warning O_DIRECTORY not supported by open(2)
data/fpart-1.2.0/src/fts.c:1122:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(p->fts_name, name, namelen);
data/fpart-1.2.0/src/file_entry.c:175:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        malloc_size = strlen(env_fpart_hooktype_name) + 1 +
data/fpart-1.2.0/src/file_entry.c:176: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).
            strlen("pre-part") + 1;
data/fpart-1.2.0/src/file_entry.c:198:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        malloc_size = strlen(env_fpart_hooktype_name) + 1 +
data/fpart-1.2.0/src/file_entry.c:199: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).
            strlen("post-part") + 1;
data/fpart-1.2.0/src/file_entry.c:214:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        malloc_size = strlen(env_fpart_partfilename_name) + 1 +
data/fpart-1.2.0/src/file_entry.c:215: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).
            strlen(live_filename) + 1;
data/fpart-1.2.0/src/file_entry.c:230:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        malloc_size = strlen(env_fpart_partnumber_name) + 1 +
data/fpart-1.2.0/src/file_entry.c:246:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        malloc_size = strlen(env_fpart_partsize_name) + 1 +
data/fpart-1.2.0/src/file_entry.c:262:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        malloc_size = strlen(env_fpart_partnumfiles_name) + 1 +
data/fpart-1.2.0/src/file_entry.c:278:19:  [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).
    malloc_size = strlen(env_fpart_pid_name) + 1 +
data/fpart-1.2.0/src/file_entry.c:406:34:  [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 malloc_size = strlen(out_template) + 1 +
data/fpart-1.2.0/src/file_entry.c:448: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).
        size_t to_write = strlen(path);
data/fpart-1.2.0/src/file_entry.c:534: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).
    size_t malloc_size = strlen(path) + 1;
data/fpart-1.2.0/src/file_entry.c:970:34:  [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 malloc_size = strlen(out_template) + 1 + get_num_digits
data/fpart-1.2.0/src/file_entry.c:999: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 to_write = strlen(head->path);
data/fpart-1.2.0/src/fpart.c:180: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).
        if_not_malloc(input_path, strlen(argument) + 1,
data/fpart-1.2.0/src/fpart.c:202: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).
        size_t input_path_len = strlen(argument);
data/fpart-1.2.0/src/fpart.c:313:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if(strlen(optarg) == 0)
data/fpart-1.2.0/src/fpart.c:332:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if(strlen(optarg) == 0)
data/fpart-1.2.0/src/fpart.c:391:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                if(strlen(optarg) == 0)
data/fpart-1.2.0/src/fpart.c:425: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).
                size_t malloc_size = strlen(optarg) + 1;
data/fpart-1.2.0/src/fpart.c:440: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).
                size_t malloc_size = strlen(optarg) + 1;
data/fpart-1.2.0/src/fpart.c:560:30:  [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 malloc_size = strlen(opt_input) + 1;
data/fpart-1.2.0/src/fts.c:237: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(*argv);
data/fpart-1.2.0/src/fts.c:315: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(++cp);
data/fpart-1.2.0/src/fts.c:822: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).
		dnamlen = strlen(dp->d_name);
data/fpart-1.2.0/src/fts.c:1196: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).
		if ((len = strlen(*argv)) > max)
data/fpart-1.2.0/src/utils.c:216:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        malloc_size += strlen(cwd) + 1; /* cwd + '/' */
data/fpart-1.2.0/src/utils.c:218:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    malloc_size += strlen(path) + 1; /* path + '\0' */
data/fpart-1.2.0/src/utils.c:250: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).
    size_t malloc_size = strlen(str) + 1;

ANALYSIS SUMMARY:

Hits = 40
Lines analyzed = 4895 in approximately 0.25 seconds (19524 lines/second)
Physical Source Lines of Code (SLOC) = 3202
Hits@level = [0] 165 [1]  30 [2]   8 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+] 205 [1+]  40 [2+]  10 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 64.0225 [1+] 12.4922 [2+] 3.12305 [3+] 0.62461 [4+] 0.312305 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.