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/dreamchess-0.3.0/common/src/include/git_rev.h
Examining data/dreamchess-0.3.0/common/src/include/pipe_unix.h
Examining data/dreamchess-0.3.0/common/src/include/pipe_win32.h
Examining data/dreamchess-0.3.0/common/src/include/san.h
Examining data/dreamchess-0.3.0/common/src/msgbuf.c
Examining data/dreamchess-0.3.0/common/src/msgbuf.h
Examining data/dreamchess-0.3.0/common/src/pipe_unix.c
Examining data/dreamchess-0.3.0/common/src/pipe_win32.c
Examining data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c
Examining data/dreamchess-0.3.0/dreamchess/src/audio/playlist.h
Examining data/dreamchess-0.3.0/dreamchess/src/audio/sdlmixer.c
Examining data/dreamchess-0.3.0/dreamchess/src/board.c
Examining data/dreamchess-0.3.0/dreamchess/src/board.h
Examining data/dreamchess-0.3.0/dreamchess/src/comm.c
Examining data/dreamchess-0.3.0/dreamchess/src/comm.h
Examining data/dreamchess-0.3.0/dreamchess/src/comm_unix.c
Examining data/dreamchess-0.3.0/dreamchess/src/comm_win32.c
Examining data/dreamchess-0.3.0/dreamchess/src/credits.c
Examining data/dreamchess-0.3.0/dreamchess/src/credits.h
Examining data/dreamchess-0.3.0/dreamchess/src/debug.c
Examining data/dreamchess-0.3.0/dreamchess/src/debug.h
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/configuration.c
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/ingame_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/message_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/quit_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/resolution.c
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/styles.c
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/system_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/dialogs/time.c
Examining data/dreamchess-0.3.0/dreamchess/src/dir.c
Examining data/dreamchess-0.3.0/dreamchess/src/dir.h
Examining data/dreamchess-0.3.0/dreamchess/src/dreamchess.c
Examining data/dreamchess-0.3.0/dreamchess/src/dreamchess.h
Examining data/dreamchess-0.3.0/dreamchess/src/fen.c
Examining data/dreamchess-0.3.0/dreamchess/src/fen.h
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/action.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/align.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/bin.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/box.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/clipping.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/container.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/edit.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/entry.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/frame.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/hbox.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/image.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/label.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/option.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/scrollbarv.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/select.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/seperatorh.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/seperatorv.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/signal.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/system.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/vbox.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/viewport.c
Examining data/dreamchess-0.3.0/dreamchess/src/gamegui/widget.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/colours.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/credits.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/draw_scene.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/draw_shape.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/gamegui_driver.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/get_move.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/ingame_ui.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/load_data.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/promote_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/saveload_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/system.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/text.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/texture.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/theme.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/title_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/transitions.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl.h
Examining data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.h
Examining data/dreamchess-0.3.0/dreamchess/src/gui/victory_dialog.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/vkeyboard.c
Examining data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c
Examining data/dreamchess-0.3.0/dreamchess/src/history.c
Examining data/dreamchess-0.3.0/dreamchess/src/history.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/audio.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/dialogs.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/engine.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/action.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/align.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/bin.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/box.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/clipping.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/container.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/dialog.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/edit.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/entry.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/frame.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/hbox.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/image.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/label.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/option.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/queue.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/scrollbarv.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/select.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/seperatorh.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/seperatorv.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/signal.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/system.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/vbox.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/viewport.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/gamegui/widget.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/options.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/system_config.h
Examining data/dreamchess-0.3.0/dreamchess/src/include/theme.h
Examining data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c
Examining data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.h
Examining data/dreamchess-0.3.0/dreamchess/src/options.c
Examining data/dreamchess-0.3.0/dreamchess/src/pgn_scanner.h
Examining data/dreamchess-0.3.0/dreamchess/src/system_config.c
Examining data/dreamchess-0.3.0/dreamchess/src/theme.c
Examining data/dreamchess-0.3.0/dreamchess/src/ui.h
Examining data/dreamchess-0.3.0/dreamchess/src/xml.c
Examining data/dreamchess-0.3.0/dreamchess/src/xml.h
Examining data/dreamchess-0.3.0/dreamer/src/board.c
Examining data/dreamchess-0.3.0/dreamer/src/board.h
Examining data/dreamchess-0.3.0/dreamer/src/commands.c
Examining data/dreamchess-0.3.0/dreamer/src/commands.h
Examining data/dreamchess-0.3.0/dreamer/src/dreamer.c
Examining data/dreamchess-0.3.0/dreamer/src/dreamer.h
Examining data/dreamchess-0.3.0/dreamer/src/e_comm.c
Examining data/dreamchess-0.3.0/dreamer/src/e_comm.h
Examining data/dreamchess-0.3.0/dreamer/src/e_comm_unix.c
Examining data/dreamchess-0.3.0/dreamer/src/e_comm_win32.c
Examining data/dreamchess-0.3.0/dreamer/src/eval.c
Examining data/dreamchess-0.3.0/dreamer/src/eval.h
Examining data/dreamchess-0.3.0/dreamer/src/gen_chess_moves.c
Examining data/dreamchess-0.3.0/dreamer/src/hashing.c
Examining data/dreamchess-0.3.0/dreamer/src/hashing.h
Examining data/dreamchess-0.3.0/dreamer/src/history.c
Examining data/dreamchess-0.3.0/dreamer/src/history.h
Examining data/dreamchess-0.3.0/dreamer/src/main.c
Examining data/dreamchess-0.3.0/dreamer/src/makebook.c
Examining data/dreamchess-0.3.0/dreamer/src/makebook.h
Examining data/dreamchess-0.3.0/dreamer/src/move.c
Examining data/dreamchess-0.3.0/dreamer/src/move.h
Examining data/dreamchess-0.3.0/dreamer/src/move_data.h
Examining data/dreamchess-0.3.0/dreamer/src/pgn_scanner.h
Examining data/dreamchess-0.3.0/dreamer/src/repetition.c
Examining data/dreamchess-0.3.0/dreamer/src/repetition.h
Examining data/dreamchess-0.3.0/dreamer/src/search.c
Examining data/dreamchess-0.3.0/dreamer/src/search.h
Examining data/dreamchess-0.3.0/dreamer/src/timer.c
Examining data/dreamchess-0.3.0/dreamer/src/timer.h
Examining data/dreamchess-0.3.0/dreamer/src/transposition.c
Examining data/dreamchess-0.3.0/dreamer/src/transposition.h
Examining data/dreamchess-0.3.0/test_c99_varargs.c
Examining data/dreamchess-0.3.0/test_gnuc_varargs.c

