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/fbzx-3.1.0/src/cargador.cpp
Examining data/fbzx-3.1.0/src/emulator.cpp
Examining data/fbzx-3.1.0/src/osd.cpp
Examining data/fbzx-3.1.0/src/z80free/z80free_tester.c
Examining data/fbzx-3.1.0/src/z80free/Z80free.c
Examining data/fbzx-3.1.0/src/z80free/Z80free_codesDDCB.c
Examining data/fbzx-3.1.0/src/z80free/Z80free_codesED.c
Examining data/fbzx-3.1.0/src/z80free/Z80free.h
Examining data/fbzx-3.1.0/src/z80free/Z80free_codesCB.c
Examining data/fbzx-3.1.0/src/z80free/Z80free_codesFDCB.c
Examining data/fbzx-3.1.0/src/z80free/Z80free_codes.c
Examining data/fbzx-3.1.0/src/z80free/z80free_tester_function_b.c
Examining data/fbzx-3.1.0/src/z80free/Z80free_codesDD.c
Examining data/fbzx-3.1.0/src/z80free/Z80free_codesFD.c
Examining data/fbzx-3.1.0/src/microdrive.cpp
Examining data/fbzx-3.1.0/src/screen.cpp
Examining data/fbzx-3.1.0/src/menus.cpp
Examining data/fbzx-3.1.0/src/keyboard.cpp
Examining data/fbzx-3.1.0/src/tape.cpp
Examining data/fbzx-3.1.0/src/llsound.cpp
Examining data/fbzx-3.1.0/src/computer.cpp
Examining data/fbzx-3.1.0/src/signals.cpp
Examining data/fbzx-3.1.0/src/cmdline.cpp
Examining data/fbzx-3.1.0/src/llscreen.cpp
Examining data/fbzx-3.1.0/src/spk_ay.cpp
Examining data/fbzx-3.1.0/src/mouse.cpp
Examining data/fbzx-3.1.0/src/font.h

FINAL RESULTS:

