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/aylet-0.5/main.c
Examining data/aylet-0.5/sound.c
Examining data/aylet-0.5/uigtk.c
Examining data/aylet-0.5/cbops.c
Examining data/aylet-0.5/edops.c
Examining data/aylet-0.5/main.h
Examining data/aylet-0.5/sound.h
Examining data/aylet-0.5/z80.c
Examining data/aylet-0.5/z80.h
Examining data/aylet-0.5/ui.c
Examining data/aylet-0.5/ui.h
Examining data/aylet-0.5/drv-oss.c
Examining data/aylet-0.5/z80ops.c
Examining data/aylet-0.5/driver.h
Examining data/aylet-0.5/drv-obsd.c

FINAL RESULTS:

data/aylet-0.5/main.c:740:10:  [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.
  switch(getopt(argc,argv,"A:BeF:hlmnNsSt:"))
data/aylet-0.5/drv-obsd.c:30:17:  [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).
	if ((soundfd = open ("/dev/sound", O_WRONLY, 0)) < 0)
data/aylet-0.5/drv-obsd.c:61:17:  [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.
static unsigned char buf8[4096];
data/aylet-0.5/drv-oss.c:36:13:  [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).
if((soundfd=open("/dev/dsp",O_WRONLY))<0)
data/aylet-0.5/drv-oss.c:99:17:  [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.
static unsigned char buf8[4096];
data/aylet-0.5/main.c:53:10:  [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 mem[64*1024];
data/aylet-0.5/main.c:213: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(mem,intz,sizeof(intz));
data/aylet-0.5/main.c:216: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(mem,intnz,sizeof(intnz));
data/aylet-0.5/main.c:246: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(mem+addr,ptr+4+ofs,len);
data/aylet-0.5/main.c:468:8:  [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).
if((in=fopen(filename,"rb"))==NULL)
data/aylet-0.5/main.c:491: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(data+data_ofs,buf,ret);
data/aylet-0.5/main.c:743:17:  [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).
      stopafter=atoi(optarg);
data/aylet-0.5/main.c:754:16:  [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).
      fadetime=atoi(optarg);
data/aylet-0.5/main.c:781:33:  [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).
      if (!(play_one_track_only=atoi(optarg))) {
data/aylet-0.5/sound.c:90:17:  [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.
static unsigned char sound_ay_registers[16];
data/aylet-0.5/ui.c:82:8:  [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.
static char buf[65+1];	/* width allowed, plus NUL */
data/aylet-0.5/ui.c:92: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(buf,str,len);
data/aylet-0.5/uigtk.c:368:8:  [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.
static char buf[32];
data/aylet-0.5/z80.c:27:10:  [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 partable[256]={
data/aylet-0.5/main.c:383: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(20000);
data/aylet-0.5/sound.c:698: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(20000);
data/aylet-0.5/ui.c:83:9:  [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=strlen(str);

ANALYSIS SUMMARY:

Hits = 22
Lines analyzed = 4908 in approximately 0.12 seconds (42521 lines/second)
Physical Source Lines of Code (SLOC) = 3648
Hits@level = [0]  20 [1]   3 [2]  18 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  42 [1+]  22 [2+]  19 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 11.5132 [1+] 6.0307 [2+] 5.20833 [3+] 0.274123 [4+]   0 [5+]   0
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.