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/z80ex-1.1.21/ptables.c
Examining data/z80ex-1.1.21/examples/dasm.c
Examining data/z80ex-1.1.21/examples/version.c
Examining data/z80ex-1.1.21/typedefs.h
Examining data/z80ex-1.1.21/z80ex.c
Examining data/z80ex-1.1.21/z80ex_dasm.c
Examining data/z80ex-1.1.21/include/z80ex_dasm.h
Examining data/z80ex-1.1.21/include/z80ex.h
Examining data/z80ex-1.1.21/include/z80ex_common.h
Examining data/z80ex-1.1.21/macros.h
Examining data/z80ex-1.1.21/opcodes/opcodes_ddcb.c
Examining data/z80ex-1.1.21/opcodes/opcodes_base.c
Examining data/z80ex-1.1.21/opcodes/opcodes_ed.c
Examining data/z80ex-1.1.21/opcodes/opcodes_fd.c
Examining data/z80ex-1.1.21/opcodes/opcodes_dd.c
Examining data/z80ex-1.1.21/opcodes/opcodes_cb.c
Examining data/z80ex-1.1.21/opcodes/opcodes_fdcb.c
Examining data/z80ex-1.1.21/opcodes/opcodes_dasm.c

FINAL RESULTS:

data/z80ex-1.1.21/z80ex_dasm.c:21:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/z80ex-1.1.21/z80ex_dasm.c:21:18:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf _snprintf
data/z80ex-1.1.21/z80ex_dasm.c:137:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
					arglen=snprintf(stmp,STMP_SIZE,words_format,(int)(lo+hi*0x100));
data/z80ex-1.1.21/z80ex_dasm.c:148:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
						arglen=snprintf(stmp,STMP_SIZE,bytes_format,(int)disp);
data/z80ex-1.1.21/z80ex_dasm.c:150:14:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
						arglen=snprintf(stmp,STMP_SIZE,words_format,(int)((Z80EX_WORD)(addr+disp)));
data/z80ex-1.1.21/z80ex_dasm.c:158:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
					arglen=snprintf(stmp,STMP_SIZE,bytes_format,(int)lo);
data/z80ex-1.1.21/z80ex_dasm.c:172:5:  [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(outpos,stmp);
data/z80ex-1.1.21/examples/dasm.c:24: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 buf[80];
data/z80ex-1.1.21/examples/dasm.c:32:5:  [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).
	fp=fopen(argv[1],"rb");
data/z80ex-1.1.21/examples/dasm.c:43: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).
	if(argc == 3) base_addr=atoi(argv[2]);
data/z80ex-1.1.21/z80ex_dasm.c:51:9:  [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 stmp[STMP_SIZE];
data/z80ex-1.1.21/z80ex_dasm.c:70:5:  [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(output,"NOP*",output_size-1);
data/z80ex-1.1.21/z80ex_dasm.c:102:5:  [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(output,"NOP*",output_size-1);

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 16346 in approximately 0.35 seconds (47347 lines/second)
Physical Source Lines of Code (SLOC) = 13431
Hits@level = [0]  10 [1]   2 [2]   4 [3]   0 [4]   7 [5]   0
Hits@level+ = [0+]  23 [1+]  13 [2+]  11 [3+]   7 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 1.71246 [1+] 0.96791 [2+] 0.819001 [3+] 0.521182 [4+] 0.521182 [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.