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/flactag-2.0.4/Album.cc
Examining data/flactag-2.0.4/Album.h
Examining data/flactag-2.0.4/AlbumWindow.cc
Examining data/flactag-2.0.4/AlbumWindow.h
Examining data/flactag-2.0.4/CommandLine.cc
Examining data/flactag-2.0.4/CommandLine.h
Examining data/flactag-2.0.4/ConfigFile.cc
Examining data/flactag-2.0.4/ConfigFile.h
Examining data/flactag-2.0.4/CoverArt.cc
Examining data/flactag-2.0.4/CoverArt.h
Examining data/flactag-2.0.4/Cuesheet.cc
Examining data/flactag-2.0.4/Cuesheet.h
Examining data/flactag-2.0.4/CuesheetTrack.cc
Examining data/flactag-2.0.4/CuesheetTrack.h
Examining data/flactag-2.0.4/DiscIDWrapper.h
Examining data/flactag-2.0.4/ErrorLog.cc
Examining data/flactag-2.0.4/ErrorLog.h
Examining data/flactag-2.0.4/FileNameBuilder.cc
Examining data/flactag-2.0.4/FileNameBuilder.h
Examining data/flactag-2.0.4/FlacInfo.cc
Examining data/flactag-2.0.4/FlacInfo.h
Examining data/flactag-2.0.4/MusicBrainzInfo.cc
Examining data/flactag-2.0.4/MusicBrainzInfo.h
Examining data/flactag-2.0.4/ScrollableWindow.cc
Examining data/flactag-2.0.4/ScrollableWindow.h
Examining data/flactag-2.0.4/TagName.cc
Examining data/flactag-2.0.4/TagName.h
Examining data/flactag-2.0.4/TagsWindow.cc
Examining data/flactag-2.0.4/TagsWindow.h
Examining data/flactag-2.0.4/Track.cc
Examining data/flactag-2.0.4/Track.h
Examining data/flactag-2.0.4/TrackWindow.cc
Examining data/flactag-2.0.4/TrackWindow.h
Examining data/flactag-2.0.4/UTF8Tag.cc
Examining data/flactag-2.0.4/UTF8Tag.h
Examining data/flactag-2.0.4/WriteInfo.cc
Examining data/flactag-2.0.4/WriteInfo.h
Examining data/flactag-2.0.4/base64.cc
Examining data/flactag-2.0.4/base64.h
Examining data/flactag-2.0.4/discid.cc
Examining data/flactag-2.0.4/flactag.cc
Examining data/flactag-2.0.4/flactag.h
Examining data/flactag-2.0.4/DiscIDWrapper.cc

FINAL RESULTS:

data/flactag-2.0.4/UTF8Tag.cc:69: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(In,m_UTF8Value.c_str());
data/flactag-2.0.4/CommandLine.cc:71: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.
		Ret=getopt_long(argc,argv,"fdvrwcsoO:",LongOptions,&OptionIndex);
data/flactag-2.0.4/flactag.cc:135:27:  [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.
			std::string ConfigPath=getenv("HOME");
data/flactag-2.0.4/flactag.cc:1003:17:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	char *RealPath=realpath(m_FlacFile.c_str(),NULL);
data/flactag-2.0.4/ConfigFile.cc:77: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 *fptr=fopen(FileName.c_str(),"rt");
data/flactag-2.0.4/ConfigFile.cc:84:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char Buffer[1024];
data/flactag-2.0.4/ConfigFile.cc:113: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 *fptr=fopen(FileName.c_str(),"wt");
data/flactag-2.0.4/CoverArt.cc:51:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char buffer[JMSG_LENGTH_MAX];
data/flactag-2.0.4/CoverArt.cc:156: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,Data,Length);
data/flactag-2.0.4/FlacInfo.cc:210:39:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				trackMappings[tagName.Number()] = atoi(tagValue.DisplayValue().c_str());
data/flactag-2.0.4/FlacInfo.cc:438: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(TmpData,CoverArt.Data(),CoverArt.Length());
data/flactag-2.0.4/TagName.cc:52:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			m_Number=atoi(NumberStr.c_str());
data/flactag-2.0.4/flactag.cc:772: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).
	cueFile.open(m_RenameFileCue.c_str());
data/flactag-2.0.4/flactag.cc:853: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).
		SrcFD=open(Source.c_str(),O_RDONLY);
data/flactag-2.0.4/flactag.cc:856:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			DestFD=open(Dest.c_str(),O_WRONLY|O_CREAT, Stat.st_mode);
data/flactag-2.0.4/flactag.cc:862: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 Buffer[4096];
data/flactag-2.0.4/FlacInfo.cc:101:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (m_Chain.read(m_FileName.c_str()))
data/flactag-2.0.4/flactag.cc:868:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					Read=read(SrcFD,Buffer,sizeof(Buffer));

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 5466 in approximately 0.18 seconds (29927 lines/second)
Physical Source Lines of Code (SLOC) = 3287
Hits@level = [0]  27 [1]   2 [2]  12 [3]   3 [4]   1 [5]   0
Hits@level+ = [0+]  45 [1+]  18 [2+]  16 [3+]   4 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 13.6903 [1+] 5.47612 [2+] 4.86766 [3+] 1.21692 [4+] 0.304229 [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.