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/gnuchess-6.2.7/lib/gettext.h
Examining data/gnuchess-6.2.7/src/components.cc
Examining data/gnuchess-6.2.7/src/components.h
Examining data/gnuchess-6.2.7/src/adapter/book_merge.cpp
Examining data/gnuchess-6.2.7/src/adapter/board.cpp
Examining data/gnuchess-6.2.7/src/adapter/fen.cpp
Examining data/gnuchess-6.2.7/src/adapter/line.h
Examining data/gnuchess-6.2.7/src/adapter/book_make.cpp
Examining data/gnuchess-6.2.7/src/adapter/parse.cpp
Examining data/gnuchess-6.2.7/src/adapter/colour.h
Examining data/gnuchess-6.2.7/src/adapter/pgn.h
Examining data/gnuchess-6.2.7/src/adapter/util.cpp
Examining data/gnuchess-6.2.7/src/adapter/list.cpp
Examining data/gnuchess-6.2.7/src/adapter/search.h
Examining data/gnuchess-6.2.7/src/adapter/move.h
Examining data/gnuchess-6.2.7/src/adapter/parse.h
Examining data/gnuchess-6.2.7/src/adapter/board.h
Examining data/gnuchess-6.2.7/src/adapter/posix.h
Examining data/gnuchess-6.2.7/src/adapter/piece.cpp
Examining data/gnuchess-6.2.7/src/adapter/hash.cpp
Examining data/gnuchess-6.2.7/src/adapter/uci.h
Examining data/gnuchess-6.2.7/src/adapter/posix.cpp
Examining data/gnuchess-6.2.7/src/adapter/fen.h
Examining data/gnuchess-6.2.7/src/adapter/square.h
Examining data/gnuchess-6.2.7/src/adapter/hash.h
Examining data/gnuchess-6.2.7/src/adapter/game.h
Examining data/gnuchess-6.2.7/src/adapter/adapter.h
Examining data/gnuchess-6.2.7/src/adapter/engine.cpp
Examining data/gnuchess-6.2.7/src/adapter/move_do.h
Examining data/gnuchess-6.2.7/src/adapter/move_do.cpp
Examining data/gnuchess-6.2.7/src/adapter/square.cpp
Examining data/gnuchess-6.2.7/src/adapter/line.cpp
Examining data/gnuchess-6.2.7/src/adapter/book.h
Examining data/gnuchess-6.2.7/src/adapter/piece.h
Examining data/gnuchess-6.2.7/src/adapter/epd.cpp
Examining data/gnuchess-6.2.7/src/adapter/game.cpp
Examining data/gnuchess-6.2.7/src/adapter/move_gen.h
Examining data/gnuchess-6.2.7/src/adapter/option.h
Examining data/gnuchess-6.2.7/src/adapter/move.cpp
Examining data/gnuchess-6.2.7/src/adapter/pgn.cpp
Examining data/gnuchess-6.2.7/src/adapter/search.cpp
Examining data/gnuchess-6.2.7/src/adapter/colour.cpp
Examining data/gnuchess-6.2.7/src/adapter/main.h
Examining data/gnuchess-6.2.7/src/adapter/san.cpp
Examining data/gnuchess-6.2.7/src/adapter/san.h
Examining data/gnuchess-6.2.7/src/adapter/epd.h
Examining data/gnuchess-6.2.7/src/adapter/main.cpp
Examining data/gnuchess-6.2.7/src/adapter/util.h
Examining data/gnuchess-6.2.7/src/adapter/adapter.cpp
Examining data/gnuchess-6.2.7/src/adapter/move_legal.cpp
Examining data/gnuchess-6.2.7/src/adapter/attack.cpp
Examining data/gnuchess-6.2.7/src/adapter/uci.cpp
Examining data/gnuchess-6.2.7/src/adapter/book_merge.h
Examining data/gnuchess-6.2.7/src/adapter/list.h
Examining data/gnuchess-6.2.7/src/adapter/io.h
Examining data/gnuchess-6.2.7/src/adapter/engine.h
Examining data/gnuchess-6.2.7/src/adapter/book.cpp
Examining data/gnuchess-6.2.7/src/adapter/io.cpp
Examining data/gnuchess-6.2.7/src/adapter/move_gen.cpp
Examining data/gnuchess-6.2.7/src/adapter/random.h
Examining data/gnuchess-6.2.7/src/adapter/move_legal.h
Examining data/gnuchess-6.2.7/src/adapter/random.cpp
Examining data/gnuchess-6.2.7/src/adapter/book_make.h
Examining data/gnuchess-6.2.7/src/adapter/option.cpp
Examining data/gnuchess-6.2.7/src/adapter/attack.h
Examining data/gnuchess-6.2.7/src/main.cc
Examining data/gnuchess-6.2.7/src/engine/move_evasion.h
Examining data/gnuchess-6.2.7/src/engine/board.cpp
Examining data/gnuchess-6.2.7/src/engine/fen.cpp
Examining data/gnuchess-6.2.7/src/engine/pv.cpp
Examining data/gnuchess-6.2.7/src/engine/recog.cpp
Examining data/gnuchess-6.2.7/src/engine/trans.h
Examining data/gnuchess-6.2.7/src/engine/move_check.h
Examining data/gnuchess-6.2.7/src/engine/colour.h
Examining data/gnuchess-6.2.7/src/engine/util.cpp
Examining data/gnuchess-6.2.7/src/engine/list.cpp
Examining data/gnuchess-6.2.7/src/engine/search.h
Examining data/gnuchess-6.2.7/src/engine/move.h
Examining data/gnuchess-6.2.7/src/engine/see.h
Examining data/gnuchess-6.2.7/src/engine/protocol.cpp
Examining data/gnuchess-6.2.7/src/engine/value.cpp
Examining data/gnuchess-6.2.7/src/engine/protocol.h
Examining data/gnuchess-6.2.7/src/engine/pv.h
Examining data/gnuchess-6.2.7/src/engine/board.h
Examining data/gnuchess-6.2.7/src/engine/material.h
Examining data/gnuchess-6.2.7/src/engine/posix.h
Examining data/gnuchess-6.2.7/src/engine/vector.cpp
Examining data/gnuchess-6.2.7/src/engine/piece.cpp
Examining data/gnuchess-6.2.7/src/engine/hash.cpp
Examining data/gnuchess-6.2.7/src/engine/posix.cpp
Examining data/gnuchess-6.2.7/src/engine/eval.cpp
Examining data/gnuchess-6.2.7/src/engine/fen.h
Examining data/gnuchess-6.2.7/src/engine/recog.h
Examining data/gnuchess-6.2.7/src/engine/search_full.cpp
Examining data/gnuchess-6.2.7/src/engine/square.h
Examining data/gnuchess-6.2.7/src/engine/value.h
Examining data/gnuchess-6.2.7/src/engine/hash.h
Examining data/gnuchess-6.2.7/src/engine/move_check.cpp
Examining data/gnuchess-6.2.7/src/engine/vector.h
Examining data/gnuchess-6.2.7/src/engine/material.cpp
Examining data/gnuchess-6.2.7/src/engine/move_do.h
Examining data/gnuchess-6.2.7/src/engine/move_do.cpp
Examining data/gnuchess-6.2.7/src/engine/square.cpp
Examining data/gnuchess-6.2.7/src/engine/see.cpp
Examining data/gnuchess-6.2.7/src/engine/book.h
Examining data/gnuchess-6.2.7/src/engine/piece.h
Examining data/gnuchess-6.2.7/src/engine/trans.cpp
Examining data/gnuchess-6.2.7/src/engine/pst.h
Examining data/gnuchess-6.2.7/src/engine/move_gen.h
Examining data/gnuchess-6.2.7/src/engine/option.h
Examining data/gnuchess-6.2.7/src/engine/move.cpp
Examining data/gnuchess-6.2.7/src/engine/search.cpp
Examining data/gnuchess-6.2.7/src/engine/sort.h
Examining data/gnuchess-6.2.7/src/engine/eval.h
Examining data/gnuchess-6.2.7/src/engine/main.cpp
Examining data/gnuchess-6.2.7/src/engine/util.h
Examining data/gnuchess-6.2.7/src/engine/move_evasion.cpp
Examining data/gnuchess-6.2.7/src/engine/move_legal.cpp
Examining data/gnuchess-6.2.7/src/engine/attack.cpp
Examining data/gnuchess-6.2.7/src/engine/pawn.h
Examining data/gnuchess-6.2.7/src/engine/pawn.cpp
Examining data/gnuchess-6.2.7/src/engine/list.h
Examining data/gnuchess-6.2.7/src/engine/sort.cpp
Examining data/gnuchess-6.2.7/src/engine/book.cpp
Examining data/gnuchess-6.2.7/src/engine/move_gen.cpp
Examining data/gnuchess-6.2.7/src/engine/pst.cpp
Examining data/gnuchess-6.2.7/src/engine/random.h
Examining data/gnuchess-6.2.7/src/engine/move_legal.h
Examining data/gnuchess-6.2.7/src/engine/random.cpp
Examining data/gnuchess-6.2.7/src/engine/search_full.h
Examining data/gnuchess-6.2.7/src/engine/option.cpp
Examining data/gnuchess-6.2.7/src/engine/attack.h
Examining data/gnuchess-6.2.7/src/frontend/atak.cc
Examining data/gnuchess-6.2.7/src/frontend/epd.cc
Examining data/gnuchess-6.2.7/src/frontend/swap.cc
Examining data/gnuchess-6.2.7/src/frontend/solve.cc
Examining data/gnuchess-6.2.7/src/frontend/genmove.cc
Examining data/gnuchess-6.2.7/src/frontend/lexpgn.h
Examining data/gnuchess-6.2.7/src/frontend/common.h
Examining data/gnuchess-6.2.7/src/frontend/players.cc
Examining data/gnuchess-6.2.7/src/frontend/inlines.h
Examining data/gnuchess-6.2.7/src/frontend/init.cc
Examining data/gnuchess-6.2.7/src/frontend/input.cc
Examining data/gnuchess-6.2.7/src/frontend/move.cc
Examining data/gnuchess-6.2.7/src/frontend/util.cc
Examining data/gnuchess-6.2.7/src/frontend/cmd.cc
Examining data/gnuchess-6.2.7/src/frontend/debug.cc
Examining data/gnuchess-6.2.7/src/frontend/version.h
Examining data/gnuchess-6.2.7/src/frontend/output.cc
Examining data/gnuchess-6.2.7/src/frontend/lexpgn.cc
Examining data/gnuchess-6.2.7/src/frontend/engine.cc
Examining data/gnuchess-6.2.7/src/frontend/pgn.cc

