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/silan-0.4.0/audio_decoder/ad.h
Examining data/silan-0.4.0/audio_decoder/ad_ffmpeg.c
Examining data/silan-0.4.0/audio_decoder/ad_plugin.c
Examining data/silan-0.4.0/audio_decoder/ad_plugin.h
Examining data/silan-0.4.0/audio_decoder/ad_soundfile.c
Examining data/silan-0.4.0/audio_decoder/ffcompat.h
Examining data/silan-0.4.0/src/main.c

FINAL RESULTS:

data/silan-0.4.0/audio_decoder/ad_plugin.c:166:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf(stderr, format, args);
data/silan-0.4.0/src/main.c:81: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(ss->outfile, "%9"PRIi64, frameno);
data/silan-0.4.0/src/main.c:83: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(ss->outfile, "%" PRIi64, frameno);
data/silan-0.4.0/src/main.c:504:14:  [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 ((c = getopt_long (argc, argv,
data/silan-0.4.0/audio_decoder/ad_ffmpeg.c:231:11:  [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(priv->m_tmpBuffer, avf.extended_data[0], plane_size);
data/silan-0.4.0/audio_decoder/ad_ffmpeg.c:235:15:  [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(out, avf.extended_data[ch], plane_size);
data/silan-0.4.0/audio_decoder/ad_plugin.c:73: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).
	d->d = d->b->open(fn, nfo);
data/silan-0.4.0/audio_decoder/ad_plugin.h:47:12:  [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).
	void *  (*open)(const char *, struct adinfo *);
data/silan-0.4.0/src/main.c:651:22:  [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).
		settings.outfile = fopen(settings.outfilename, "w");
data/silan-0.4.0/audio_decoder/ad_plugin.c:104:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return d->b->read(d->d, out, len);
data/silan-0.4.0/audio_decoder/ad_plugin.h:51:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t (*read)(void *, float *, size_t);
data/silan-0.4.0/src/main.c:531:43:  [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      (!strncasecmp(optarg, "txt" , strlen(optarg))) ss->printformat = PF_TXT;
data/silan-0.4.0/src/main.c:532:44:  [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).
				else if (!strncasecmp(optarg, "text" , strlen(optarg))) ss->printformat = PF_TXT;
data/silan-0.4.0/src/main.c:533:43:  [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).
				else if (!strncasecmp(optarg, "json", strlen(optarg))) ss->printformat = PF_JSON;
data/silan-0.4.0/src/main.c:534:47:  [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).
				else if (!strncasecmp(optarg, "audacity", strlen(optarg))) ss->printformat = PF_AUDACITY;
data/silan-0.4.0/src/main.c:546:47:  [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      (!strncasecmp(optarg, "samples" , strlen(optarg))) ss->printmode = PM_SAMPLES;
data/silan-0.4.0/src/main.c:547:47:  [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).
				else if (!strncasecmp(optarg, "seconds" , strlen(optarg))) ss->printmode = PM_SECONDS;
data/silan-0.4.0/src/main.c:548:47:  [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).
				else if (!strncasecmp(optarg, "bytes"   , strlen(optarg))) ss->printmode = PM_BYTES;
data/silan-0.4.0/src/main.c:575:10:  [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 && optarg[strlen(optarg)-1] == 'd') {
data/silan-0.4.0/src/main.c:575: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).
					if (strlen(optarg)> 0 && optarg[strlen(optarg)-1] == 'd') {

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 1683 in approximately 0.06 seconds (28579 lines/second)
Physical Source Lines of Code (SLOC) = 1178
Hits@level = [0]  36 [1]  11 [2]   5 [3]   1 [4]   3 [5]   0
Hits@level+ = [0+]  56 [1+]  20 [2+]   9 [3+]   4 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 47.5382 [1+] 16.9779 [2+] 7.64007 [3+] 3.39559 [4+] 2.54669 [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.