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/phnxdeco-0.33/src/kernel.c
Examining data/phnxdeco-0.33/src/phnxdeco.c
Examining data/phnxdeco-0.33/src/phnxdeco.h
Examining data/phnxdeco-0.33/src/phnxfunc.c
Examining data/phnxdeco-0.33/src/phnxhelp.h
Examining data/phnxdeco-0.33/src/phnxsoft.h
Examining data/phnxdeco-0.33/src/phnxver.h

FINAL RESULTS:

data/phnxdeco-0.33/src/phnxfunc.c:115:46:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		if((atoi(year) >= 0) && (atoi(year) < 70)) sprintf(Buf,"%.2s %s %s%.2s",day,Months[atoi(mon)],"20",year);
data/phnxdeco-0.33/src/phnxfunc.c:116:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			else sprintf(Buf,"%.2s %s %s%.2s",day,Months[atoi(mon)],"19",year);
data/phnxdeco-0.33/src/phnxfunc.c:447:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			    sprintf(Buffer, "%s", GetModuleName(phhead.ID_LO));
data/phnxdeco-0.33/src/phnxfunc.c:453:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				    sprintf(Buffer,"%s%1.1X.rom",GetModuleName(phhead.ID_LO),phhead.ID_HI);
data/phnxdeco-0.33/src/kernel.c:49: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 c_len[NC], pt_len[NPT];
data/phnxdeco-0.33/src/phnxdeco.c:85:28:  [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( (ptx = fopen(argv[1],"rb")) == NULL )
data/phnxdeco-0.33/src/phnxfunc.c:115:7:  [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((atoi(year) >= 0) && (atoi(year) < 70)) sprintf(Buf,"%.2s %s %s%.2s",day,Months[atoi(mon)],"20",year);
data/phnxdeco-0.33/src/phnxfunc.c:115:28:  [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((atoi(year) >= 0) && (atoi(year) < 70)) sprintf(Buf,"%.2s %s %s%.2s",day,Months[atoi(mon)],"20",year);
data/phnxdeco-0.33/src/phnxfunc.c:115:86:  [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((atoi(year) >= 0) && (atoi(year) < 70)) sprintf(Buf,"%.2s %s %s%.2s",day,Months[atoi(mon)],"20",year);
data/phnxdeco-0.33/src/phnxfunc.c:116:49:  [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).
			else sprintf(Buf,"%.2s %s %s%.2s",day,Months[atoi(mon)],"19",year);
data/phnxdeco-0.33/src/phnxfunc.c:303:7:  [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(Buffer, "phoenix0.%1.1C%.1X", phhead.ID_LO, phhead.ID_HI);
data/phnxdeco-0.33/src/phnxfunc.c:305:7:  [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(Buffer,"phoenix_.%1.1C%.1X",phhead.ID_LO,phhead.ID_HI);
data/phnxdeco-0.33/src/phnxfunc.c:308:15:  [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((pto = fopen(Buffer,"wb")) == NULL)
data/phnxdeco-0.33/src/phnxfunc.c:450:9:  [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(Buffer, "%7.7s%1.1X.rom",GetModuleName(phhead.ID_LO),phhead.ID_HI);
data/phnxdeco-0.33/src/phnxfunc.c:459:15:  [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((pto = fopen(Buffer,"wb")) == NULL)
data/phnxdeco-0.33/src/kernel.c:130:48:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      compsize--;  subbitbuf = (unsigned char) getc(infile);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 1365 in approximately 0.05 seconds (29641 lines/second)
Physical Source Lines of Code (SLOC) = 997
Hits@level = [0]  79 [1]   1 [2]  11 [3]   0 [4]   4 [5]   0
Hits@level+ = [0+]  95 [1+]  16 [2+]  15 [3+]   4 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 95.2859 [1+] 16.0481 [2+] 15.0451 [3+] 4.01204 [4+] 4.01204 [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.