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/id3tool-1.2a/bsd_getopt.c
Examining data/id3tool-1.2a/id3.c
Examining data/id3tool-1.2a/id3.h
Examining data/id3tool-1.2a/id3tool.c
Examining data/id3tool-1.2a/bsd_getopt.h

FINAL RESULTS:

data/id3tool-1.2a/bsd_getopt.c:239:4:  [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, illoptchar, optchar);
data/id3tool-1.2a/bsd_getopt.c:251:5:  [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, recargchar, optchar);
data/id3tool-1.2a/bsd_getopt.c:274:6:  [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, recargchar, optchar);
data/id3tool-1.2a/bsd_getopt.c:378:6:  [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, ambig, (int)current_argv_len,
data/id3tool-1.2a/bsd_getopt.c:388:6:  [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, noarg, (int)current_argv_len,
data/id3tool-1.2a/bsd_getopt.c:420:6:  [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, recargstring, current_argv);
data/id3tool-1.2a/bsd_getopt.c:434:5:  [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, illoptstring, current_argv);
data/id3tool-1.2a/id3tool.c:84: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 (newloc, strin);
data/id3tool-1.2a/bsd_getopt.c:59:29:  [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.
#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
data/id3tool-1.2a/bsd_getopt.c:294:1:  [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.
getopt(int nargc, char * const *nargv, const char *options)
data/id3tool-1.2a/bsd_getopt.c:320:1:  [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.
getopt_long(int nargc,
data/id3tool-1.2a/bsd_getopt.h:30:12:  [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.
extern int	getopt(int nargc, char * const *nargv, const char *options);
data/id3tool-1.2a/bsd_getopt.h:31:12:  [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.
extern int	getopt_long(int nargc, char * const *nargv, const char *options, const struct option *long_options, int *idx);
data/id3tool-1.2a/id3tool.c:146:11:  [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.
	retval = getopt_long (argc, argv, ID3TOOL_GETOPT_ARGS, 
data/id3tool-1.2a/id3tool.c:246:12:  [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.
		retval = getopt_long (argc, argv, ID3TOOL_GETOPT_ARGS,
data/id3tool-1.2a/bsd_getopt.c:141:6:  [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 **) nargv)[pos] = nargv[cstart];
data/id3tool-1.2a/bsd_getopt.c:143:6:  [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 **)nargv)[cstart] = swap;
data/id3tool-1.2a/id3.h:46: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[3];
data/id3tool-1.2a/id3.h:47: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		songname[30];
data/id3tool-1.2a/id3.h:48: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		artist[30];
data/id3tool-1.2a/id3.h:49: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		album[30];
data/id3tool-1.2a/id3.h:50: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		year[4];
data/id3tool-1.2a/id3.h:53: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		note[30];
data/id3tool-1.2a/id3.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		note[28];
data/id3tool-1.2a/id3tool.c:142: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		strbuf[31];
data/id3tool-1.2a/id3tool.c:180:14:  [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).
			newyear = atoi(optarg);
data/id3tool-1.2a/id3tool.c:196:15:  [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).
			newgenre = atoi(optarg);
data/id3tool-1.2a/id3tool.c:204:15:  [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).
			newtrack = atoi(optarg);
data/id3tool-1.2a/id3tool.c:257:10:  [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).
		fptr = fopen(argv[ctr], "rb");
data/id3tool-1.2a/id3tool.c:356:5:  [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 (strbuf, "%4.4ld", newyear);
data/id3tool-1.2a/id3tool.c:368:11:  [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).
			fptr = fopen(argv[ctr], "r+b");
data/id3tool-1.2a/bsd_getopt.c:359: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).
			current_argv_len = strlen(current_argv);
data/id3tool-1.2a/bsd_getopt.c:367: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(long_options[i].name) ==
data/id3tool-1.2a/id3.c:248:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(id3tag->magic, "TAG", 3);
data/id3tool-1.2a/id3tool.c:81: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 (strin) + 1;
data/id3tool-1.2a/id3tool.c:278:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(strbuf, mytag.songname, 30);
data/id3tool-1.2a/id3tool.c:283:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(strbuf, mytag.artist, 30);
data/id3tool-1.2a/id3tool.c:288:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(strbuf, mytag.album, 30);
data/id3tool-1.2a/id3tool.c:295:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
						strncpy(strbuf, mytag.note.v11.note, 28);
data/id3tool-1.2a/id3tool.c:304:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
						strncpy(strbuf, mytag.note.v10.note, 30);
data/id3tool-1.2a/id3tool.c:310:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(strbuf, mytag.year, 4);
data/id3tool-1.2a/id3tool.c:325:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy (mytag.songname, newtitle, 30);
data/id3tool-1.2a/id3tool.c:329:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy (mytag.artist, newartist, 30);
data/id3tool-1.2a/id3tool.c:333:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy (mytag.album, newalbum, 30);
data/id3tool-1.2a/id3tool.c:341:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy (mytag.note.v11.note, newnote, 28);
data/id3tool-1.2a/id3tool.c:344:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy (mytag.note.v10.note, newnote, 30);
data/id3tool-1.2a/id3tool.c:358:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy (mytag.year, strbuf, 4);

ANALYSIS SUMMARY:

Hits = 47
Lines analyzed = 1218 in approximately 0.06 seconds (19077 lines/second)
Physical Source Lines of Code (SLOC) = 887
Hits@level = [0]  49 [1]  16 [2]  16 [3]   7 [4]   8 [5]   0
Hits@level+ = [0+]  96 [1+]  47 [2+]  31 [3+]  15 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 108.23 [1+] 52.9876 [2+] 34.9493 [3+] 16.9109 [4+] 9.01917 [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.