FINAL RESULTS:

data/gnuchess-6.2.7/src/adapter/adapter.cpp:707:10:  [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( my_argv[3], token );
data/gnuchess-6.2.7/src/adapter/adapter.cpp:1501:4:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
   vsprintf(string,format,arg_list);
data/gnuchess-6.2.7/src/adapter/book.cpp:90: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(full_file_name,compute_pkgdatadir());
data/gnuchess-6.2.7/src/adapter/book.cpp:93: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(full_file_name,file_name);
data/gnuchess-6.2.7/src/adapter/engine.cpp:118:4:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
   vsprintf(string,format,arg_list);
data/gnuchess-6.2.7/src/adapter/engine.cpp:139:4:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
   vsprintf(string,format,arg_list);
data/gnuchess-6.2.7/src/adapter/epd.cpp:351:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
   sprintf(op," %s ",opcode);
data/gnuchess-6.2.7/src/adapter/epd.cpp:382: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(new_string,string); // HACK
data/gnuchess-6.2.7/src/adapter/fen.cpp:63:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
   sprintf( errorMsg, format, pos );
data/gnuchess-6.2.7/src/adapter/fen.cpp:64: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( errorMsg, fen );
data/gnuchess-6.2.7/src/adapter/fen.cpp:66: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( errorMsg, pointerStr );
data/gnuchess-6.2.7/src/adapter/io.cpp:233:4:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
   vsprintf(string,format,arg_list);
data/gnuchess-6.2.7/src/adapter/io.cpp:282:4:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
   vsprintf(string,format,arg_list);
data/gnuchess-6.2.7/src/adapter/line.cpp:105: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(new_string,string); // HACK
data/gnuchess-6.2.7/src/adapter/option.cpp:114: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(optionFile,compute_pkgdatadir());
data/gnuchess-6.2.7/src/adapter/option.cpp:117: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(optionFile,optionName);
data/gnuchess-6.2.7/src/adapter/pgn.cpp:143: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(name,pgn->token_string);
data/gnuchess-6.2.7/src/adapter/pgn.cpp:149: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(value,pgn->token_string);
data/gnuchess-6.2.7/src/adapter/pgn.cpp:173:10:  [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(pgn->result,value);
data/gnuchess-6.2.7/src/adapter/pgn.cpp:175:10:  [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(pgn->fen,value);
data/gnuchess-6.2.7/src/adapter/pgn.cpp:260:13:  [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(string,pgn->token_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:108:10:  [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(string,tmp_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:116: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(string,tmp_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:125:10:  [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(string,tmp_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:129:10:  [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(string,tmp_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:133:10:  [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(string,tmp_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:148: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(string,tmp_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:154: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(string,tmp_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:258:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(string,"K%s?%s?",king_string,rook_string);
data/gnuchess-6.2.7/src/adapter/san.cpp:270:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(string,"K%s?%s?",king_string,rook_string);
data/gnuchess-6.2.7/src/adapter/uci.cpp:286:4:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
   vsprintf(value,format,arg_list);
data/gnuchess-6.2.7/src/adapter/util.cpp:109:4:  [4] (buffer) sscanf:
  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. If the scanf format is influenceable by an
  attacker, it's exploitable.
   sscanf(string,S64_FORMAT,&n);
data/gnuchess-6.2.7/src/adapter/util.cpp:185:7:  [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(LogFile,format,ap);
data/gnuchess-6.2.7/src/adapter/util.cpp:200:4:  [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(stderr,format,ap);
data/gnuchess-6.2.7/src/adapter/util.cpp:201:25:  [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.
   if (LogFile != NULL) vfprintf(LogFile,format,ap);
data/gnuchess-6.2.7/src/adapter/util.cpp:297: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(address,string);
data/gnuchess-6.2.7/src/engine/book.cpp:91: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(full_file_name,compute_pkgdatadir());
data/gnuchess-6.2.7/src/engine/book.cpp:95: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(full_file_name,file_name);
data/gnuchess-6.2.7/src/engine/move.cpp:149: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(string,NullMoveString);
data/gnuchess-6.2.7/src/engine/protocol.cpp:630:4:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
   vsprintf(string,format,arg_list);
data/gnuchess-6.2.7/src/engine/util.cpp:81:4:  [4] (buffer) sscanf:
  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. If the scanf format is influenceable by an
  attacker, it's exploitable.
   sscanf(string,S64_FORMAT,&n);
data/gnuchess-6.2.7/src/engine/util.cpp:125:4:  [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(stderr,format,ap);
data/gnuchess-6.2.7/src/engine/util.cpp:197: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(address,string);
data/gnuchess-6.2.7/src/frontend/cmd.cc:161:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(token[2], F_OK) < 0) {
data/gnuchess-6.2.7/src/frontend/cmd.cc:165: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( data, token[2] );
data/gnuchess-6.2.7/src/frontend/cmd.cc:339:9:  [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( data, setboardCmd );
data/gnuchess-6.2.7/src/frontend/cmd.cc:406:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(logfile,F_OK) < 0) {
data/gnuchess-6.2.7/src/frontend/cmd.cc:874:6:  [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 (Game[GameCnt].SANmv, SANmv);
data/gnuchess-6.2.7/src/frontend/cmd.cc:1328:6:  [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 (Game[GameCnt].SANmv, SANmv);
data/gnuchess-6.2.7/src/frontend/debug.cc:89:4:  [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.
   vsnprintf(buf, MAX_DEBUG, fmt, ap);
data/gnuchess-6.2.7/src/frontend/engine.cc:155: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( engineinputbuf, engineinputaux );
data/gnuchess-6.2.7/src/frontend/engine.cc:189: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( userinputbuf, userinputaux );
data/gnuchess-6.2.7/src/frontend/engine.cc:199: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( dataToEngine, data );
data/gnuchess-6.2.7/src/frontend/engine.cc:215: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( data, dataToEngine );
data/gnuchess-6.2.7/src/frontend/engine.cc:256: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( inputstr, userinput );
data/gnuchess-6.2.7/src/frontend/engine.cc:302:9:  [4] (buffer) sscanf:
  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.
        sscanf( engineinput, "move %s", enginemovestr );
data/gnuchess-6.2.7/src/frontend/engine.cc:312:11:  [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 (Game[GameCnt].SANmv, SANmv);
data/gnuchess-6.2.7/src/frontend/engine.cc:383: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( bufaux, buf );
data/gnuchess-6.2.7/src/frontend/engine.cc:384: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( buf, zerochar );
data/gnuchess-6.2.7/src/frontend/engine.cc:386:9:  [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( buf, &(bufaux[i+1]) );
data/gnuchess-6.2.7/src/frontend/engine.cc:456: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( msg, position );
data/gnuchess-6.2.7/src/frontend/engine.cc:481: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( move, SANmv );
data/gnuchess-6.2.7/src/frontend/epd.cc:83: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( epd_line, line );
data/gnuchess-6.2.7/src/frontend/epd.cc:345:4:  [4] (buffer) sscanf:
  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.
   sscanf (p, "%s ", file);
data/gnuchess-6.2.7/src/frontend/epd.cc:373:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
   fprintf (fp, (board.side == white ? " w " : " b "));
data/gnuchess-6.2.7/src/frontend/input.cc:150:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(prompt,"%s (%d) : ", 
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2225: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(newloc, s);
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2230: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(newloc, dest);
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2232:2:  [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(newloc, s);
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2919: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(Game[GameCnt].SANmv, yytext);
data/gnuchess-6.2.7/src/frontend/move.cc:449: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 (s, algbr[t]);
data/gnuchess-6.2.7/src/frontend/move.cc:471: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 (s, algbr[t]);
data/gnuchess-6.2.7/src/frontend/move.cc:569:19:  [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).
   if (cleanMove) strcpy(cleanMove, mvstr);
data/gnuchess-6.2.7/src/frontend/move.cc:814: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 (s, algbr[f]);
data/gnuchess-6.2.7/src/frontend/move.cc:815: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 (s+2, algbr[t]);
data/gnuchess-6.2.7/src/frontend/output.cc:237:9:  [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(piece, b_pieces[ui_pawn]);
data/gnuchess-6.2.7/src/frontend/output.cc:239:9:  [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(piece, w_pieces[ui_pawn]);
data/gnuchess-6.2.7/src/frontend/output.cc:241:9:  [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(piece, b_pieces[ui_knight]);
data/gnuchess-6.2.7/src/frontend/output.cc:243:9:  [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(piece, w_pieces[ui_knight]);
data/gnuchess-6.2.7/src/frontend/output.cc:245:9:  [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(piece, b_pieces[ui_bishop]);
data/gnuchess-6.2.7/src/frontend/output.cc:247:9:  [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(piece, w_pieces[ui_bishop]);
data/gnuchess-6.2.7/src/frontend/output.cc:249:9:  [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(piece, b_pieces[ui_rook]);
data/gnuchess-6.2.7/src/frontend/output.cc:251:9:  [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(piece, w_pieces[ui_rook]);
data/gnuchess-6.2.7/src/frontend/output.cc:253:9:  [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(piece, b_pieces[ui_queen]);
data/gnuchess-6.2.7/src/frontend/output.cc:255:9:  [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(piece, w_pieces[ui_queen]);
data/gnuchess-6.2.7/src/frontend/output.cc:257:9:  [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(piece, b_pieces[ui_king]);
data/gnuchess-6.2.7/src/frontend/output.cc:259:9:  [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(piece, w_pieces[ui_king]);
data/gnuchess-6.2.7/src/frontend/output.cc:261:9:  [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(piece, blank_place);
data/gnuchess-6.2.7/src/frontend/pgn.cc:169:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (s, "%s%d. ", s, i/2 + 1);
data/gnuchess-6.2.7/src/frontend/pgn.cc:171:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf (s, "%s%s ", s, Game[i].SANmv);
data/gnuchess-6.2.7/src/frontend/pgn.cc:178:10:  [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, p+1);
data/gnuchess-6.2.7/src/frontend/players.cc:176: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(lname,player);
data/gnuchess-6.2.7/src/frontend/players.cc:188: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(playerdb[totalplayers].player,lname);
data/gnuchess-6.2.7/src/frontend/solve.cc:72:7:  [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 (found ? "Correct:  " : "Incorrect:  ");
data/gnuchess-6.2.7/src/main.cc:221:13:  [4] (shell) system:
  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.
    int r = system( "stty sane" );  // TODO Handle return value
data/gnuchess-6.2.7/src/main.cc:345:8:  [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( opt_addbook, optarg );
data/gnuchess-6.2.7/src/main.cc:428:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf( data, "book add %s\nquit", opt_addbook );
data/gnuchess-6.2.7/src/adapter/book.cpp:146:43:  [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.
int book_move(const board_t * board, bool random) {
data/gnuchess-6.2.7/src/adapter/book.cpp:175:14:  [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) {
data/gnuchess-6.2.7/src/adapter/book.cpp:196:43:  [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.
int book_move(const board_t * board, bool random, bool worst) {
data/gnuchess-6.2.7/src/adapter/book.cpp:235:21:  [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.
         } else if (random) {
data/gnuchess-6.2.7/src/adapter/book.h:47:58:  [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.
extern int  book_move       (const board_t * board, bool random);
data/gnuchess-6.2.7/src/adapter/book.h:48:58:  [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.
extern int  book_move       (const board_t * board, bool random, bool worst);
data/gnuchess-6.2.7/src/adapter/util.cpp:74: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/gnuchess-6.2.7/src/adapter/util.cpp:425:29:  [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 const *pkgdatadir = getenv ("GNUCHESS_PKGDATADIR");
data/gnuchess-6.2.7/src/engine/book.cpp:275:29:  [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 const *pkgdatadir = getenv ("GNUCHESS_PKGDATADIR");
data/gnuchess-6.2.7/src/engine/util.cpp:59: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/gnuchess-6.2.7/src/main.cc:279:9:  [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.
    c = getopt_long (argc, argv, "qehmpvxgM:ua:",
data/gnuchess-6.2.7/src/main.cc:354:3:  [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((unsigned int) time(NULL));
data/gnuchess-6.2.7/lib/gettext.h:217: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/gnuchess-6.2.7/lib/gettext.h:219: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[1024];
data/gnuchess-6.2.7/lib/gettext.h:227:7:  [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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/gnuchess-6.2.7/lib/gettext.h:229:7:  [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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/gnuchess-6.2.7/lib/gettext.h:263: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 msg_ctxt_id[msgctxt_len + msgid_len];
data/gnuchess-6.2.7/lib/gettext.h:265: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[1024];
data/gnuchess-6.2.7/lib/gettext.h:273:7:  [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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/gnuchess-6.2.7/lib/gettext.h:275:7:  [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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/gnuchess-6.2.7/src/adapter/adapter.cpp:262: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[StringSize];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:264: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_string[256];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:379:18:  [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).
      XB->mps  = atoi(Star[0]);
data/gnuchess-6.2.7/src/adapter/adapter.cpp:380: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).
      XB->base = double(atoi(Star[1])) * 60.0 + double(atoi(Star[2]));
data/gnuchess-6.2.7/src/adapter/adapter.cpp:380:56:  [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).
      XB->base = double(atoi(Star[1])) * 60.0 + double(atoi(Star[2]));
data/gnuchess-6.2.7/src/adapter/adapter.cpp:381: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).
      XB->inc  = double(atoi(Star[3]));
data/gnuchess-6.2.7/src/adapter/adapter.cpp:385:18:  [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).
      XB->mps  = atoi(Star[0]);
data/gnuchess-6.2.7/src/adapter/adapter.cpp:386: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).
      XB->base = double(atoi(Star[1])) * 60.0;
data/gnuchess-6.2.7/src/adapter/adapter.cpp:387: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).
      XB->inc  = double(atoi(Star[2]));
data/gnuchess-6.2.7/src/adapter/adapter.cpp:428:29:  [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).
      XB->opp_time = double(atoi(Star[0])) / 100.0;
data/gnuchess-6.2.7/src/adapter/adapter.cpp:443:21:  [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).
         XB->ping = atoi(Star[0]);
data/gnuchess-6.2.7/src/adapter/adapter.cpp:467:23:  [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).
      XB->proto_ver = atoi(Star[0]);
data/gnuchess-6.2.7/src/adapter/adapter.cpp:571:23:  [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).
      XB->depth_max = atoi(Star[0]);
data/gnuchess-6.2.7/src/adapter/adapter.cpp:591:29:  [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).
      XB->time_max = double(atoi(Star[0]));
data/gnuchess-6.2.7/src/adapter/adapter.cpp:595:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      XB->my_time = double(atoi(Star[0])) / 100.0;
data/gnuchess-6.2.7/src/adapter/adapter.cpp:694: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 *my_argv[4];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:705:10:  [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( my_argv[1], "make-book" );
data/gnuchess-6.2.7/src/adapter/adapter.cpp:706:10:  [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( my_argv[2], "-pgn" );
data/gnuchess-6.2.7/src/adapter/adapter.cpp:800: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[StringSize];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:857: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[256];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:910: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_string[256];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:1351: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 fen[256];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:1356: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[256];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:1419: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 pv_string[StringSize];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:1422: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_string[StringSize];
data/gnuchess-6.2.7/src/adapter/adapter.cpp:1493: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[StringSize];
data/gnuchess-6.2.7/src/adapter/board.cpp:483: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 fen[256];
data/gnuchess-6.2.7/src/adapter/book.cpp:83: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 full_file_name[MaxFileNameSize+1];
data/gnuchess-6.2.7/src/adapter/book.cpp:84: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 file_open_mode[MaxModeLength]="";
data/gnuchess-6.2.7/src/adapter/book.cpp:86: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).
   if ( ( bf = fopen(file_name, "r") ) != NULL ) {
data/gnuchess-6.2.7/src/adapter/book.cpp:96: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(file_open_mode,"rb+");
data/gnuchess-6.2.7/src/adapter/book.cpp:98: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(file_open_mode,"rb");
data/gnuchess-6.2.7/src/adapter/book.cpp:100: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).
   BookFile = fopen(full_file_name,file_open_mode);
data/gnuchess-6.2.7/src/adapter/book.cpp:102: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).
      if (fopen(full_file_name,"rb") != NULL) {
data/gnuchess-6.2.7/src/adapter/book.cpp:268: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_string[256];
data/gnuchess-6.2.7/src/adapter/book_make.cpp:148:19:  [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).
         MaxPly = atoi(argv[i]);
data/gnuchess-6.2.7/src/adapter/book_make.cpp:156:20:  [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).
         MinGame = atoi(argv[i]);
data/gnuchess-6.2.7/src/adapter/book_make.cpp:231: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[256];
data/gnuchess-6.2.7/src/adapter/book_make.cpp:333: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).
   file = fopen(file_name,"wb");
data/gnuchess-6.2.7/src/adapter/book_merge.cpp:212: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).
   book->file = fopen(file_name,mode);
data/gnuchess-6.2.7/src/adapter/engine.cpp:110: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[StringSize];
data/gnuchess-6.2.7/src/adapter/engine.cpp:131: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[StringSize];
data/gnuchess-6.2.7/src/adapter/epd.cpp:128:21:  [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).
         MinDepth = atoi(argv[i]);
data/gnuchess-6.2.7/src/adapter/epd.cpp:135:21:  [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).
         MaxDepth = atoi(argv[i]);
data/gnuchess-6.2.7/src/adapter/epd.cpp:156:23:  [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).
         DepthDelta = atoi(argv[i]);
data/gnuchess-6.2.7/src/adapter/epd.cpp:173: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 epd[StringSize];
data/gnuchess-6.2.7/src/adapter/epd.cpp:174: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 am[StringSize], bm[StringSize], id[StringSize];
data/gnuchess-6.2.7/src/adapter/epd.cpp:176: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[StringSize];
data/gnuchess-6.2.7/src/adapter/epd.cpp:178: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 pv_string[StringSize];
data/gnuchess-6.2.7/src/adapter/epd.cpp:186: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).
   file = fopen(file_name,"r");
data/gnuchess-6.2.7/src/adapter/epd.cpp:307: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_string[256];
data/gnuchess-6.2.7/src/adapter/epd.cpp:340: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 op[256];
data/gnuchess-6.2.7/src/adapter/epd.cpp:380: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 new_string[StringSize], *p;
data/gnuchess-6.2.7/src/adapter/epd.cpp:395: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[StringSize];
data/gnuchess-6.2.7/src/adapter/fen.cpp:57: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 errorMsg[StringSize]="";
data/gnuchess-6.2.7/src/adapter/fen.cpp:58: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 pointerStr[StringSize]="";
data/gnuchess-6.2.7/src/adapter/fen.cpp:283:20:  [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).
   board->ply_nb = atoi(&string[pos]);
data/gnuchess-6.2.7/src/adapter/fen.cpp:301:21:  [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).
   board->move_nb = atoi(&string[pos]) - 1;
data/gnuchess-6.2.7/src/adapter/fen.cpp:423: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(&string[pos],"%d %d",board->ply_nb,board->move_nb+1);
data/gnuchess-6.2.7/src/adapter/io.cpp:222: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[StringSize];
data/gnuchess-6.2.7/src/adapter/io.cpp:241: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(&io->out_buffer[io->out_size],string,len);
data/gnuchess-6.2.7/src/adapter/io.cpp:271: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[StringSize];
data/gnuchess-6.2.7/src/adapter/io.cpp:290: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(&io->out_buffer[io->out_size],string,len);
data/gnuchess-6.2.7/src/adapter/io.h:51: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 in_buffer[BufferSize];
data/gnuchess-6.2.7/src/adapter/io.h:52: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 out_buffer[BufferSize];
data/gnuchess-6.2.7/src/adapter/line.cpp:89: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 new_string[StringSize], *p;
data/gnuchess-6.2.7/src/adapter/line.cpp:176: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_string[256];
data/gnuchess-6.2.7/src/adapter/list.cpp:273: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[256];
data/gnuchess-6.2.7/src/adapter/main.cpp:165: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 line[256];
data/gnuchess-6.2.7/src/adapter/main.cpp:170: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).
   file = fopen(file_name,"r");
data/gnuchess-6.2.7/src/adapter/main.cpp:285: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[StringSize];
data/gnuchess-6.2.7/src/adapter/move.cpp:301: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 tmp_string[256];
data/gnuchess-6.2.7/src/adapter/move.cpp:392: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[256];
data/gnuchess-6.2.7/src/adapter/option.cpp:108: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 optionFile[MaxFileNameSize+1];
data/gnuchess-6.2.7/src/adapter/option.cpp:110: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).
   if ( ( of = fopen(optionName, "r") ) != NULL ) {
data/gnuchess-6.2.7/src/adapter/option.cpp:237:11:  [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).
   return atoi(val);
data/gnuchess-6.2.7/src/adapter/parse.cpp:39: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 * Star[STAR_NUMBER];
data/gnuchess-6.2.7/src/adapter/parse.cpp:208: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 word[StringSize];
data/gnuchess-6.2.7/src/adapter/parse.h:44: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.
   const char * keyword[KEYWORD_NUMBER];
data/gnuchess-6.2.7/src/adapter/parse.h:49: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.
extern char * Star[STAR_NUMBER];
data/gnuchess-6.2.7/src/adapter/pgn.cpp:82: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).
   pgn->file = fopen(file_name,"r");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:119: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 name[PGN_STRING_SIZE];
data/gnuchess-6.2.7/src/adapter/pgn.cpp:120: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 value[PGN_STRING_SIZE];
data/gnuchess-6.2.7/src/adapter/pgn.cpp:357:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(pgn->token_string,"%c",pgn->char_hack);
data/gnuchess-6.2.7/src/adapter/pgn.cpp:363:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(pgn->token_string,"%c",pgn->char_hack);
data/gnuchess-6.2.7/src/adapter/pgn.h:52: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 token_string[PGN_STRING_SIZE];
data/gnuchess-6.2.7/src/adapter/pgn.h:59: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 result[PGN_STRING_SIZE];
data/gnuchess-6.2.7/src/adapter/pgn.h:60: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 fen[PGN_STRING_SIZE];
data/gnuchess-6.2.7/src/adapter/piece.cpp:47:14:  [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 const char PieceString[12+1] = "pPnNbBrRqQkK";
data/gnuchess-6.2.7/src/adapter/san.cpp:67: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 tmp_string[256];
data/gnuchess-6.2.7/src/adapter/san.cpp:90:10:  [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(string,"O-O");
data/gnuchess-6.2.7/src/adapter/san.cpp:92:10:  [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(string,"O-O-O");
data/gnuchess-6.2.7/src/adapter/san.cpp:107:10:  [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(tmp_string,"%c",file_to_char(square_file(from)));
data/gnuchess-6.2.7/src/adapter/san.cpp:115:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(tmp_string,"%c",toupper(piece_to_char(piece)));
data/gnuchess-6.2.7/src/adapter/san.cpp:124:10:  [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(tmp_string,"%c",file_to_char(square_file(from)));
data/gnuchess-6.2.7/src/adapter/san.cpp:128:10:  [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(tmp_string,"%c",rank_to_char(square_rank(from)));
data/gnuchess-6.2.7/src/adapter/san.cpp:153:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(tmp_string,"=%c",toupper(piece_to_char(move_promote(move,board))));
data/gnuchess-6.2.7/src/adapter/san.cpp:174: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 s[256];
data/gnuchess-6.2.7/src/adapter/san.cpp:194: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_string[256];
data/gnuchess-6.2.7/src/adapter/san.cpp:218: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 king_string[3], rook_string[3];
data/gnuchess-6.2.7/src/adapter/san.cpp:228:4:  [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(string,"???????");
data/gnuchess-6.2.7/src/adapter/san.cpp:385: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 s[256];
data/gnuchess-6.2.7/src/adapter/search.cpp:85: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[256];
data/gnuchess-6.2.7/src/adapter/uci.cpp:85: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[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:189: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[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:221: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[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:275: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 value[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:310: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 command[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:311: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 argument[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:403: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 command[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:404: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 option[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:405: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 argument[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:413:4:  [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(command,"bestmove");
data/gnuchess-6.2.7/src/adapter/uci.cpp:469: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 command[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:470: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 option[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:471: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 argument[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:478:4:  [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(command,"id");
data/gnuchess-6.2.7/src/adapter/uci.cpp:514: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 command[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:515: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 option[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:516: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 argument[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:527:4:  [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(command,"info");
data/gnuchess-6.2.7/src/adapter/uci.cpp:561:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:583:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:595:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:607:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:616:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:632:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:660:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:682:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:713: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 command[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:714: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 option[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:715: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 argument[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:722:4:  [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(command,"option");
data/gnuchess-6.2.7/src/adapter/uci.cpp:804: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 command[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:805: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 option[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:806: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 argument[StringSize];
data/gnuchess-6.2.7/src/adapter/uci.cpp:814:4:  [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(command,"score");
data/gnuchess-6.2.7/src/adapter/uci.cpp:836:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/uci.cpp:848:14:  [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).
         n = atoi(argument);
data/gnuchess-6.2.7/src/adapter/util.cpp:163:14:  [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).
   LogFile = fopen(file_name,"a");
data/gnuchess-6.2.7/src/components.cc:162: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 data[9];
data/gnuchess-6.2.7/src/components.cc:163:5:  [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( data, "quit" );
data/gnuchess-6.2.7/src/engine/book.cpp:84: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 full_file_name[MaxFileNameSize+1];
data/gnuchess-6.2.7/src/engine/book.cpp:87: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).
   if ( ( bf = fopen(file_name, "r") ) != NULL ) {
data/gnuchess-6.2.7/src/engine/book.cpp:97: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).
   BookFile = fopen(full_file_name,"rb");
data/gnuchess-6.2.7/src/engine/fen.cpp:203:20:  [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).
   board->ply_nb = atoi(&fen[pos]);
data/gnuchess-6.2.7/src/engine/fen.cpp:296: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(&fen[pos],"%d 1",board->ply_nb);
data/gnuchess-6.2.7/src/engine/move.cpp:173: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 tmp_string[3];
data/gnuchess-6.2.7/src/engine/option.cpp:174:11:  [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).
   return atoi(val);
data/gnuchess-6.2.7/src/engine/pawn.cpp:296:49:  [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).
   bool backward, candidate, doubled, isolated, open, passed;
data/gnuchess-6.2.7/src/engine/pawn.cpp:474:17:  [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).
            if (open) {
data/gnuchess-6.2.7/src/engine/pawn.cpp:484:17:  [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).
            if (open) {
data/gnuchess-6.2.7/src/engine/piece.cpp:47:14:  [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 const char PieceString[12+1] = "PpNnBbRrQqKk";
data/gnuchess-6.2.7/src/engine/protocol.cpp:147: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[65536];
data/gnuchess-6.2.7/src/engine/protocol.cpp:308: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).
         binc = double(atoi(ptr)) / 1000.0;
data/gnuchess-6.2.7/src/engine/protocol.cpp:316: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).
         btime = double(atoi(ptr)) / 1000.0;
data/gnuchess-6.2.7/src/engine/protocol.cpp:324:18:  [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).
         depth = atoi(ptr);
data/gnuchess-6.2.7/src/engine/protocol.cpp:336:17:  [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).
         mate = atoi(ptr);
data/gnuchess-6.2.7/src/engine/protocol.cpp:344:22:  [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).
         movestogo = atoi(ptr);
data/gnuchess-6.2.7/src/engine/protocol.cpp:352:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
         movetime = double(atoi(ptr)) / 1000.0;
data/gnuchess-6.2.7/src/engine/protocol.cpp:376: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).
         winc = double(atoi(ptr)) / 1000.0;
data/gnuchess-6.2.7/src/engine/protocol.cpp:384: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).
         wtime = double(atoi(ptr)) / 1000.0;
data/gnuchess-6.2.7/src/engine/protocol.cpp:474: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_string[256];
data/gnuchess-6.2.7/src/engine/protocol.cpp:573: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_string[256];
data/gnuchess-6.2.7/src/engine/protocol.cpp:574: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 ponder_string[256];
data/gnuchess-6.2.7/src/engine/protocol.cpp:625: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[4096];
data/gnuchess-6.2.7/src/engine/search.cpp:307: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_string[256], pv_string[512];
data/gnuchess-6.2.7/src/engine/search.cpp:376: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_string[256];
data/gnuchess-6.2.7/src/frontend/cmd.cc:41: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 logfile[MAXSTR];
data/gnuchess-6.2.7/src/frontend/cmd.cc:42: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 gamefile[MAXSTR];
data/gnuchess-6.2.7/src/frontend/cmd.cc:56: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 *token[TOKENS];
data/gnuchess-6.2.7/src/frontend/cmd.cc:108: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).
  epdfile = fopen( tmp_epd, "r" );
data/gnuchess-6.2.7/src/frontend/cmd.cc:158: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[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:159:3:  [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( data, "book " );
data/gnuchess-6.2.7/src/frontend/cmd.cc:164:7:  [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( data, "add " );
data/gnuchess-6.2.7/src/frontend/cmd.cc:168:5:  [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( data, "book on" );
data/gnuchess-6.2.7/src/frontend/cmd.cc:171:5:  [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( data, "book off" );
data/gnuchess-6.2.7/src/frontend/cmd.cc:174:5:  [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( data, "book best" );
data/gnuchess-6.2.7/src/frontend/cmd.cc:177:5:  [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( data, "book worst" );
data/gnuchess-6.2.7/src/frontend/cmd.cc:180:5:  [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( data, "book random" );
data/gnuchess-6.2.7/src/frontend/cmd.cc:191: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[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:193:17:  [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).
  searchDepth = atoi( token[1] );
data/gnuchess-6.2.7/src/frontend/cmd.cc:194: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( data, "sd %d", searchDepth );
data/gnuchess-6.2.7/src/frontend/cmd.cc:320: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[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:329:21:  [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 *epdfile = fopen( token[1], "r" );
data/gnuchess-6.2.7/src/frontend/cmd.cc:330: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 epdline[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:373: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 data[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:374:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf( data, "memory %d\nmemory", memory );
data/gnuchess-6.2.7/src/frontend/cmd.cc:400: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(logfile,"log.%03d",suffix);
data/gnuchess-6.2.7/src/frontend/cmd.cc:401: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(gamefile,"game.%03d",suffix);
data/gnuchess-6.2.7/src/frontend/cmd.cc:407: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).
      ofp = fopen(logfile,"w");
data/gnuchess-6.2.7/src/frontend/cmd.cc:471: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[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:472: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 epdline[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:480:3:  [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( data, "setboard " );
data/gnuchess-6.2.7/src/frontend/cmd.cc:495: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[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc: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 epdline[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:504:3:  [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( data, "setboard " );
data/gnuchess-6.2.7/src/frontend/cmd.cc:692:14:  [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).
  myrating = atoi(token[1]);
data/gnuchess-6.2.7/src/frontend/cmd.cc:693:15:  [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).
  opprating = atoi(token[2]);
data/gnuchess-6.2.7/src/frontend/cmd.cc:746: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[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:762: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[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/cmd.cc:767: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( data, "st %d", atoi( token[1] ) );
data/gnuchess-6.2.7/src/frontend/cmd.cc:767:27:  [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).
  sprintf( data, "st %d", atoi( token[1] ) );
data/gnuchess-6.2.7/src/frontend/cmd.cc:780:29:  [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).
  TimeLimit[1^board.side] = atoi(token[1]) / 100.0f ;
data/gnuchess-6.2.7/src/frontend/cmd.cc:1315: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 cleanMove[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/common.h:127: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 SANmv[SANSZ];  /* The move in SAN notation */
data/gnuchess-6.2.7/src/frontend/common.h:288:17:  [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.
extern unsigned char lzArray[65536];
data/gnuchess-6.2.7/src/frontend/common.h:306:17:  [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.
extern unsigned char BitCount[65536];
data/gnuchess-6.2.7/src/frontend/common.h:332: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.
extern char SANmv[SANSZ];
data/gnuchess-6.2.7/src/frontend/common.h:333: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.
extern char id[32];
data/gnuchess-6.2.7/src/frontend/common.h:334: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.
extern char solution[64];
data/gnuchess-6.2.7/src/frontend/common.h:351: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.
extern char algbr[64][3];
data/gnuchess-6.2.7/src/frontend/common.h:352: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.
extern char algbrfile[9];
data/gnuchess-6.2.7/src/frontend/common.h:353: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.
extern char algbrrank[9];
data/gnuchess-6.2.7/src/frontend/common.h:354: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.
extern char notation[8];
data/gnuchess-6.2.7/src/frontend/common.h:355: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.
extern char lnotation[8];
data/gnuchess-6.2.7/src/frontend/common.h:367: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.
extern char name[MAXNAMESZ];
data/gnuchess-6.2.7/src/frontend/common.h:522: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.
extern char inputstr[BUF_SIZE];
data/gnuchess-6.2.7/src/frontend/debug.cc:52:18:  [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).
      debug_fd = open(DEBUG_FILENAME, flags, mode);
data/gnuchess-6.2.7/src/frontend/debug.cc:54:18:  [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).
      debug_fd = open(name, flags, mode);
data/gnuchess-6.2.7/src/frontend/debug.cc:77: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 buf[MAX_DEBUG];
data/gnuchess-6.2.7/src/frontend/debug.cc:82: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(buf, "%010ld.%06d: ", tv.tv_sec, tv.tv_usec);
data/gnuchess-6.2.7/src/frontend/debug.cc:84: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(buf, "%010ld.%06ld: ", tv.tv_sec, tv.tv_usec);
data/gnuchess-6.2.7/src/frontend/engine.cc: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 inputstr[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:47: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 dataToEngine[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:53: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 zerochar[BUF_SIZE];
data/gnuchess-6.2.7/src/frontend/engine.cc:56: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 userinputbuf[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:59: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 engineinputbuf[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:139: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 engineinputaux[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:174: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 userinputaux[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:248: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 userinput[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:264:13:  [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( userinputbuf, "go\n" );
data/gnuchess-6.2.7/src/frontend/engine.cc:293: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 engineinput[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:294: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 enginemovestr[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:374: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 bufaux[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:447: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 msg[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:448: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 engineinput[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:455:3:  [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( msg, "setboard " );
data/gnuchess-6.2.7/src/frontend/engine.cc:461: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( msg, "st %d\ngo", (int)round( SearchTime ) );
data/gnuchess-6.2.7/src/frontend/engine.cc:495: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 userinputaux[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/engine.cc:542: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 engineinputaux[BUF_SIZE]="";
data/gnuchess-6.2.7/src/frontend/epd.cc:36: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 epd_line[MAXSTR]="";
data/gnuchess-6.2.7/src/frontend/epd.cc: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 line[MAXSTR];
data/gnuchess-6.2.7/src/frontend/epd.cc:58: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).
      fp = fopen (file, "r");
data/gnuchess-6.2.7/src/frontend/epd.cc:307: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 file[MAXSTR];
data/gnuchess-6.2.7/src/frontend/epd.cc:340: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 file[MAXSTR];
data/gnuchess-6.2.7/src/frontend/epd.cc:346: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).
   fp = fopen (file, "a");
data/gnuchess-6.2.7/src/frontend/input.cc:63: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 userinputstr[MAXSTR];
data/gnuchess-6.2.7/src/frontend/input.cc:140: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 prompt[MAXSTR] = "";
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2448: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 tagname[80]; /* Name of tag currently being processed */
data/gnuchess-6.2.7/src/frontend/move.cc:402:10:  [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 (s, "O-O");
data/gnuchess-6.2.7/src/frontend/move.cc:404:3:  [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 (s, "O-O-O");
data/gnuchess-6.2.7/src/frontend/move.cc:541: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 mvstr[MAXSTR], *p;
data/gnuchess-6.2.7/src/frontend/move.cc:575:22:  [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.
      if (cleanMove) strcpy(cleanMove, "O-O");
data/gnuchess-6.2.7/src/frontend/move.cc:590:22:  [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.
      if (cleanMove) strcpy(cleanMove, "O-O-O");
data/gnuchess-6.2.7/src/frontend/move.cc:810: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.
   static char s[6];
data/gnuchess-6.2.7/src/frontend/output.cc:35: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.
const char w_pieces[6][PIECE_SIZE] = {"\u2654 ", "\u2655 ", "\u2656 ", "\u2657 ", "\u2658 ", "\u2659 "};
data/gnuchess-6.2.7/src/frontend/output.cc:36: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.
const char b_pieces[6][PIECE_SIZE] = {"\u265A ", "\u265B ", "\u265C ", "\u265D ", "\u265E ", "\u265F "};
data/gnuchess-6.2.7/src/frontend/output.cc:134: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 arr_board[MAX_BOARD_RANGE];
data/gnuchess-6.2.7/src/frontend/output.cc:186:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char column[8] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
data/gnuchess-6.2.7/src/frontend/output.cc:188: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 tmp_piece[PIECE_SIZE];
data/gnuchess-6.2.7/src/frontend/output.cc:268:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char column[8] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'};
data/gnuchess-6.2.7/src/frontend/pgn.cc:58: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 s[100];
data/gnuchess-6.2.7/src/frontend/pgn.cc:70: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).
   fp = fopen(file, "r");
data/gnuchess-6.2.7/src/frontend/pgn.cc:99: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).
   fp = fopen (file, "w");
data/gnuchess-6.2.7/src/frontend/pgn.cc:206: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).
   fp = fopen (file, "r");
data/gnuchess-6.2.7/src/frontend/players.cc:41: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 player[MAXNAMESZ];
data/gnuchess-6.2.7/src/frontend/players.cc:48: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 lname[MAXNAMESZ];
data/gnuchess-6.2.7/src/frontend/players.cc:119:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if ((wfp = fopen(PLAYERFILE,"w")) != NULL) {
data/gnuchess-6.2.7/src/frontend/players.cc:140:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if ((rfp = fopen(PLAYERFILE,"r")) != NULL) {
data/gnuchess-6.2.7/src/frontend/solve.cc:47: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 myMove[100]="";
data/gnuchess-6.2.7/src/main.cc:43: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 lzArray[65536];
data/gnuchess-6.2.7/src/main.cc:57: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 BitCount[65536];
data/gnuchess-6.2.7/src/main.cc:81: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 SANmv[SANSZ];
data/gnuchess-6.2.7/src/main.cc:82: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 id[32];
data/gnuchess-6.2.7/src/main.cc:83: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 solution[64];
data/gnuchess-6.2.7/src/main.cc:100: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 name[50];
data/gnuchess-6.2.7/src/main.cc:109: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 algbr[64][3] =
data/gnuchess-6.2.7/src/main.cc:119: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 algbrfile[9] = "abcdefgh";
data/gnuchess-6.2.7/src/main.cc:120: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 algbrrank[9] = "12345678";
data/gnuchess-6.2.7/src/main.cc:122: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 notation[8] = { " PNBRQK" };
data/gnuchess-6.2.7/src/main.cc:123: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 lnotation[8] = { " pnbrqk" };
data/gnuchess-6.2.7/src/main.cc:247: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 opt_addbook[MAXSTR+1] = "";
data/gnuchess-6.2.7/src/main.cc:427: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 data[9+MAXSTR+1+4]="";
data/gnuchess-6.2.7/src/main.cc:436: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 data[9];
data/gnuchess-6.2.7/src/main.cc:437:5:  [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( data, "easy" );
data/gnuchess-6.2.7/src/main.cc:442: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 data[20];
data/gnuchess-6.2.7/src/main.cc:443: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( data, "memory %d", opt_memory );
data/gnuchess-6.2.7/src/main.cc:449: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 data[9];
data/gnuchess-6.2.7/src/main.cc:450:5:  [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( data, "post" );
data/gnuchess-6.2.7/src/main.cc:456: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 data[9];
data/gnuchess-6.2.7/src/main.cc:457:5:  [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( data, "force" );
data/gnuchess-6.2.7/lib/gettext.h:213: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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/gnuchess-6.2.7/lib/gettext.h:214: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).
  size_t msgid_len = strlen (msgid) + 1;
data/gnuchess-6.2.7/lib/gettext.h:259: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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/gnuchess-6.2.7/lib/gettext.h:260: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).
  size_t msgid_len = strlen (msgid) + 1;
data/gnuchess-6.2.7/src/adapter/adapter.cpp:703:39:  [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).
         my_argv[3] = (char *)malloc( strlen(token) + 1 );
data/gnuchess-6.2.7/src/adapter/adapter.cpp:704:10:  [1] (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 character.
         strcpy( my_argv[0], "g" );
data/gnuchess-6.2.7/src/adapter/book.cpp:88:7:  [1] (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 character.
      strcpy(full_file_name,"");
data/gnuchess-6.2.7/src/adapter/book.cpp:91:7:  [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(full_file_name,"/");
data/gnuchess-6.2.7/src/adapter/book.cpp:430:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      b = fgetc(file);
data/gnuchess-6.2.7/src/adapter/book_merge.cpp:286:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      b = fgetc(file);
data/gnuchess-6.2.7/src/adapter/epd.cpp:202:48:  [1] (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 character.
      if (!epd_get_op(epd,"am",am,StringSize)) strcpy(am,"");
data/gnuchess-6.2.7/src/adapter/epd.cpp:203:48:  [1] (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 character.
      if (!epd_get_op(epd,"bm",bm,StringSize)) strcpy(bm,"");
data/gnuchess-6.2.7/src/adapter/epd.cpp:204:48:  [1] (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 character.
      if (!epd_get_op(epd,"id",id,StringSize)) strcpy(id,"");
data/gnuchess-6.2.7/src/adapter/epd.cpp:358: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).
   p_start += strlen(op);
data/gnuchess-6.2.7/src/adapter/epd.cpp:370:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
   strncpy(string,p_start,len);
data/gnuchess-6.2.7/src/adapter/fen.cpp:60:7:  [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( pointerStr, " " );
data/gnuchess-6.2.7/src/adapter/fen.cpp:62: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( pointerStr, "*" );
data/gnuchess-6.2.7/src/adapter/fen.cpp:65: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( errorMsg, "\n" );
data/gnuchess-6.2.7/src/adapter/fen.cpp:67: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( errorMsg, "\n" );
data/gnuchess-6.2.7/src/adapter/io.cpp:238:10:  [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(string);
data/gnuchess-6.2.7/src/adapter/io.cpp:287:10:  [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(string);
data/gnuchess-6.2.7/src/adapter/io.cpp:307:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      n = read(fd,string,size);
data/gnuchess-6.2.7/src/adapter/line.cpp:158: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).
      pos += strlen(&string[pos]);
data/gnuchess-6.2.7/src/adapter/line.cpp:215: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).
      pos += strlen(&string[pos]);
data/gnuchess-6.2.7/src/adapter/main.cpp:264:17:  [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).
   ptr = &value[strlen(value)]; // pointer to string terminator
data/gnuchess-6.2.7/src/adapter/move.cpp:281: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).
   ASSERT(strlen(string)==4);
data/gnuchess-6.2.7/src/adapter/option.cpp:112:7:  [1] (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 character.
      strcpy(optionFile,"");
data/gnuchess-6.2.7/src/adapter/option.cpp:115:7:  [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(optionFile,"/");
data/gnuchess-6.2.7/src/adapter/parse.cpp:108:39:  [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 (parse->pos < 0 || parse->pos > strlen(parse->string)) return false;
data/gnuchess-6.2.7/src/adapter/pgn.cpp:92:4:  [1] (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 character.
   strcpy(pgn->token_string,"?"); // DEBUG
data/gnuchess-6.2.7/src/adapter/pgn.cpp:99:4:  [1] (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 character.
   strcpy(pgn->result,"?"); // DEBUG
data/gnuchess-6.2.7/src/adapter/pgn.cpp:100:4:  [1] (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 character.
   strcpy(pgn->fen,"?"); // DEBUG
data/gnuchess-6.2.7/src/adapter/pgn.cpp:126:4:  [1] (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 character.
   strcpy(pgn->result,"*");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:127:4:  [1] (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 character.
   strcpy(pgn->fen,"");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:339:4:  [1] (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 character.
   strcpy(pgn->token_string,"");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:375:10:  [1] (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 character.
         strcpy(pgn->token_string,"3");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:381:10:  [1] (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 character.
         strcpy(pgn->token_string,"5");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:389:10:  [1] (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 character.
         strcpy(pgn->token_string,"1");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:402:10:  [1] (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 character.
         strcpy(pgn->token_string,"4");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:408:10:  [1] (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 character.
         strcpy(pgn->token_string,"6");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:416:10:  [1] (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 character.
         strcpy(pgn->token_string,"2");
data/gnuchess-6.2.7/src/adapter/pgn.cpp:653:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
   pgn->char_hack = fgetc(pgn->file);
data/gnuchess-6.2.7/src/adapter/san.cpp:143:37:  [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.
   if (move_is_capture(move,board)) strcat(string,"x");
data/gnuchess-6.2.7/src/adapter/san.cpp:162:7:  [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(string,"#");
data/gnuchess-6.2.7/src/adapter/san.cpp:164:7:  [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(string,"+");
data/gnuchess-6.2.7/src/adapter/san.cpp:230:10:  [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(san);
data/gnuchess-6.2.7/src/adapter/san.cpp:400:10:  [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(string);
data/gnuchess-6.2.7/src/adapter/util.cpp:296:33:  [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).
   address = (char *) my_malloc(strlen(string)+1);
data/gnuchess-6.2.7/src/engine/book.cpp:89:7:  [1] (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 character.
      strcpy(full_file_name,"");
data/gnuchess-6.2.7/src/engine/book.cpp:92:7:  [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(full_file_name,"/");
data/gnuchess-6.2.7/src/engine/book.cpp:254:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      b = fgetc(file);
data/gnuchess-6.2.7/src/engine/move.cpp:157: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).
   ASSERT(strlen(string)==4);
data/gnuchess-6.2.7/src/engine/pv.cpp:107: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).
      pos += strlen(&string[pos]);
data/gnuchess-6.2.7/src/engine/util.cpp:196:33:  [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).
   address = (char *) my_malloc(strlen(string)+1);
data/gnuchess-6.2.7/src/frontend/cmd.cc:338: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).
        unsigned int setboardLen = strlen(setboardCmd);
data/gnuchess-6.2.7/src/frontend/cmd.cc:398:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(name, token[1], sizeof name - 1);
data/gnuchess-6.2.7/src/frontend/cmd.cc:625: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(token[1]) > 0 )
data/gnuchess-6.2.7/src/frontend/cmd.cc:737: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(token[1]) > 0 )
data/gnuchess-6.2.7/src/frontend/cmd.cc:1174: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(token[1])>0) {
data/gnuchess-6.2.7/src/frontend/cmd.cc:1176:35:  [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 (strncmp(*p, token[1], strlen(token[1])) == 0) {
data/gnuchess-6.2.7/src/frontend/debug.cc:86:25:  [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(debug_fd, buf, strlen(buf));
data/gnuchess-6.2.7/src/frontend/debug.cc:92:32:  [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 write(debug_fd, buf, strlen(buf));
data/gnuchess-6.2.7/src/frontend/engine.cc:102: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).
    int msg_size = strlen( msg );
data/gnuchess-6.2.7/src/frontend/engine.cc:152:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( engineinputaux, zerochar, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/engine.cc:153:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read( pipefd_a2f[0], engineinputaux, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/engine.cc:156: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).
    engineinputbuf[strlen( engineinputbuf ) + nread] = '\0';
data/gnuchess-6.2.7/src/frontend/engine.cc:187:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( userinputaux, zerochar, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/engine.cc:188:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read( pipefd_i2f[0], userinputaux, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/engine.cc:190: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).
    userinputbuf[strlen( userinputbuf ) + nread] = '\0';
data/gnuchess-6.2.7/src/frontend/engine.cc:212:5:  [1] (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 character.
    strcpy( data, "" );
data/gnuchess-6.2.7/src/frontend/engine.cc:250: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( userinputbuf ) > 0 ) {
data/gnuchess-6.2.7/src/frontend/engine.cc:255:7:  [1] (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 character.
      strcpy( inputstr, "" );
data/gnuchess-6.2.7/src/frontend/engine.cc:297: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( engineinputbuf ) > 0 ) {
data/gnuchess-6.2.7/src/frontend/engine.cc:378:16:  [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( buf ); ++i ) {
data/gnuchess-6.2.7/src/frontend/engine.cc:385: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).
      if ( strlen( &(bufaux[i+1]) ) > 0 ) {
data/gnuchess-6.2.7/src/frontend/engine.cc:406:16:  [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( buf ); ++i ) {
data/gnuchess-6.2.7/src/frontend/engine.cc:457: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).
  msg[strlen(msg)-1] = '\0';
data/gnuchess-6.2.7/src/frontend/engine.cc:466:10:  [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( engineinputbuf ) > 0 ) {
data/gnuchess-6.2.7/src/frontend/engine.cc:468: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).
      assert( strlen( engineinput ) > 0 );
data/gnuchess-6.2.7/src/frontend/engine.cc:508:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( userinputaux, zerochar, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/engine.cc:509:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read( STDIN_FILENO, userinputaux, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/engine.cc:555:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( engineinputaux, zerochar, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/engine.cc:556:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nread = read( pipefd_e2a[0], engineinputaux, BUF_SIZE );
data/gnuchess-6.2.7/src/frontend/epd.cc:88: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).
      for (i = 0; i < strlen( line ); ++i) {
data/gnuchess-6.2.7/src/frontend/epd.cc:310:4:  [1] (buffer) sscanf:
  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.
   sscanf (p, "%127s %d ", file, &N);
data/gnuchess-6.2.7/src/frontend/input.cc:81:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(userinputstr, inp, MAXSTR-1);
data/gnuchess-6.2.7/src/frontend/input.cc:111: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).
    int msg_size = strlen( msg );
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2224: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).
		newloc = (char *) malloc(strlen(s)+1);
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2228: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).
	newlen = strlen(dest) + strlen(s) + 1;
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2228: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).
	newlen = strlen(dest) + strlen(s) + 1;
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2367:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:2628:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(tagname, yytext, sizeof(tagname)-1);
data/gnuchess-6.2.7/src/frontend/lexpgn.cc:3725: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).
	return yy_scan_bytes(yystr,strlen(yystr) );
data/gnuchess-6.2.7/src/frontend/move.cc:546: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).
   if ( strlen(s) >= MAXSTR ) {
data/gnuchess-6.2.7/src/frontend/move.cc:567: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).
   if (mvstr[strlen(mvstr)-1] == '+' || mvstr[strlen(mvstr)-1] == '#' ||
data/gnuchess-6.2.7/src/frontend/move.cc:567:47:  [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 (mvstr[strlen(mvstr)-1] == '+' || mvstr[strlen(mvstr)-1] == '#' ||
data/gnuchess-6.2.7/src/frontend/move.cc:568: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).
       mvstr[strlen(mvstr)-1] == '=') mvstr[strlen(mvstr)-1] = '\000';
data/gnuchess-6.2.7/src/frontend/move.cc:568:45:  [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).
       mvstr[strlen(mvstr)-1] == '=') mvstr[strlen(mvstr)-1] = '\000';
data/gnuchess-6.2.7/src/frontend/move.cc:608:16:  [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).
      piece = (strlen (mvstr) == 5 ? mvstr[4] : ' ');
data/gnuchess-6.2.7/src/frontend/move.cc:645: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).
         piece = (strlen (mvstr) == 4 ? mvstr[3] : ' ');
data/gnuchess-6.2.7/src/frontend/move.cc:666: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).
         	      piece = (strlen (mvstr) == 3 ? mvstr[2] : ' ');
data/gnuchess-6.2.7/src/frontend/pgn.cc:77:17:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       answer = getchar();
data/gnuchess-6.2.7/src/frontend/pgn.cc:84:15:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       while( getchar() != '\n' );
data/gnuchess-6.2.7/src/frontend/pgn.cc:161: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).
         initial_comments[strlen(initial_comments)-1] != '\n')
data/gnuchess-6.2.7/src/frontend/pgn.cc:172: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).
      if (strlen (s) > 80)
data/gnuchess-6.2.7/src/frontend/pgn.cc:184: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).
             Game[i].comments[strlen(Game[i].comments)-1] != '\n')
data/gnuchess-6.2.7/src/frontend/players.cc:108:72:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if ((i+1) % 10 == 0) {printf("[Type a character to continue.]\n"); getchar();}
data/gnuchess-6.2.7/src/frontend/players.cc:142:10:  [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.
     n = fscanf(rfp,"%49s %d %d %d\n",  /* 49 MAXNAMESZ-1 */
data/gnuchess-6.2.7/src/frontend/players.cc:159:43:  [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 (strncmp(playerdb[i].player,player,strlen(playerdb[i].player)) == 0)
data/gnuchess-6.2.7/src/frontend/solve.cc:62:58:  [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 ( (*myMove != '\0') && (!strncmp (p, myMove, strlen(myMove))) )
data/gnuchess-6.2.7/src/main.cc:341: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).
       if ( strlen( optarg ) > MAXSTR ) {
data/gnuchess-6.2.7/src/main.cc:426: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( opt_addbook ) > 0 ) {
data/gnuchess-6.2.7/src/main.cc:519:5:  [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(100);

ANALYSIS SUMMARY:

Hits = 522
Lines analyzed = 43179 in approximately 1.07 seconds (40175 lines/second)
Physical Source Lines of Code (SLOC) = 24939
Hits@level = [0] 265 [1] 113 [2] 300 [3]  12 [4]  97 [5]   0
Hits@level+ = [0+] 787 [1+] 522 [2+] 409 [3+] 109 [4+]  97 [5+]   0
Hits/KSLOC@level+ = [0+] 31.557 [1+] 20.9311 [2+] 16.4 [3+] 4.37066 [4+] 3.88949 [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.