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/extundelete-0.2.4/src/block.h
Examining data/extundelete-0.2.4/src/cli.cc
Examining data/extundelete-0.2.4/src/extundelete-priv.h
Examining data/extundelete-0.2.4/src/extundelete.cc
Examining data/extundelete-0.2.4/src/extundelete.h
Examining data/extundelete-0.2.4/src/jfs_compat.h
Examining data/extundelete-0.2.4/src/kernel-jbd.h
Examining data/extundelete-0.2.4/src/block.c
Examining data/extundelete-0.2.4/src/insertionops.cc

FINAL RESULTS:

data/extundelete-0.2.4/src/cli.cc:98:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf (buffer, format, args);
data/extundelete-0.2.4/src/cli.cc:33:9:  [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.
#define getopt_long(a,b,c,d,e)  getopt((a),(b),(c))
data/extundelete-0.2.4/src/cli.cc:33:33:  [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.
#define getopt_long(a,b,c,d,e)  getopt((a),(b),(c))
data/extundelete-0.2.4/src/cli.cc:418:25:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((short_option = getopt_long(argc, argv, "j:vVb:B:o:", longopts, NULL)) != -1)
data/extundelete-0.2.4/src/block.c:116: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(handle->inode, inode, sizeof(struct ext2_inode));
data/extundelete-0.2.4/src/cli.cc:97: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[BUFSIZ];
data/extundelete-0.2.4/src/cli.cc:333:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		infile.open (Config::restore_files.c_str(), std::ifstream::in);
data/extundelete-0.2.4/src/cli.cc:541:26:  [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).
								Config::dlogfile.open(fname.c_str());
data/extundelete-0.2.4/src/cli.cc:556:26:  [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).
								Config::slogfile.open(fname.c_str());
data/extundelete-0.2.4/src/cli.cc:571:26:  [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).
								Config::ilogfile.open(fname.c_str());
data/extundelete-0.2.4/src/cli.cc:586:26:  [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).
								Config::wlogfile.open(fname.c_str());
data/extundelete-0.2.4/src/cli.cc:601:26:  [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).
								Config::elogfile.open(fname.c_str());
data/extundelete-0.2.4/src/cli.cc:614:25:  [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).
							Config::elogfile.open(logopts.c_str());
data/extundelete-0.2.4/src/extundelete.cc:1728:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			file.open ((outputdir + fname2).c_str(), std::ios::in);
data/extundelete-0.2.4/src/extundelete.cc:1731: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).
		file.open((outputdir + fname2).c_str(), std::ios::binary|std::ios::out);
data/extundelete-0.2.4/src/extundelete.cc:1805:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(inode, inodebuf, EXT2_INODE_SIZE(fs->super) );
data/extundelete-0.2.4/src/extundelete.cc:1878: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(journal_superblock, buf, sizeof(*journal_superblock));
data/extundelete-0.2.4/src/kernel-jbd.h:138: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	h_padding[2];
data/extundelete-0.2.4/src/cli.cc:337: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).
				if(strlen(name) > 0)

ANALYSIS SUMMARY:

Hits = 19
Lines analyzed = 5100 in approximately 0.14 seconds (35456 lines/second)
Physical Source Lines of Code (SLOC) = 3871
Hits@level = [0]   1 [1]   1 [2]  14 [3]   3 [4]   1 [5]   0
Hits@level+ = [0+]  20 [1+]  19 [2+]  18 [3+]   4 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 5.16662 [1+] 4.90829 [2+] 4.64996 [3+] 1.03332 [4+] 0.258331 [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.