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/gamazons-0.83/acconfig.h
Examining data/gamazons-0.83/config.h
Examining data/gamazons-0.83/src/interface.h
Examining data/gamazons-0.83/src/main-boarddrawn.c
Examining data/gamazons-0.83/src/eval.c
Examining data/gamazons-0.83/src/unit-test.c
Examining data/gamazons-0.83/src/unit-test.h
Examining data/gamazons-0.83/src/bstate.h
Examining data/gamazons-0.83/src/support.c
Examining data/gamazons-0.83/src/support.h
Examining data/gamazons-0.83/src/board.h
Examining data/gamazons-0.83/src/interface.c
Examining data/gamazons-0.83/src/callbacks.h
Examining data/gamazons-0.83/src/callbacks.c
Examining data/gamazons-0.83/src/board.c
Examining data/gamazons-0.83/src/bstate.c
Examining data/gamazons-0.83/src/moves.c
Examining data/gamazons-0.83/src/amazons.h
Examining data/gamazons-0.83/src/main.c

FINAL RESULTS:

data/gamazons-0.83/src/board.c:825:7:  [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(err_msg, move_str);
data/gamazons-0.83/src/callbacks.c:103:7:  [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, PACKAGE_DATA_DIR "/pixmaps/gnome-gamazons.png");
data/gamazons-0.83/src/callbacks.c:855: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(options.hist_dir, selected_filename);
data/gamazons-0.83/src/callbacks.c:857: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(options.hist_dir, temp_dir);
data/gamazons-0.83/src/callbacks.c:942: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(options.hist_dir, selected_filename);
data/gamazons-0.83/src/callbacks.c:944: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(options.hist_dir, temp_dir);
data/gamazons-0.83/src/callbacks.c:1040: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(options.hist_dir, selected_filename);
data/gamazons-0.83/src/callbacks.c:1042: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(options.hist_dir, temp_dir);
data/gamazons-0.83/src/main-boarddrawn.c:178:7:  [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(color, SQUARE_COLOR_1);
data/gamazons-0.83/src/main-boarddrawn.c:180:7:  [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(color, SQUARE_COLOR_2);
data/gamazons-0.83/src/moves.c:1750: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(options.hist_dir, home_env);
data/gamazons-0.83/src/moves.c:1788: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(file, home);
data/gamazons-0.83/src/moves.c:1798:11:  [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.
   while (fscanf(rc_fd, "%s", variable) != EOF)
data/gamazons-0.83/src/moves.c:1860:3:  [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.
	 fscanf(rc_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1861: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(options.images.white_piece, buffer);
data/gamazons-0.83/src/moves.c:1865:3:  [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.
	 fscanf(rc_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1866: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(options.images.black_piece, buffer);
data/gamazons-0.83/src/moves.c:1870:3:  [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.
	 fscanf(rc_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1871: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(options.images.white_sq, buffer);
data/gamazons-0.83/src/moves.c:1875:3:  [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.
	 fscanf(rc_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1876: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(options.images.grey_sq, buffer);
data/gamazons-0.83/src/moves.c:1880:3:  [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.
	 fscanf(rc_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1881: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(options.images.arrow_sq, buffer);
data/gamazons-0.83/src/moves.c:1885:3:  [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.
	 fscanf(rc_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1886: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(options.hist_dir, buffer);
data/gamazons-0.83/src/moves.c:1890:3:  [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.
	 fscanf(rc_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1922: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(file, home);
data/gamazons-0.83/src/moves.c:2007:11:  [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.
   while (fscanf(theme_fd, "%s", variable) != EOF)
data/gamazons-0.83/src/moves.c:2019:3:  [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.
	 fscanf(theme_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:2020: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(options.images.white_piece, PACKAGE_DATA_DIR "/pixmaps/gamazons/");
data/gamazons-0.83/src/moves.c:2021: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(options.images.white_piece, buffer);
data/gamazons-0.83/src/moves.c:2025:3:  [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.
	 fscanf(theme_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:2026: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(options.images.black_piece, PACKAGE_DATA_DIR "/pixmaps/gamazons/");
data/gamazons-0.83/src/moves.c:2027: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(options.images.black_piece, buffer);
data/gamazons-0.83/src/moves.c:2031:3:  [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.
	 fscanf(theme_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:2032: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(options.images.white_sq, PACKAGE_DATA_DIR "/pixmaps/gamazons/");
data/gamazons-0.83/src/moves.c:2033: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(options.images.white_sq, buffer);
data/gamazons-0.83/src/moves.c:2037:3:  [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.
	 fscanf(theme_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:2038: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(options.images.grey_sq, PACKAGE_DATA_DIR "/pixmaps/gamazons/");
data/gamazons-0.83/src/moves.c:2039: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(options.images.grey_sq, buffer);
data/gamazons-0.83/src/moves.c:2043:3:  [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.
	 fscanf(theme_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:2044: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(options.images.arrow_sq, PACKAGE_DATA_DIR "/pixmaps/gamazons/");
data/gamazons-0.83/src/moves.c:2045: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(options.images.arrow_sq, buffer);
data/gamazons-0.83/src/moves.c:2049:3:  [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.
	 fscanf(theme_fd, "%s", buffer);
data/gamazons-0.83/src/moves.c:1723:4:  [3] (random) srand:
  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.
   srand(time(NULL));
data/gamazons-0.83/src/moves.c:1749: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.
   home_env = getenv("HOME");
data/gamazons-0.83/src/moves.c:1785:17:  [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.
   if (!(home = getenv("HOME")))
data/gamazons-0.83/src/moves.c:1919:17:  [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.
   if (!(home = getenv("HOME")))
data/gamazons-0.83/src/amazons.h:100:4:  [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 white_piece[255];
data/gamazons-0.83/src/amazons.h:101:4:  [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 black_piece[255];
data/gamazons-0.83/src/amazons.h:102:4:  [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 white_sq[255];
data/gamazons-0.83/src/amazons.h:103:4:  [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 grey_sq[255];
data/gamazons-0.83/src/amazons.h:104:4:  [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 arrow_sq[255];
data/gamazons-0.83/src/amazons.h:115:4:  [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 hist_dir[512];
data/gamazons-0.83/src/board.c:787:4:  [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 move_str[32];
data/gamazons-0.83/src/board.c:788:4:  [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 err_msg[256];
data/gamazons-0.83/src/board.c:824:7:  [2] (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). Risk is low because the source is a constant string.
      strcpy(err_msg, "You've hit a bug.  The following illegal move was just attempted: ");
data/gamazons-0.83/src/board.c:1212:4:  [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_buf[32];
data/gamazons-0.83/src/board.c:1275: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(move_str, "%d. %c%d-%c%d, %c%d\n", state_i, from_alpha, from_num,
data/gamazons-0.83/src/board.h:53:4:  [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 db[120];
data/gamazons-0.83/src/callbacks.c:101:7:  [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[1024];
data/gamazons-0.83/src/callbacks.c:868:17:  [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).
   history_fd = fopen(selected_filename, "w");
data/gamazons-0.83/src/callbacks.c:949:17:  [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).
   history_fd = fopen(selected_filename, "ro");
data/gamazons-0.83/src/callbacks.c:1047:17:  [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).
   history_fd = fopen(selected_filename, "ro");
data/gamazons-0.83/src/main-boarddrawn.c:92:4:  [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 color[256];
data/gamazons-0.83/src/main-boarddrawn.c:188:4:  [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 color[256];
data/gamazons-0.83/src/moves.c:1102:4:  [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 move_str[10];
data/gamazons-0.83/src/moves.c:1777:4:  [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 *home, file[256];
data/gamazons-0.83/src/moves.c:1779:4:  [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 variable[256];
data/gamazons-0.83/src/moves.c:1780:4:  [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 buffer[256];
data/gamazons-0.83/src/moves.c:1789: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(file, "/.gamazons");
data/gamazons-0.83/src/moves.c:1794: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).
   rc_fd = fopen(file, "r");
data/gamazons-0.83/src/moves.c:1912:4:  [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 *home, file[256];
data/gamazons-0.83/src/moves.c:1923: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(file, "/.gamazons");
data/gamazons-0.83/src/moves.c:1928: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).
   rc_fd = fopen(file, "w");
data/gamazons-0.83/src/moves.c:1992:4:  [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 *home, file[256];
data/gamazons-0.83/src/moves.c:1994:4:  [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 variable[256];
data/gamazons-0.83/src/moves.c:1995:4:  [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 buffer[256];
data/gamazons-0.83/src/moves.c:2000: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).
   theme_fd = fopen(theme, "r");
data/gamazons-0.83/src/moves.c:2107: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).
	      options.engine.maxdepth = atoi(argv[++i]);
data/gamazons-0.83/src/moves.c:2114:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	      if (atoi(argv[++i]) == 1)
data/gamazons-0.83/src/moves.c:2124:16:  [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).
	      movin = fopen(argv[++i], "r+");
data/gamazons-0.83/src/moves.c:2129:17:  [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).
	      movout = fopen(argv[++i], "r+");
data/gamazons-0.83/src/moves.c:2143: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).
	      options.engine.timeout = atoi(argv[++i]);
data/gamazons-0.83/src/moves.c:2147: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).
	      options.engine.maxdepth = atoi(argv[++i]);
data/gamazons-0.83/src/board.c:1445:7:  [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(10000);
data/gamazons-0.83/src/callbacks.c:858:21:  [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).
   options.hist_dir[strlen(options.hist_dir)+1] = '\0';
data/gamazons-0.83/src/callbacks.c:859:21:  [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).
   options.hist_dir[strlen(options.hist_dir)] = '/';
data/gamazons-0.83/src/callbacks.c:945:21:  [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).
   options.hist_dir[strlen(options.hist_dir)+1] = '\0';
data/gamazons-0.83/src/callbacks.c:946:21:  [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).
   options.hist_dir[strlen(options.hist_dir)] = '/';
data/gamazons-0.83/src/callbacks.c:1043:21:  [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).
   options.hist_dir[strlen(options.hist_dir)+1] = '\0';
data/gamazons-0.83/src/callbacks.c:1044:21:  [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).
   options.hist_dir[strlen(options.hist_dir)] = '/';
data/gamazons-0.83/src/moves.c:1220:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   tok = getc(movin);
data/gamazons-0.83/src/moves.c:1222:13:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      tok = getc(movin);
data/gamazons-0.83/src/moves.c:1235:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   while (getc(movin) != '\n');
data/gamazons-0.83/src/moves.c:1751:4:  [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(options.hist_dir, "/");
data/gamazons-0.83/src/moves.c:1800:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (ch = fgetc(rc_fd))
data/gamazons-0.83/src/moves.c:2009:19:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      while (ch = fgetc(theme_fd))

ANALYSIS SUMMARY:

Hits = 98
Lines analyzed = 8767 in approximately 0.21 seconds (42339 lines/second)
Physical Source Lines of Code (SLOC) = 6227
Hits@level = [0] 234 [1]  13 [2]  37 [3]   4 [4]  44 [5]   0
Hits@level+ = [0+] 332 [1+]  98 [2+]  85 [3+]  48 [4+]  44 [5+]   0
Hits/KSLOC@level+ = [0+] 53.3162 [1+] 15.7379 [2+] 13.6502 [3+] 7.70837 [4+] 7.066 [5+]   0
Dot directories skipped = 2 (--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.