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/osmo-fl2k-0.1.1/include/osmo-fl2k.h
Examining data/osmo-fl2k-0.1.1/include/osmo-fl2k_export.h
Examining data/osmo-fl2k-0.1.1/include/rds_mod.h
Examining data/osmo-fl2k-0.1.1/src/fl2k_file.c
Examining data/osmo-fl2k-0.1.1/src/fl2k_fm.c
Examining data/osmo-fl2k-0.1.1/src/fl2k_tcp.c
Examining data/osmo-fl2k-0.1.1/src/fl2k_test.c
Examining data/osmo-fl2k-0.1.1/src/getopt/getopt.c
Examining data/osmo-fl2k-0.1.1/src/getopt/getopt.h
Examining data/osmo-fl2k-0.1.1/src/libosmo-fl2k.c
Examining data/osmo-fl2k-0.1.1/src/rds_mod.c
Examining data/osmo-fl2k-0.1.1/src/rds_waveforms.c

FINAL RESULTS:

data/osmo-fl2k-0.1.1/src/fl2k_file.c:123:16:  [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 ((opt = getopt(argc, argv, "d:r:s:")) != -1) {
data/osmo-fl2k-0.1.1/src/fl2k_fm.c:454: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.
		opt = getopt_long(argc, argv, "d:c:f:i:s:", long_options, &option_index);
data/osmo-fl2k-0.1.1/src/fl2k_tcp.c:146:16:  [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 ((opt = getopt(argc, argv, "d:s:a:p:b:")) != -1) {
data/osmo-fl2k-0.1.1/src/fl2k_test.c:234:16:  [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 ((opt = getopt(argc, argv, "d:s:p::h")) != -1) {
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:210:9:  [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.
#ifndef getenv
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:215:14:  [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.
extern char *getenv ();
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:401:21:  [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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:976: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 (argc, argv, optstring)
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:1006:11:  [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.
      c = getopt (argc, argv, "abc:d:0123456789");
data/osmo-fl2k-0.1.1/src/getopt/getopt.h:145: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 __argc, char *const *__argv, const char *__shortopts);
data/osmo-fl2k-0.1.1/src/getopt/getopt.h:147: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 ();
data/osmo-fl2k-0.1.1/src/getopt/getopt.h:151: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 __argc, char *const *__argv, const char *__shortopts,
data/osmo-fl2k-0.1.1/src/getopt/getopt.h:164: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 ();
data/osmo-fl2k-0.1.1/src/getopt/getopt.h:166: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 ();
data/osmo-fl2k-0.1.1/src/fl2k_file.c:126:26:  [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).
			dev_index = (uint32_t)atoi(optarg);
data/osmo-fl2k-0.1.1/src/fl2k_file.c:129:18:  [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).
			repeat = (int)atoi(optarg);
data/osmo-fl2k-0.1.1/src/fl2k_file.c:148:9:  [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 = fopen(filename, "rb");
data/osmo-fl2k-0.1.1/src/fl2k_fm.c:464:26:  [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).
			dev_index = (uint32_t)atoi(optarg);
data/osmo-fl2k-0.1.1/src/fl2k_fm.c:518: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).
		file = fopen(filename, "rb");
data/osmo-fl2k-0.1.1/src/fl2k_tcp.c:149:26:  [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).
			dev_index = (uint32_t)atoi(optarg);
data/osmo-fl2k-0.1.1/src/fl2k_tcp.c:159:11:  [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).
			port = atoi(optarg);
data/osmo-fl2k-0.1.1/src/fl2k_tcp.c:162: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).
			buf_num = atoi(optarg);
data/osmo-fl2k-0.1.1/src/fl2k_test.c:237:26:  [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).
			dev_index = (uint32_t)atoi(optarg);
data/osmo-fl2k-0.1.1/src/fl2k_test.c:244:20:  [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).
				ppm_duration = atoi(optarg);
data/osmo-fl2k-0.1.1/src/rds_mod.c:41: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 ps[PS_LENGTH];
data/osmo-fl2k-0.1.1/src/rds_mod.c:42: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 rt[RT_LENGTH];
data/osmo-fl2k-0.1.1/src/fl2k_file.c:189:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(500000);
data/osmo-fl2k-0.1.1/src/fl2k_tcp.c:221:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(500000);
data/osmo-fl2k-0.1.1/src/fl2k_tcp.c:235:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(500000);
data/osmo-fl2k-0.1.1/src/fl2k_test.c:295:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(500000);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:238:51:  [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 (!defined __STDC__ || !__STDC__) && !defined strlen
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:241:12:  [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).
extern int strlen (const char *);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:432: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).
	      int len = nonoption_flags_max_len = strlen (orig_str);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:660:21:  [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).
		== (unsigned int) strlen (p->name))
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:687:16:  [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).
	  nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:719:17:  [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).
		  nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:735:17:  [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).
		  nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:740:16:  [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).
	  nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:851:51:  [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 ((unsigned int) (nameend - nextchar) == strlen (p->name))
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:874:18:  [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).
	    nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:894: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).
		    nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:908: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).
		    nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/getopt/getopt.c:912:18:  [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).
	    nextchar += strlen (nextchar);
data/osmo-fl2k-0.1.1/src/libosmo-fl2k.c:479:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(1000);
data/osmo-fl2k-0.1.1/src/rds_mod.c:279:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rds_params.rt, rt, 64);
data/osmo-fl2k-0.1.1/src/rds_mod.c:291:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rds_params.ps, ps, 8);

ANALYSIS SUMMARY:

Hits = 46
Lines analyzed = 4267 in approximately 0.14 seconds (30485 lines/second)
Physical Source Lines of Code (SLOC) = 2859
Hits@level = [0]  82 [1]  20 [2]  12 [3]  14 [4]   0 [5]   0
Hits@level+ = [0+] 128 [1+]  46 [2+]  26 [3+]  14 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 44.7709 [1+] 16.0895 [2+] 9.09409 [3+] 4.89682 [4+]   0 [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.