data/fbzx-3.1.0/src/emulator.cpp:199:2:  [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(config_path,getenv("HOME"));
data/fbzx-3.1.0/src/emulator.cpp:230:2:  [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(config_path,getenv("HOME"));
data/fbzx-3.1.0/src/emulator.cpp:442:2:  [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(path_snaps,getenv("HOME"));
data/fbzx-3.1.0/src/emulator.cpp:447:2:  [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(path_taps,path_snaps);
data/fbzx-3.1.0/src/emulator.cpp:448:2:  [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(path_mdrs,path_snaps);
data/fbzx-3.1.0/src/llscreen.cpp:123:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmp,"/usr/share/%s",filename.c_str());
data/fbzx-3.1.0/src/llscreen.cpp:129:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(tmp,"/usr/local/share/%s",filename.c_str());
data/fbzx-3.1.0/src/menus.cpp:949:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf (nombre2, " %s.%s ", nombre,extension.c_str());
data/fbzx-3.1.0/src/menus.cpp:1231:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nombre_final,"%s/%s.%s",path_snaps,nombre,extension.c_str()); // name
data/fbzx-3.1.0/src/menus.cpp:1233:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nombre_final,"%s%s.%s",path_snaps,nombre,extension.c_str());
data/fbzx-3.1.0/src/menus.cpp:1485:2:  [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(path,cpath);
data/fbzx-3.1.0/src/menus.cpp:1503:4:  [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(fichero,path);
data/fbzx-3.1.0/src/menus.cpp:1504:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(fichero,entry->d_name);
data/fbzx-3.1.0/src/menus.cpp:1672: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(salida,fl2->nombrepath.c_str());
data/fbzx-3.1.0/src/menus.cpp:1677: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(path,fl2->nombrepath.c_str()); // new path_taps is namepath
data/fbzx-3.1.0/src/microdrive.cpp:208:2:  [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(this->mdr_current_mdr,filename);
data/fbzx-3.1.0/src/microdrive.cpp:228:2:  [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(this->mdr_current_mdr,filename);
data/fbzx-3.1.0/src/z80free/z80free_tester.c:198:9:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	retval=fscanf(infile,"%s",test_name);
data/fbzx-3.1.0/src/computer.cpp:375:8:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			if (random()<(RAND_MAX/200)) { // add tape noise when paused
data/fbzx-3.1.0/src/emulator.cpp:199: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.
	strcpy(config_path,getenv("HOME"));
data/fbzx-3.1.0/src/emulator.cpp:230: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.
	strcpy(config_path,getenv("HOME"));
data/fbzx-3.1.0/src/emulator.cpp:442:20:  [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.
	strcpy(path_snaps,getenv("HOME"));
data/fbzx-3.1.0/src/cargador.cpp:78:12:  [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).
	fichero = fopen(filename, "r");
data/fbzx-3.1.0/src/cargador.cpp:84:12:  [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).
	fichero = fopen(filename, "w");
data/fbzx-3.1.0/src/cargador.cpp:166:11:  [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 tempo[30], tempo2[56], type, compressed, page, byte_read[3];
data/fbzx-3.1.0/src/cargador.cpp:188:12:  [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).
	fichero = fopen(filename, "r");
data/fbzx-3.1.0/src/cargador.cpp:422:4:  [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(snap->page[0], memo, 16384);
data/fbzx-3.1.0/src/cargador.cpp:423:4:  [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(snap->page[1], memo + 16384, 16384);
data/fbzx-3.1.0/src/cargador.cpp:424:4:  [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(snap->page[2], memo + 32768, 16384);
data/fbzx-3.1.0/src/cargador.cpp:459:12:  [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).
	fichero = fopen(filename, "r");
data/fbzx-3.1.0/src/cargador.cpp:551: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(snap->page[0], tempo + 27, 16384);
data/fbzx-3.1.0/src/cargador.cpp:552: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(snap->page[1], tempo + 16411, 16384);
data/fbzx-3.1.0/src/cargador.cpp:553: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(snap->page[2], tempo + 32795, 16384);
data/fbzx-3.1.0/src/cargador.cpp:556: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(snap->page[5], tempo + 27, 16384);
data/fbzx-3.1.0/src/cargador.cpp:557: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(snap->page[2], tempo + 16411, 16384);
data/fbzx-3.1.0/src/cargador.cpp:561: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(snap->page[v1], tempo + 32795, 16384);
data/fbzx-3.1.0/src/cargador.cpp:567:4:  [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(snap->page[loop], tempo2 + addr, 16384);
data/fbzx-3.1.0/src/emulator.cpp:44:1:  [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 path_snaps[2049];
data/fbzx-3.1.0/src/emulator.cpp:45:1:  [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 path_taps[2049];
data/fbzx-3.1.0/src/emulator.cpp:46:1:  [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 path_mdrs[2049];
data/fbzx-3.1.0/src/emulator.cpp:195: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 config_path[1024];
data/fbzx-3.1.0/src/emulator.cpp:203:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(config_path,".fbzx");
data/fbzx-3.1.0/src/emulator.cpp:204:12:  [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).
	fconfig = fopen(config_path,"wb");
data/fbzx-3.1.0/src/emulator.cpp:224: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 config_path[1024];
data/fbzx-3.1.0/src/emulator.cpp:225: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 line[1024],carac,done;
data/fbzx-3.1.0/src/emulator.cpp:234:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(config_path,".fbzx");
data/fbzx-3.1.0/src/emulator.cpp:235:12:  [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).
	fconfig = fopen(config_path,"rb");
data/fbzx-3.1.0/src/llscreen.cpp:115: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 tmp[4096];
data/fbzx-3.1.0/src/llsound.cpp:318:11:  [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).
	audio_fd=open("/dev/dsp",O_WRONLY); // open DSP
data/fbzx-3.1.0/src/menus.cpp:146: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 texto[41];
data/fbzx-3.1.0/src/menus.cpp:159:5:  [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(texto,"Mode: \001\01648K issue2");
data/fbzx-3.1.0/src/menus.cpp:161:5:  [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(texto,"Mode: \001\01648K issue3");
data/fbzx-3.1.0/src/menus.cpp:164:4:  [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(texto,"Mode: \001\016Sinclair 128K");
data/fbzx-3.1.0/src/menus.cpp:167:4:  [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(texto,"Mode: \001\016Amstrad +2");
data/fbzx-3.1.0/src/menus.cpp:170:4:  [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(texto,"Mode: \001\016Amstrad +2A/+3");
data/fbzx-3.1.0/src/menus.cpp:173:4:  [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(texto,"Mode: \001\016Spanish 128K");
data/fbzx-3.1.0/src/menus.cpp:181:4:  [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(texto,"Joystick emulation: \001\016Cursor");
data/fbzx-3.1.0/src/menus.cpp:184:4:  [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(texto,"Joystick emulation: \001\016Kempston");
data/fbzx-3.1.0/src/menus.cpp:187:4:  [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(texto,"Joystick emulation: \001\016Sinclair (1)");
data/fbzx-3.1.0/src/menus.cpp:190:4:  [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(texto,"Joystick emulation: \001\016Sinclair (2)");
data/fbzx-3.1.0/src/menus.cpp:196:4:  [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(texto,"AY-3-8912 Emulation: \001\014enabled");
data/fbzx-3.1.0/src/menus.cpp:198:4:  [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(texto,"AY-3-8912 Emulation: \001\013disabled");
data/fbzx-3.1.0/src/menus.cpp:203:4:  [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(texto,"Interface I Emulation: \001\014enabled");
data/fbzx-3.1.0/src/menus.cpp:205:4:  [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(texto,"Interface I Emulation: \001\013disabled");
data/fbzx-3.1.0/src/menus.cpp:210:4:  [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(texto,"Double scan: \001\014enabled");
data/fbzx-3.1.0/src/menus.cpp:212:4:  [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(texto,"Double scan: \001\013disabled");
data/fbzx-3.1.0/src/menus.cpp:217:4:  [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(texto,"TURBO mode: \001\014enabled");
data/fbzx-3.1.0/src/menus.cpp:219:4:  [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(texto,"TURBO mode: \001\013disabled");
data/fbzx-3.1.0/src/menus.cpp:229:4:  [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(texto,"Kempston Mouse: \001\014enabled");
data/fbzx-3.1.0/src/menus.cpp:231:4:  [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(texto,"Kempston Mouse: \001\013disabled");
data/fbzx-3.1.0/src/menus.cpp:376: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 string[80];
data/fbzx-3.1.0/src/menus.cpp:421:3:  [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(string,"Address: %d; old value: %d\n",address,old_value);
data/fbzx-3.1.0/src/menus.cpp:452:3:  [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(string,"Set address %d from %d to %d\n",address,old_value,new_value);
data/fbzx-3.1.0/src/menus.cpp:681: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 nombre2[1024];
data/fbzx-3.1.0/src/menus.cpp:706: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).
		FILE *tmp = fopen(nombre2,"wb"); // create for read and write
data/fbzx-3.1.0/src/menus.cpp:837: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 nombre2[1024];
data/fbzx-3.1.0/src/menus.cpp:878: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 nombre2[1024];
data/fbzx-3.1.0/src/menus.cpp:896: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).
	fichero=fopen(nombre2,"r"); // test if it exists
data/fbzx-3.1.0/src/menus.cpp:905:11:  [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).
		fichero=fopen(nombre2,"wb"); // create for write
data/fbzx-3.1.0/src/menus.cpp:941: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 nombre[37],nombre2[38];
data/fbzx-3.1.0/src/menus.cpp:1241: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 nombre2[50];
data/fbzx-3.1.0/src/menus.cpp:1248:3:  [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 (nombre2, " %d%c ", value,CURSOR_ELEMENT);
data/fbzx-3.1.0/src/menus.cpp:1337: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 nombre2[1024];
data/fbzx-3.1.0/src/menus.cpp:1419:11:  [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 paleta_tmp[64];
data/fbzx-3.1.0/src/menus.cpp:1431: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).
	fichero=fopen(filename,"rb");
data/fbzx-3.1.0/src/menus.cpp:1482: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 path[2049],fichero[2049],extension[5],found;
data/fbzx-3.1.0/src/microdrive.cpp:157:11:  [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).
	mdr_file=fopen(this->mdr_current_mdr,"wb"); // create for write
data/fbzx-3.1.0/src/microdrive.cpp:197:11:  [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).
	mdr_file=fopen(filename,"rb"); // read
data/fbzx-3.1.0/src/microdrive.cpp:218:11:  [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).
	mdr_file=fopen(filename,"r"); // test if it exists
data/fbzx-3.1.0/src/tape.cpp:113:3:  [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 data[256];
data/fbzx-3.1.0/src/tape.cpp:132:3:  [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 data[256];
data/fbzx-3.1.0/src/tape.cpp:466:4:  [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,this->data+1,size);
data/fbzx-3.1.0/src/tape.cpp:488: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(this->data, data, size);
data/fbzx-3.1.0/src/tape.cpp:583: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(this->data, data, size);
data/fbzx-3.1.0/src/tape.cpp:1332: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 char_id[10];
data/fbzx-3.1.0/src/z80free/z80free_tester.c:26: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 memory[65536];
data/fbzx-3.1.0/src/z80free/z80free_tester.c:28:1:  [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 test_name[20];
data/fbzx-3.1.0/src/z80free/z80free_tester.c:253: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).
	infile=fopen("tests.z80free","r");
data/fbzx-3.1.0/src/cargador.cpp:174:13:  [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).
	longitud = strlen(filename);
data/fbzx-3.1.0/src/emulator.cpp:61:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		fichero->read((char*)ordenador->memoria+offset,16384);
data/fbzx-3.1.0/src/emulator.cpp:159:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	fichero->read((char*)ordenador->shadowrom,8192);
data/fbzx-3.1.0/src/emulator.cpp:176:11:  [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).
	longitud=strlen(nombre);
data/fbzx-3.1.0/src/emulator.cpp:200: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).
	length=strlen(config_path);
data/fbzx-3.1.0/src/emulator.cpp:202:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(config_path,"/");
data/fbzx-3.1.0/src/emulator.cpp:231: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).
	length=strlen(config_path);
data/fbzx-3.1.0/src/emulator.cpp:233:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(config_path,"/");
data/fbzx-3.1.0/src/emulator.cpp:443: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).
	length=strlen(path_snaps);
data/fbzx-3.1.0/src/emulator.cpp:445:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(path_snaps,"/");
data/fbzx-3.1.0/src/llscreen.cpp:503:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				fichero->read((char *)&valor,1);
data/fbzx-3.1.0/src/llscreen.cpp:512:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				fichero->read((char *)&valor,1);
data/fbzx-3.1.0/src/llsound.cpp:443: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(75000); // wait 1/20 second
data/fbzx-3.1.0/src/menus.cpp:1229:11:  [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).
	longitud=strlen(path_snaps);
data/fbzx-3.1.0/src/menus.cpp:1486:15:  [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('/'!=path[strlen(path)-1])
data/fbzx-3.1.0/src/menus.cpp:1487:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(path,"/"); // add the final / to the path
data/fbzx-3.1.0/src/menus.cpp:1507:11:  [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).
			length=strlen(entry->d_name);
data/fbzx-3.1.0/src/menus.cpp:1596:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	unsigned char fin,read;
data/fbzx-3.1.0/src/menus.cpp:1612:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(read) {
data/fbzx-3.1.0/src/menus.cpp:1683:14:  [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).
				longitud=strlen(path);
data/fbzx-3.1.0/src/tape.cpp:44:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read((char*)&data, 1);
data/fbzx-3.1.0/src/tape.cpp:64:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read((char*)data, 2);
data/fbzx-3.1.0/src/tape.cpp:89:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read((char*)data, 3);
data/fbzx-3.1.0/src/tape.cpp:119:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read(data, length);
data/fbzx-3.1.0/src/tape.cpp:540:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read ((char*)this->data, size);
data/fbzx-3.1.0/src/tape.cpp:627:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read ((char*)this->data, size);
data/fbzx-3.1.0/src/tape.cpp:769:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read ((char*)this->data, this->data_size);
data/fbzx-3.1.0/src/tape.cpp:1233:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read((char*)this->data,this->size);
data/fbzx-3.1.0/src/tape.cpp:1288:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read((char*)this->data,this->size);
data/fbzx-3.1.0/src/tape.cpp:1344:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file.read(char_id,10); // read the (maybe) TZX header
data/fbzx-3.1.0/src/tape.cpp:1402:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file->read((char*)tmpdata,10); // read TZX header
data/fbzx-3.1.0/src/tape.cpp:1405:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read ((char*)&block_type, 1);

ANALYSIS SUMMARY:

Hits = 130
Lines analyzed = 21017 in approximately 0.66 seconds (31831 lines/second)
Physical Source Lines of Code (SLOC) = 18688
Hits@level = [0] 193 [1]  32 [2]  76 [3]   4 [4]  18 [5]   0
Hits@level+ = [0+] 323 [1+] 130 [2+]  98 [3+]  22 [4+]  18 [5+]   0
Hits/KSLOC@level+ = [0+] 17.2838 [1+] 6.95634 [2+] 5.24401 [3+] 1.17723 [4+] 0.963185 [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.