FINAL RESULTS:

data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:97:3:  [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(s->entry->filename, s->dir);
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:99:3:  [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(s->entry->filename, text);
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:108: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(filename, dir);
data/dreamchess-0.3.0/dreamchess/src/comm.c:39:7:  [4] (format) vsnprintf:
  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.
		n = vsnprintf(p, size, fmt, ap);
data/dreamchess-0.3.0/dreamchess/src/comm_unix.c:85:3:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execvp(engine, argv);
data/dreamchess-0.3.0/dreamchess/src/debug.c:55:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(dbg_file, fmt, ap);
data/dreamchess-0.3.0/dreamchess/src/debug.c:79:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(dbg_file, fmt, ap);
data/dreamchess-0.3.0/dreamchess/src/debug.c:101:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(dbg_file, fmt, ap);
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:408:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			printf("Usage: dreamchess [options]\n\n"
data/dreamchess-0.3.0/dreamchess/src/gamegui/dialog.c:422:3:  [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(dialog->title, title);
data/dreamchess-0.3.0/dreamchess/src/gamegui/entry.c:206: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(entry->text, text);
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:121:11:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    (void)vfprintf(stderr,fmt,ap);
data/dreamchess-0.3.0/dreamchess/src/options.c:110: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(filename, group->name);
data/dreamchess-0.3.0/dreamchess/src/options.c:168: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(filename, group->name);
data/dreamchess-0.3.0/dreamchess/src/theme.c:164:3:  [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(filename, THEME_DIR "\\");
data/dreamchess-0.3.0/dreamchess/src/theme.c:165:3:  [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(filename, ffd.cFileName);
data/dreamchess-0.3.0/dreamchess/src/theme.c:183: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(filename, THEME_DIR "/");
data/dreamchess-0.3.0/dreamchess/src/theme.c:184:5:  [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(filename, themedir_entry->d_name);
data/dreamchess-0.3.0/dreamchess/src/theme.c:233: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(dirname, cur_dir);
data/dreamchess-0.3.0/dreamchess/src/theme.c:235: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(dirname, ffd.cFileName);
data/dreamchess-0.3.0/dreamchess/src/theme.c:270: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(dirname, cur_dir);
data/dreamchess-0.3.0/dreamchess/src/theme.c:272:5:  [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(dirname, entry->d_name);
data/dreamchess-0.3.0/dreamchess/src/xml.c:88:3:  [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(s->attrs[i], attrs[i]);
data/dreamchess-0.3.0/dreamer/src/e_comm.c:37:7:  [4] (format) vsnprintf:
  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.
		n = vsnprintf(p, size, fmt, ap);
data/dreamchess-0.3.0/dreamchess/src/comm_win32.c:96:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (!CreateProcess(NULL, engine, NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, &start_info, &proc_info)) {
data/dreamchess-0.3.0/dreamchess/src/comm_win32.c:96:7:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
	if (!CreateProcess(NULL, engine, NULL, NULL, TRUE, DETACHED_PROCESS, NULL, NULL, &start_info, &proc_info)) {
data/dreamchess-0.3.0/dreamchess/src/dir.c:90:15:  [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.
	char *home = getenv("HOME");
data/dreamchess-0.3.0/dreamchess/src/dir.c:122:15:  [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.
	char *home = getenv("HOME");
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:401:14:  [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.
	while ((c = getopt_long(argc, argv, "1:fhW:H:", options, &optindex)) > -1) {
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:404:14:  [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 ((c = getopt(argc, argv, "1:fhW:H:")) > -1) {
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:348:22:  [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") != NULL);
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:523: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(int nargc, char * const *nargv, const char *options)
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:543:1:  [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.
getopt_long(int nargc, char * const *nargv, const char *options,
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.h:29: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 nargc, char * const *nargv, const char *options);
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.h:77: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 nargc, char * const *nargv, const char *options,
data/dreamchess-0.3.0/common/src/pipe_unix.c:34: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[BUF_LEN];
data/dreamchess-0.3.0/common/src/pipe_win32.c:30: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[BUF_LEN];
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:109: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(filename, "/tracks.xml");
data/dreamchess-0.3.0/dreamchess/src/board.c:85: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 prom[4] = "nbrq";
data/dreamchess-0.3.0/dreamchess/src/comm_unix.c:43: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 *argv[2];
data/dreamchess-0.3.0/dreamchess/src/debug.c:33:13:  [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).
	dbg_file = fopen("dreamchess.log", "w");
data/dreamchess-0.3.0/dreamchess/src/dialogs/resolution.c:152: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 val[5];
data/dreamchess-0.3.0/dreamchess/src/dialogs/time.c:154: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 val[5];
data/dreamchess-0.3.0/dreamchess/src/dir.c:33: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 filename[MAX_PATH + 6];
data/dreamchess-0.3.0/dreamchess/src/dir.c:38: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(filename, "/data");
data/dreamchess-0.3.0/dreamchess/src/dir.c:43: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 appdir[MAX_PATH];
data/dreamchess-0.3.0/dreamchess/src/dir.c:70: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 temp1[200];
data/dreamchess-0.3.0/dreamchess/src/dir.c:71: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 temp2[200];
data/dreamchess-0.3.0/dreamchess/src/dir.c:72: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 temp3[200];
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:172: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 temp[80];
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:275: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 temp[80];
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:425:24:  [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).
			cl_options->width = atoi(optarg);
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:428:25:  [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).
			cl_options->height = atoi(optarg);
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:496: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 temp1[200];
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:497: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 temp2[200];
data/dreamchess-0.3.0/dreamchess/src/gui/draw_scene.c:34: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 temp[80];
data/dreamchess-0.3.0/dreamchess/src/gui/ingame_ui.c:273: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 s[11];
data/dreamchess-0.3.0/dreamchess/src/gui/ingame_ui.c:315: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 s[4];
data/dreamchess-0.3.0/dreamchess/src/gui/saveload_dialog.c:95: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 temp[80];
data/dreamchess-0.3.0/dreamchess/src/gui/system.c:156: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 fps_s[16];
data/dreamchess-0.3.0/dreamchess/src/gui/text.c:155: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 width[256];
data/dreamchess-0.3.0/dreamchess/src/gui/text.c:165:6:  [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).
	f = fopen("font.wid", "rb");
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:248: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 id[3];
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:252:6:  [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).
	f = fopen(filename, "r");
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:321: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 line[11];
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:363: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 id[3];
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:368:6:  [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).
	f = fopen(filename, "r");
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:601: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 mesh[256];
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:602: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 texture[256];
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:607:6:  [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).
	f = fopen(filename, "r");
data/dreamchess-0.3.0/dreamchess/src/gui/vkeyboard.c:80:5:  [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 key_str[2];
data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c:25: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 time_save[SAVEGAME_SLOTS][80];
data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c:51: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 temp[80];
data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c:62:7:  [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(temp, "w");
data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c:117:10:  [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).
		time = atoi(text);
data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c:132: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).
		config_save[slot].cpu_level = atoi(text);
data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c:134:34:  [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).
		config_save[slot].difficulty = atoi(text);
data/dreamchess-0.3.0/dreamchess/src/gui/xmlsavefile.c:164: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 temp[256];
data/dreamchess-0.3.0/dreamchess/src/history.c:144:6:  [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).
	f = fopen(filename, "w");
data/dreamchess-0.3.0/dreamchess/src/history.c:173: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 buf[16];
data/dreamchess-0.3.0/dreamchess/src/include/gamegui/entry.h:34: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 text[ENTRY_MAX_LEN + 1];                                                                                      \
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:182:6:  [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 **) nargv)[pos] = nargv[cstart];
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:184:6:  [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 **)nargv)[cstart] = swap;
data/dreamchess-0.3.0/dreamchess/src/options.c:111: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(filename, ".xml");
data/dreamchess-0.3.0/dreamchess/src/options.c:114:6:  [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).
	f = fopen(filename, "w");
data/dreamchess-0.3.0/dreamchess/src/options.c:169: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(filename, ".xml");
data/dreamchess-0.3.0/dreamchess/src/system_config.c:34: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 str[10];
data/dreamchess-0.3.0/dreamchess/src/system_config.c:58: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 buf[3];
data/dreamchess-0.3.0/dreamchess/src/system_config.c:68: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 buf[3];
data/dreamchess-0.3.0/dreamchess/src/system_config.c:147: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 buf[2];
data/dreamchess-0.3.0/dreamchess/src/theme.c:234:4:  [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(dirname, "\\music\\");
data/dreamchess-0.3.0/dreamchess/src/theme.c:252: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 cur_dir[PATH_MAX];
data/dreamchess-0.3.0/dreamchess/src/theme.c:271:5:  [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(dirname, "/music/");
data/dreamchess-0.3.0/dreamchess/src/theme.c:300: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[MAX_PATH];
data/dreamchess-0.3.0/dreamchess/src/xml.c:143:6:  [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).
	f = fopen(filename, "r");
data/dreamchess-0.3.0/dreamer/src/makebook.c:228:6:  [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).
	f = fopen(file, "wb+");
data/dreamchess-0.3.0/dreamer/src/search.c:103:2:  [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(&pv[ply][1], &pv[ply + 1][0], pv_len[ply + 1] * sizeof(move_t));
data/dreamchess-0.3.0/common/src/msgbuf.c:33: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).
    int buf_len = strlen(buf);
data/dreamchess-0.3.0/common/src/msgbuf.c:56:23:  [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(msg);
data/dreamchess-0.3.0/common/src/msgbuf.c:58:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(msg + len, buf, in_size);
data/dreamchess-0.3.0/common/src/msgbuf.c:65:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(msg, buf, in_size);
data/dreamchess-0.3.0/common/src/pipe_unix.c:52:22:  [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).
    write(fd_out, m, strlen(m));
data/dreamchess-0.3.0/common/src/pipe_unix.c:79:23:  [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(buf);
data/dreamchess-0.3.0/common/src/pipe_unix.c:80:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int bytes = read(fd_in, buf + len, BUF_LEN - len - 1);
data/dreamchess-0.3.0/common/src/pipe_win32.c:53:30:  [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 (!WriteFile(h_out, m, strlen(m), &written, NULL) ||
data/dreamchess-0.3.0/common/src/pipe_win32.c:54:20:  [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).
        (written < strlen(m)))
data/dreamchess-0.3.0/common/src/pipe_win32.c:78: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).
        len = strlen(buf);
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:96:31:  [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).
		s->entry->filename = malloc(strlen(s->dir) + strlen(text) + 2);
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:96:48:  [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).
		s->entry->filename = malloc(strlen(s->dir) + strlen(text) + 2);
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:98: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(s->entry->filename, "/");
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:106:26:  [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).
	char *filename = malloc(strlen(dir) + strlen("/tracks.xml") + 1);
data/dreamchess-0.3.0/dreamchess/src/audio/playlist.c:106:40:  [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).
	char *filename = malloc(strlen(dir) + strlen("/tracks.xml") + 1);
data/dreamchess-0.3.0/dreamchess/src/board.c:442:7:  [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 ((strlen(move_s) < 4) || (strlen(move_s) > 5))
data/dreamchess-0.3.0/dreamchess/src/board.c:442:31:  [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 ((strlen(move_s) < 4) || (strlen(move_s) > 5))
data/dreamchess-0.3.0/dreamchess/src/board.c:452:7:  [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 ((strlen(move_s) == 5) && (move_s[4] != 'n') && (move_s[4] != 'b') && (move_s[4] != 'r') && (move_s[4] != 'q'))
data/dreamchess-0.3.0/dreamchess/src/board.c:459:6:  [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 (strlen(move_s) == 5) {
data/dreamchess-0.3.0/dreamchess/src/comm.c:55:8:  [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 (p[strlen(p) - 1] == '\n')
data/dreamchess-0.3.0/dreamchess/src/comm.c:56:5:  [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).
		p[strlen(p) - 1] = 0;
data/dreamchess-0.3.0/dreamchess/src/dreamchess.c:579:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
							strncpy(comment, start + 1, end - start - 1);
data/dreamchess-0.3.0/dreamchess/src/gamegui/dialog.c:421:26:  [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).
		dialog->title = malloc(strlen(title) + 1);
data/dreamchess-0.3.0/dreamchess/src/gamegui/entry.c:94: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).
	int len = strlen(entry->text);
data/dreamchess-0.3.0/dreamchess/src/gamegui/entry.c:152: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).
		for (i = 0; i < strlen(entry->text); i++) {
data/dreamchess-0.3.0/dreamchess/src/gamegui/entry.c:203:6:  [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 (strlen(text) > entry->max_len)
data/dreamchess-0.3.0/dreamchess/src/gamegui/system.c:204: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).
	for (i = 0; i < strlen(s); i++) {
data/dreamchess-0.3.0/dreamchess/src/gamegui/system.c:229: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).
	for (i = 0; i < strlen((char *)s); i++) {
data/dreamchess-0.3.0/dreamchess/src/gui/gamegui_driver.c:25:60:  [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).
	char *utf32 = SDL_iconv_string("UTF-32LE", "UTF-8", utf8, strlen(utf8) + 1);
data/dreamchess-0.3.0/dreamchess/src/gui/text.c:70: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).
	for (i = 0; i < strlen(text); i++)
data/dreamchess-0.3.0/dreamchess/src/gui/text.c:95:28:  [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).
	return text_width_n(text, strlen(text));
data/dreamchess-0.3.0/dreamchess/src/gui/text.c:135: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).
	for (i = 0; i < strlen(text); i++) {
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:457:7:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if (fscanf(f, "BONE %255s\n", mesh->bone[i].name) != 1) {
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:615:37:  [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 (!fgets(mesh, 256, f) || (mesh[strlen(mesh) - 1] != '\n') || !fgets(texture, 256, f) ||
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:616: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).
			(texture[strlen(texture) - 1] != '\n')) {
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:621:8:  [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).
		mesh[strlen(mesh) - 1] = '\0';
data/dreamchess-0.3.0/dreamchess/src/gui/ui_sdlgl_3d.c:622: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).
		texture[strlen(texture) - 1] = '\0';
data/dreamchess-0.3.0/dreamchess/src/history.c:35:36:  [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 ((*width > 0) && (*width + 1 + strlen(token) >= 80)) {
data/dreamchess-0.3.0/dreamchess/src/history.c:47: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).
	*width += strlen(token);
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:218:22:  [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).
		current_argv_len = strlen(current_argv);
data/dreamchess-0.3.0/dreamchess/src/msvc/getopt.c:226:7:  [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 (strlen(long_options[i].name) == current_argv_len) {
data/dreamchess-0.3.0/dreamchess/src/options.c:109:20:  [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).
	filename = malloc(strlen(group->name) + 4 + 1);
data/dreamchess-0.3.0/dreamchess/src/options.c:167:20:  [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).
	filename = malloc(strlen(group->name) + 4 + 1);
data/dreamchess-0.3.0/dreamchess/src/theme.c:163:27:  [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).
		char *filename = malloc(strlen(ffd.cFileName) + strlen(THEME_DIR) + 1 + 1);
data/dreamchess-0.3.0/dreamchess/src/theme.c:163: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).
		char *filename = malloc(strlen(ffd.cFileName) + strlen(THEME_DIR) + 1 + 1);
data/dreamchess-0.3.0/dreamchess/src/theme.c:182:29:  [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).
				char *filename = malloc(strlen(THEME_DIR) + 1 + strlen(themedir_entry->d_name) + 1);
data/dreamchess-0.3.0/dreamchess/src/theme.c:182:53:  [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).
				char *filename = malloc(strlen(THEME_DIR) + 1 + strlen(themedir_entry->d_name) + 1);
data/dreamchess-0.3.0/dreamchess/src/theme.c:231:27:  [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).
			char *dirname = malloc(strlen(cur_dir) + 7 + strlen(ffd.cFileName) + 1);
data/dreamchess-0.3.0/dreamchess/src/theme.c:231:49:  [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).
			char *dirname = malloc(strlen(cur_dir) + 7 + strlen(ffd.cFileName) + 1);
data/dreamchess-0.3.0/dreamchess/src/theme.c:268:28:  [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).
				char *dirname = malloc(strlen(cur_dir) + strlen(entry->d_name) + 8);
data/dreamchess-0.3.0/dreamchess/src/theme.c:268:46:  [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).
				char *dirname = malloc(strlen(cur_dir) + strlen(entry->d_name) + 8);
data/dreamchess-0.3.0/dreamchess/src/xml.c:87:24:  [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).
		s->attrs[i] = malloc(strlen(attrs[i]) + 1);
data/dreamchess-0.3.0/dreamchess/src/xml.c:100:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(s->char_buf, (char *)text, len);
data/dreamchess-0.3.0/dreamer/src/board.c:115: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).
	int len = strlen(fen);
data/dreamchess-0.3.0/dreamer/src/commands.c:39: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).
	int len = strlen(ms);
data/dreamchess-0.3.0/dreamer/src/commands.c:216:8:  [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 (strlen(ms) == 5)
data/dreamchess-0.3.0/dreamer/src/commands.c:236:7:  [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 (strlen(ms) == 4)
data/dreamchess-0.3.0/dreamer/src/dreamer.c:44:22:  [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.
#define drm_sleep(M) usleep((M)*1000)

ANALYSIS SUMMARY:

Hits = 155
Lines analyzed = 22577 in approximately 0.67 seconds (33793 lines/second)
Physical Source Lines of Code (SLOC) = 14229
Hits@level = [0]  88 [1]  58 [2]  62 [3]  11 [4]  24 [5]   0
Hits@level+ = [0+] 243 [1+] 155 [2+]  97 [3+]  35 [4+]  24 [5+]   0
Hits/KSLOC@level+ = [0+] 17.0778 [1+] 10.8932 [2+] 6.81706 [3+] 2.45977 [4+] 1.6867 [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.