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/scid-4.7.0+dfsg1/gtest/test_codec.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_containers.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_decodemove.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_game.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp
Parsing failed to find end of parameter list; semicolon terminated it in (map.begin(), map.end(), filter->begin(),
		                  filter->end(), [&](auto& a, auto& b) {
			                  auto value = filter->get(b) - 1;
			                  return a.first == b && a
Examining data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_indexentry_v4_6.h
Examining data/scid-4.7.0+dfsg1/gtest/test_namebase.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_position.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_scidbase.cpp
Examining data/scid-4.7.0+dfsg1/gtest/test_sortcache.cpp
Parsing failed to find end of parameter list; semicolon terminated it in (buf.begin(), buf.begin() + count, vIndex.begin() + start,
		               [](auto& id, auto& rec) { return id == rec[0]; }))
		    << "Criteria: " << crit;
	};

	auto test_sortedPosition = [&](auto 
Examining data/scid-4.7.0+dfsg1/gtest/test_str.cpp
Examining data/scid-4.7.0+dfsg1/src/attacks.h
Examining data/scid-4.7.0+dfsg1/src/bytebuf.cpp
Examining data/scid-4.7.0+dfsg1/src/bytebuf.h
Examining data/scid-4.7.0+dfsg1/src/codec.h
Examining data/scid-4.7.0+dfsg1/src/codec_memory.h
Examining data/scid-4.7.0+dfsg1/src/codec_native.h
Examining data/scid-4.7.0+dfsg1/src/codec_pgn.h
Examining data/scid-4.7.0+dfsg1/src/codec_proxy.h
Examining data/scid-4.7.0+dfsg1/src/codec_scid4.cpp
Examining data/scid-4.7.0+dfsg1/src/codec_scid4.h
Examining data/scid-4.7.0+dfsg1/src/common.h
Examining data/scid-4.7.0+dfsg1/src/containers.h
Examining data/scid-4.7.0+dfsg1/src/crosstab.cpp
Examining data/scid-4.7.0+dfsg1/src/crosstab.h
Examining data/scid-4.7.0+dfsg1/src/date.h
Examining data/scid-4.7.0+dfsg1/src/dbasepool.cpp
Examining data/scid-4.7.0+dfsg1/src/dbasepool.h
Examining data/scid-4.7.0+dfsg1/src/dstring.h
Examining data/scid-4.7.0+dfsg1/src/error.h
Examining data/scid-4.7.0+dfsg1/src/fastgame.h
Examining data/scid-4.7.0+dfsg1/src/filebuf.h
Examining data/scid-4.7.0+dfsg1/src/filter.cpp
Examining data/scid-4.7.0+dfsg1/src/filter.h
Examining data/scid-4.7.0+dfsg1/src/fullmove.h
Examining data/scid-4.7.0+dfsg1/src/game.cpp
Examining data/scid-4.7.0+dfsg1/src/game.h
Examining data/scid-4.7.0+dfsg1/src/hash.h
Examining data/scid-4.7.0+dfsg1/src/hfilter.h
Examining data/scid-4.7.0+dfsg1/src/index.cpp
Examining data/scid-4.7.0+dfsg1/src/index.h
Examining data/scid-4.7.0+dfsg1/src/indexentry.h
Examining data/scid-4.7.0+dfsg1/src/matsig.cpp
Examining data/scid-4.7.0+dfsg1/src/matsig.h
Examining data/scid-4.7.0+dfsg1/src/misc.cpp
Examining data/scid-4.7.0+dfsg1/src/misc.h
Examining data/scid-4.7.0+dfsg1/src/movegen.h
Examining data/scid-4.7.0+dfsg1/src/movelist.h
Examining data/scid-4.7.0+dfsg1/src/movetree.h
Examining data/scid-4.7.0+dfsg1/src/mtbdata.h
Examining data/scid-4.7.0+dfsg1/src/naglatex.h
Examining data/scid-4.7.0+dfsg1/src/nagtext.h
Examining data/scid-4.7.0+dfsg1/src/namebase.h
Examining data/scid-4.7.0+dfsg1/src/optable.cpp
Examining data/scid-4.7.0+dfsg1/src/optable.h
Examining data/scid-4.7.0+dfsg1/src/pbook.cpp
Examining data/scid-4.7.0+dfsg1/src/pbook.h
Examining data/scid-4.7.0+dfsg1/src/pgn_lexer.h
Examining data/scid-4.7.0+dfsg1/src/pgnparse.h
Examining data/scid-4.7.0+dfsg1/src/polyglot.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/attack.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/attack.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/board.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/board.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/book.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/book.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/colour.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/colour.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/fen.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/fen.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/hash.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/hash.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/list.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/list.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/main.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/main.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/move.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/move.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/move_do.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/move_do.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/move_gen.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/move_gen.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/move_legal.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/move_legal.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/option.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/option.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/piece.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/piece.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/random.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/random.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/san.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/san.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/square.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/square.h
Examining data/scid-4.7.0+dfsg1/src/polyglot/util.cpp
Examining data/scid-4.7.0+dfsg1/src/polyglot/util.h
Examining data/scid-4.7.0+dfsg1/src/position.cpp
Examining data/scid-4.7.0+dfsg1/src/position.h
Examining data/scid-4.7.0+dfsg1/src/probe.cpp
Examining data/scid-4.7.0+dfsg1/src/probe.h
Examining data/scid-4.7.0+dfsg1/src/recog.cpp
Examining data/scid-4.7.0+dfsg1/src/recog.h
Examining data/scid-4.7.0+dfsg1/src/sc_base.cpp
Examining data/scid-4.7.0+dfsg1/src/sc_filter.cpp
Examining data/scid-4.7.0+dfsg1/src/sc_info.cpp
Examining data/scid-4.7.0+dfsg1/src/scidbase.cpp
Examining data/scid-4.7.0+dfsg1/src/scidbase.h
Examining data/scid-4.7.0+dfsg1/src/searchindex.cpp
Examining data/scid-4.7.0+dfsg1/src/searchpos.h
Examining data/scid-4.7.0+dfsg1/src/searchtournaments.h
Examining data/scid-4.7.0+dfsg1/src/sortcache.cpp
Examining data/scid-4.7.0+dfsg1/src/sortcache.h
Examining data/scid-4.7.0+dfsg1/src/spellchk.cpp
Examining data/scid-4.7.0+dfsg1/src/spellchk.h
Examining data/scid-4.7.0+dfsg1/src/sqmove.h
Examining data/scid-4.7.0+dfsg1/src/stored.cpp
Examining data/scid-4.7.0+dfsg1/src/stored.h
Examining data/scid-4.7.0+dfsg1/src/textbuf.cpp
Examining data/scid-4.7.0+dfsg1/src/textbuf.h
Examining data/scid-4.7.0+dfsg1/src/timer.h
Examining data/scid-4.7.0+dfsg1/src/tkscid.cpp
Examining data/scid-4.7.0+dfsg1/src/tkscid.h
Examining data/scid-4.7.0+dfsg1/src/tree.h
Examining data/scid-4.7.0+dfsg1/src/ui.h
Examining data/scid-4.7.0+dfsg1/src/ui_tcltk.h
Examining data/scid-4.7.0+dfsg1/src/engine.cpp
Examining data/scid-4.7.0+dfsg1/src/engine.h

FINAL RESULTS:

data/scid-4.7.0+dfsg1/gtest/test_str.cpp:80: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(e.input1, e.static_input);
data/scid-4.7.0+dfsg1/gtest/test_str.cpp:84: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(e.input2, e.static_input);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:598:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (stemp, "%u game%s: %s%u %s%u %s%u",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:608:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (stemp, " %s%u", 
data/scid-4.7.0+dfsg1/src/crosstab.cpp:640:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (stemp, "<pi %s>", pdata->name);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:643:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (stemp, "%-*s ", LongestNameLen, pdata->name);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:666:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf (stemp, "%3s ", pdata->title);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:686:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf (stemp, "%-3s ", pdata->country);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:993:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (stemp, " %s%*d ", SwissColors ? " " : "",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1070:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf (stemp, "%*d%c%s", PlayerNumWidth,
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1075:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf (stemp, "%*d%s", PlayerNumWidth,
data/scid-4.7.0+dfsg1/src/engine.cpp:2265:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf (format, ap);
data/scid-4.7.0+dfsg1/src/engine.cpp:2267:9:  [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/scid-4.7.0+dfsg1/src/game.cpp:115: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 (str, evalNagsLatex[nag]);
data/scid-4.7.0+dfsg1/src/game.cpp:117: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 (str, evalNagsRegular[nag]);
data/scid-4.7.0+dfsg1/src/game.cpp:121:15:  [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 (str, evalNagsLatex[nag]);
data/scid-4.7.0+dfsg1/src/game.cpp:130:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (str, "%s$%d", format == PGN_FORMAT_LaTeX ? "\\" : "", nag);
data/scid-4.7.0+dfsg1/src/game.cpp:1653:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (temp, "%d%s", CurrentPos->GetFullMoveCount(),
data/scid-4.7.0+dfsg1/src/game.cpp:1693: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(str, GetNextSAN());
data/scid-4.7.0+dfsg1/src/game.cpp:1714: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 (str, m->san);
data/scid-4.7.0+dfsg1/src/game.cpp:2016: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(tempTrans, m->san);
data/scid-4.7.0+dfsg1/src/game.cpp:2430:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(temp, " (%s)", annotator);
data/scid-4.7.0+dfsg1/src/game.cpp:2452:22:  [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).
                std::strcat(temp, newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2463:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "[Event \"%s\"]%s", GetEventStr(), newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2465:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "[Site \"%s\"]%s", GetSiteStr(), newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2467:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "[Date \"%s\"]%s", dateStr, newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2469:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "[Round \"%s\"]%s", GetRoundStr(), newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2471:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "[White \"%s\"]%s", GetWhiteStr(), newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2473:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "[Black \"%s\"]%s", GetBlackStr(), newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2475:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "[Result \"%s\"]%s", RESULT_LONGSTR[Result], newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2481:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (temp, "[White%s \"%u\"]%s",
data/scid-4.7.0+dfsg1/src/game.cpp:2486:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (temp, "[Black%s \"%u\"]%s",
data/scid-4.7.0+dfsg1/src/game.cpp:2493:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (temp, "[ECO \"%s\"]%s", ecoStr, newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2499:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (temp, "[EventDate \"%s\"]%s", edateStr, newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2504:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (temp, "[ScidFlags \"%s\"]%s", ScidFlags, newline);
data/scid-4.7.0+dfsg1/src/game.cpp:2510:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(temp, "[%s \"%s\"]%s", e.first.c_str(),
data/scid-4.7.0+dfsg1/src/game.cpp:2519:18:  [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).
            std::strcpy(it_end, newline);
data/scid-4.7.0+dfsg1/src/optable.cpp:279: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(tempTrans, move);
data/scid-4.7.0+dfsg1/src/optable.cpp:294: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(tempTrans, move);
data/scid-4.7.0+dfsg1/src/optable.cpp:748:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (buf, "%s\n", dstr->Data());
data/scid-4.7.0+dfsg1/src/optable.cpp:1741:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (tempStr, "%4u%s%4u",
data/scid-4.7.0+dfsg1/src/optable.cpp:1748:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (tempStr, "%3u%s", score, percentStr);
data/scid-4.7.0+dfsg1/src/optable.cpp:1754:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (tempStr, "%s    %s", preElo, postElo);
data/scid-4.7.0+dfsg1/src/optable.cpp:1756:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (tempStr, "%s%4u%s", preElo, maxElo, postElo);
data/scid-4.7.0+dfsg1/src/optable.cpp:1900:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (tempStr, "%3u%s", score, percentStr);
data/scid-4.7.0+dfsg1/src/optable.cpp:2120:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (tempStr, argv[0], MaxThemeMoveNumber);
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:372: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(s, tmp);
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:397:12:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
           strcat(s, tmp);
data/scid-4.7.0+dfsg1/src/polyglot/san.cpp:90: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:98: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:107: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:111: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:115: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:130: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:136: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:241: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:253: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/scid-4.7.0+dfsg1/src/polyglot/util.cpp:87: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/scid-4.7.0+dfsg1/src/polyglot/util.cpp:174: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/scid-4.7.0+dfsg1/src/polyglot/util.cpp:190: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/scid-4.7.0+dfsg1/src/polyglot/util.cpp:192:24:  [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/scid-4.7.0+dfsg1/src/polyglot/util.cpp:305: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/scid-4.7.0+dfsg1/src/textbuf.cpp:235:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(temp, "%d%s", i, str);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2541:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (stemp, "%s%s%s, ", g->GetEventStr(), newlineStr, g->GetSiteStr());
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2560:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (stemp, "  (%s %u)",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2965:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (temp, "%s:%d [%s %s %d",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2999:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (tempStr, "# [%s %s %s",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3004:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (tempStr, "%s:%d [%s %s %d",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3169:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (temp, "%c%s %u:  <pi %s>%s</pi>", toupper(gameStr[0]),
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3173:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(temp + std::strlen(temp), " (%s)", whCountry);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3183:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, " <red>%u%s</red>", elo, eloEstimated ? "*" : "");
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3186:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (temp, "  --  <pi %s>%s</pi>",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3189:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf(temp + std::strlen(temp), " (%s)", blCountry);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3199:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, " <red>%u%s</red>", elo, eloEstimated ? "*" : "");
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3204:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "<br>(%s: %s)",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3207:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "<br>%s <red>(%u)</red>",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3283:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (temp, "<br><gray><run ::crosstab::Open>%s:  %s</run> (%s)</gray><br>",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3298: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(tempTrans, san);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3309:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "<run ::move::Back>%u.%s%s</run>",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3332: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(tempTrans, san);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3342:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "%u.%s(", moveCount, toMove==WHITE ? "" : "..");
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3347:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf (temp, "<run ::move::Forward>%u.%s%s</run>",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3396: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(tempTrans, s);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3404:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf (temp, "<darkblue>%u.%s%s</darkblue>",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4246:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf (temp, "%u.%s", moveCount, san);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4525:29:  [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 (sscanf (largv[i], "%s \"%[^\"]\"\n", tagStr, valueStr) == 2) {
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6572:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (temp, "  %s%u%s %s (%s: %u)",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6622:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6649:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6676:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6709:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6729:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6749:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6777:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6804:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6831:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
        sprintf (temp, fmt,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:7357:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (tempStr, "%s\"%s\"\t>> \"%s\" (%u)",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:7393:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf (tempStr, "Scid found %u %s name correction%s.\n",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8303: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(tempTrans, node->san);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8308:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (temp, "%2u %-6s %-5s %7u %3d%c%1d %3d%c%1d",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8321:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (temp, "\n%2u: %-6s %-5s %7u:%3d%c%1d%%  %3d%c%1d%%",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8400:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (temp, "%2u %-6s %-5s %7u %3d%c%1d %3d%c%1d",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8411:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf (temp, "%-12s     %7u:100%c0%%  %3d%c%1d%%",
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:480: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, const int BookNumber) {
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:509: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/scid-4.7.0+dfsg1/src/polyglot/book.h:32: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, const int BookNumber);
data/scid-4.7.0+dfsg1/src/polyglot/util.cpp:52: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/scid-4.7.0+dfsg1/src/tkscid.cpp:84:2:  [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/scid-4.7.0+dfsg1/src/ui_tcltk.h:50:21:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
		char* exec_name = realpath(Tcl_GetNameOfExecutable(), 0);
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:188:30:  [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).
		auto err = ICodecDatabase::open(dbtype, fMode, filename, Progress(),
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:205:30:  [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).
		auto err = ICodecDatabase::open(dbtype, FMODE_ReadOnly, filename,
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:291:30:  [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).
		auto err = ICodecDatabase::open(dbtype, fmode, filename, Progress(),
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:320:22:  [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).
	    ICodecDatabase::open(dbtype, FMODE_Create, "", Progress(), &idx, &nb);
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:358:30:  [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).
		auto err = ICodecDatabase::open(dbtype, FMODE_Create, filename,
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:366:25:  [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).
		err = ICodecDatabase::open(dbtype, FMODE_Create, renamed_name.c_str(),
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:390:30:  [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).
		auto err = ICodecDatabase::open(dbtype, FMODE_ReadOnly, filename,
data/scid-4.7.0+dfsg1/gtest/test_containers.cpp:27: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 ch[3];
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:44:23:  [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).
			ASSERT_EQ(OK, file.open(fname, FMODE_Create));
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:51:23:  [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).
			ASSERT_EQ(OK, file.open(fname, FMODE_Both));
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:77:23:  [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).
			ASSERT_EQ(OK, file.open(fname, FMODE_ReadOnly));
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:207:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (file.open(filename, std::ios::in | std::ios::binary | std::ios::ate) !=
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:229: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 stlBuf[1024];
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:367:7:  [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).
	file.open(filename, std::ios::in);
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:383:12:  [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 (file.open(filename,
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:401:14:  [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).
		fileAppend.open(filename, FMODE_ReadOnly);
data/scid-4.7.0+dfsg1/gtest/test_game.cpp:57: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 sanGame[12] = {};
data/scid-4.7.0+dfsg1/gtest/test_game.cpp:59: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 sanClone[12] = {};
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:35:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf_[1024];
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:34:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (file.open(filename, std::ios::in | std::ios::binary)) {
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:122:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[128];
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:274:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[16];
data/scid-4.7.0+dfsg1/gtest/test_position.cpp:113:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[64];
data/scid-4.7.0+dfsg1/gtest/test_scidbase.cpp:160: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).
					int temp = atoi(num.c_str());
data/scid-4.7.0+dfsg1/gtest/test_str.cpp:44:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/scid-4.7.0+dfsg1/src/codec.h:60:44:  [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).
	static std::pair<ICodecDatabase*, errorT> open(Codec codec, fileModeT fMode,
data/scid-4.7.0+dfsg1/src/codec_pgn.h:66:9:  [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).
	errorT open(const char* filename, fileModeT fmode) {
data/scid-4.7.0+dfsg1/src/codec_proxy.h:58:9:  [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).
	errorT open(const char* filename, fileModeT fMode);
data/scid-4.7.0+dfsg1/src/codec_proxy.h:157:23:  [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).
		err = getDerived()->open(filename, fMode);
data/scid-4.7.0+dfsg1/src/codec_scid4.cpp:67: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 Header_magic[9] = {0}; // magic identifier must be "Scid.sn"
data/scid-4.7.0+dfsg1/src/codec_scid4.cpp:376:22:  [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).
	errorT err = gfile_.open(filenames_[2], fMode);
data/scid-4.7.0+dfsg1/src/codec_scid4.cpp:478: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[INDEX_ENTRY_SIZE];
data/scid-4.7.0+dfsg1/src/codec_scid4.h:38: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 gamecache_[1ULL << 17];
data/scid-4.7.0+dfsg1/src/common.h:129: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.
typedef char    sanStringT [ 10];   // SAN Move Notation
data/scid-4.7.0+dfsg1/src/common.h:133: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.
typedef char    fileNameT [512];
data/scid-4.7.0+dfsg1/src/common.h:166: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.
typedef char            ecoStringT [6];   /* "A00j1" */
data/scid-4.7.0+dfsg1/src/common.h:180: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.
extern const char * ratingTypeNames [17];   // Defined in game.cpp
data/scid-4.7.0+dfsg1/src/common.h:195: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 RESULT_CHAR [4]       = { '*',  '1',    '0',    '='       };
data/scid-4.7.0+dfsg1/src/common.h:196: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 RESULT_STR [4][4]     = { "*",  "1-0",  "0-1",  "=-="     };
data/scid-4.7.0+dfsg1/src/common.h:197: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 RESULT_LONGSTR [4][8] = { "*",  "1-0",  "0-1",  "1/2-1/2" };
data/scid-4.7.0+dfsg1/src/common.h:211: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 COLOR_CHAR [3] = {'W', 'B', '_' };
data/scid-4.7.0+dfsg1/src/crosstab.cpp:596: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 stemp [100];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:638: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 stemp[1000];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:648:13:  [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 (stemp, "%4u ", pdata->elo);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:651:8:  [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 (stemp, "  -  ");
data/scid-4.7.0+dfsg1/src/crosstab.cpp:653:8:  [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 (stemp, "     ");
data/scid-4.7.0+dfsg1/src/crosstab.cpp:664: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 (stemp, " -  ");
data/scid-4.7.0+dfsg1/src/crosstab.cpp:673:8:  [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 (stemp, " -  ");
data/scid-4.7.0+dfsg1/src/crosstab.cpp:678:13:  [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 (stemp, "%3d ", pdata->ageInYears);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:684: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 (stemp, " -  ");
data/scid-4.7.0+dfsg1/src/crosstab.cpp:704: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.
        char stemp [20];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:708:13:  [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 (stemp, "%4d %+3d", performance, change);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:710:13:  [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 (stemp, "%4d    ", performance);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:720: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 stemp [20];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:724: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 (stemp, "%3d%c%1d%%", per_score / 10 , DecimalPointChar, per_score % 10);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:731: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 stemp [1000];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:836:9:  [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 (stemp, "%*u: ", PlayerNumWidth, player+1);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:842:13:  [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 (stemp, " %2u%c%c ", pdata->score / 2, DecimalPointChar,
data/scid-4.7.0+dfsg1/src/crosstab.cpp:845:13:  [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 (stemp, " %2u  ", pdata->gameCount);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:849:8:  [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 (stemp, " %2u%c%c  ",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:853:8:  [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 (stemp, " %2u%c%c / %2u  ",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:860:13:  [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 (stemp, "%3u%c%02u ", pdata->tiebreak / 4,
data/scid-4.7.0+dfsg1/src/crosstab.cpp:877:29:  [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(stemp, "<green><g_%u>%c</g></green>",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:880:29:  [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(stemp, "<blue><g_%u>%c</g></blue>",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:910: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 (stemp, "  (+%u -%u =%u)", r_won, r_loss, r_draw);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:924: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 stemp [1000];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:927: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.
    const char * resultStr [NUM_RESULT_TYPES];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1023:9:  [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 (stemp, "%*u: ", PlayerNumWidth, player+1);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1029:13:  [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 (stemp, " %2u%c%c ", pdata->score / 2, DecimalPointChar,
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1032:13:  [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 (stemp, " %2u  ", pdata->gameCount);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1036:8:  [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 (stemp, " %2u%c%c  ",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1040:8:  [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 (stemp, " %2u%c%c / %2u  ",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1047:13:  [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 (stemp, "%2u%c%c ", pdata->tiebreak / 2,
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1064:23:  [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 (stemp, "<green><g_%u>", clash->gameNum);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1066:23:  [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 (stemp, "<blue><g_%u>", clash->gameNum);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1102: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 (stemp, "  (+%u -%u =%u)", r_won, r_loss, r_draw);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1118: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 stemp [1000];
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1179:29:  [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 (stemp, "<green><g_%u>%c</g></green>",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1183:29:  [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 (stemp, "<blue><g_%u>%c</g></blue>",
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1199:17:  [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 (stemp, " %2u%c%c ", score / 2, DecimalPointChar,
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1202:17:  [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 (stemp, " %2u  ", nGames);
data/scid-4.7.0+dfsg1/src/crosstab.cpp:1205:17:  [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 (stemp, "%2u%c%c / %2u   ",
data/scid-4.7.0+dfsg1/src/crosstab.h:71: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        title [8];
data/scid-4.7.0+dfsg1/src/crosstab.h:72: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        country [8];
data/scid-4.7.0+dfsg1/src/date.h:167:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[10] = {0};
data/scid-4.7.0+dfsg1/src/dstring.h:35:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char s[16];
data/scid-4.7.0+dfsg1/src/dstring.h:36: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(s, "%u", i);
data/scid-4.7.0+dfsg1/src/dstring.h: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 s[16];
data/scid-4.7.0+dfsg1/src/dstring.h:42: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(s, "%d", i);
data/scid-4.7.0+dfsg1/src/engine.cpp:1343:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        my_Tcl_Free((char *) GameMoves[i]);
data/scid-4.7.0+dfsg1/src/engine.cpp:2308: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.
        char s[10];
data/scid-4.7.0+dfsg1/src/filebuf.h:62:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		return (open(filename, mode) != 0) ? OK : ERROR_FileOpen;
data/scid-4.7.0+dfsg1/src/filebuf.h:197:9:  [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).
	errorT open(const std::string& filename, fileModeT fmode) {
data/scid-4.7.0+dfsg1/src/filter.cpp:91:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy (CompressedData, tempBuf, CompressedLength);
data/scid-4.7.0+dfsg1/src/filter.cpp:251:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy (outBuffer + 1, inBuffer, inLength);
data/scid-4.7.0+dfsg1/src/filter.cpp:290:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy (outBuffer, inBuffer + 1, outLength);
data/scid-4.7.0+dfsg1/src/game.cpp:71: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 * ratingTypeNames [17] = {
data/scid-4.7.0+dfsg1/src/game.cpp:109:14:  [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.
        else sprintf (str, "$%u", nag);
data/scid-4.7.0+dfsg1/src/game.cpp:123:15:  [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(str, "<i>(D)</i>");
data/scid-4.7.0+dfsg1/src/game.cpp:145: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 strbuf[8] = {0};
data/scid-4.7.0+dfsg1/src/game.cpp:1024: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 tempStr[256];
data/scid-4.7.0+dfsg1/src/game.cpp:1646: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 temp [80];
data/scid-4.7.0+dfsg1/src/game.cpp:1840: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 tempTrans[10];
data/scid-4.7.0+dfsg1/src/game.cpp:1958: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.
                char temp [10];
data/scid-4.7.0+dfsg1/src/game.cpp:1959:17:  [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 (temp, "%4u.", CurrentPos->GetFullMoveCount());
data/scid-4.7.0+dfsg1/src/game.cpp:1995:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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[100];
data/scid-4.7.0+dfsg1/src/game.cpp:2037: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.
                char temp[20];
data/scid-4.7.0+dfsg1/src/game.cpp:2308: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 temp[256];
data/scid-4.7.0+dfsg1/src/game.cpp:2309: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 dateStr [20];
data/scid-4.7.0+dfsg1/src/game.cpp:2376:13:  [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 (temp, "  (%u)", WhiteElo);
data/scid-4.7.0+dfsg1/src/game.cpp:2393:13:  [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 (temp, "  (%u)", BlackElo);
data/scid-4.7.0+dfsg1/src/game.cpp:2497: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.
                char edateStr [20];
data/scid-4.7.0+dfsg1/src/game.cpp:3195: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 tag [255];
data/scid-4.7.0+dfsg1/src/game.cpp:3196: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 value [255];
data/scid-4.7.0+dfsg1/src/game.cpp:3212:28:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 * ctag = (char *) commonTags[b - MAX_TAG_LEN - 1];
data/scid-4.7.0+dfsg1/src/game.cpp:3348: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.
        char tempStr [256];
data/scid-4.7.0+dfsg1/src/game.h:183: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        ScidFlags[22];
data/scid-4.7.0+dfsg1/src/game.h:475: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 dateBuf[16];
data/scid-4.7.0+dfsg1/src/game.h:487: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 strBuf[256];
data/scid-4.7.0+dfsg1/src/game.h:559: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 strBuf[256];
data/scid-4.7.0+dfsg1/src/index.cpp:25:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 constexpr char INDEX_MAGIC[8] = "Scid.si";
data/scid-4.7.0+dfsg1/src/index.cpp:96: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 magic[8];
data/scid-4.7.0+dfsg1/src/index.h:77: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.
        char        description [SCID_DESC_LENGTH + 1];
data/scid-4.7.0+dfsg1/src/index.h:79: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.
        char        customFlagDesc [CUSTOM_FLAG_MAX][CUSTOM_FLAG_DESC_LENGTH+1] ;
data/scid-4.7.0+dfsg1/src/index.h:155:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(Header.description, src.Header.description, sizeof Header.description);
data/scid-4.7.0+dfsg1/src/index.h:156:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(Header.customFlagDesc, src.Header.customFlagDesc, sizeof Header.customFlagDesc);
data/scid-4.7.0+dfsg1/src/indexentry.h:324:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[INDEX_ENTRY_SIZE];
data/scid-4.7.0+dfsg1/src/movetree.h:67: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 san[10];   // SAN representation of move
data/scid-4.7.0+dfsg1/src/optable.cpp:276: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 tempTrans[5000];
data/scid-4.7.0+dfsg1/src/optable.cpp:442: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.
        char dateStr [16];
data/scid-4.7.0+dfsg1/src/optable.cpp:727: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 buf[1024];
data/scid-4.7.0+dfsg1/src/optable.cpp:738:17:  [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, "ROW %u[%u]: ", i+1, NLines[i]);
data/scid-4.7.0+dfsg1/src/optable.cpp:742:17:  [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, "   %u-NOTE: ", i+1);
data/scid-4.7.0+dfsg1/src/optable.cpp:1200: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 cell [18];
data/scid-4.7.0+dfsg1/src/optable.cpp:1226:9:  [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 (cell, " %3u     ", i + ((StartLength + 2) / 2));
data/scid-4.7.0+dfsg1/src/optable.cpp:1241: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.
        char tempStr [8];
data/scid-4.7.0+dfsg1/src/optable.cpp:1242:9:  [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 (tempStr, "%2u  ", row+1);
data/scid-4.7.0+dfsg1/src/optable.cpp:1301:9:  [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 (cell, "%2u:", NLines[row]);
data/scid-4.7.0+dfsg1/src/optable.cpp:1307:9:  [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 (cell, "%2u%%", score);
data/scid-4.7.0+dfsg1/src/optable.cpp:1538: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.
        char tempStr [10];
data/scid-4.7.0+dfsg1/src/optable.cpp:1539:9:  [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 (tempStr, "%2u", c);
data/scid-4.7.0+dfsg1/src/optable.cpp:1724:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 tempStr [100];
data/scid-4.7.0+dfsg1/src/optable.cpp:1725:13:  [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 (tempStr, "%2u", n);
data/scid-4.7.0+dfsg1/src/optable.cpp:1730:13:  [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 (tempStr, "%3u", freq);
data/scid-4.7.0+dfsg1/src/optable.cpp:1739:17:  [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 (tempStr, "     %4u", minYear);
data/scid-4.7.0+dfsg1/src/optable.cpp:1883:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 ecoStr[8];
data/scid-4.7.0+dfsg1/src/optable.cpp:1890:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 tempStr [100];
data/scid-4.7.0+dfsg1/src/optable.cpp:1891:13:  [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 (tempStr, "%2u", n);
data/scid-4.7.0+dfsg1/src/optable.cpp:1896:13:  [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 (tempStr, "%3u", maxFreq);
data/scid-4.7.0+dfsg1/src/optable.cpp:2055: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.
        char tempStr [10];
data/scid-4.7.0+dfsg1/src/optable.cpp:2056:9:  [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 (tempStr, "%2u", i+1);
data/scid-4.7.0+dfsg1/src/optable.cpp:2118: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 tempStr [250];
data/scid-4.7.0+dfsg1/src/optable.cpp:2148: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.
        char rstr [16];
data/scid-4.7.0+dfsg1/src/optable.cpp:2149:9:  [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 (rstr, "%3u", percent);
data/scid-4.7.0+dfsg1/src/optable.cpp:2209: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 numStr [16];
data/scid-4.7.0+dfsg1/src/optable.cpp:2233: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.
        char t1[10]; char t2[10];
data/scid-4.7.0+dfsg1/src/optable.cpp:2233:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 t1[10]; char t2[10];
data/scid-4.7.0+dfsg1/src/optable.cpp:2234:9:  [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(t1, "     P"); strcpy(t2, "    BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2234:31:  [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(t1, "     P"); strcpy(t2, "    BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2237:9:  [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(t1, "     R"); strcpy(t2, "  R,BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2237:31:  [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(t1, "     R"); strcpy(t2, "  R,BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2240:9:  [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(t1, "     Q"); strcpy(t2, "  Q,BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2240:31:  [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(t1, "     Q"); strcpy(t2, "  Q,BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2243:9:  [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(t1, "   Q,R"); strcpy(t2, "Q,R,BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2243:31:  [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(t1, "   Q,R"); strcpy(t2, "Q,R,BN");
data/scid-4.7.0+dfsg1/src/optable.cpp:2252: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.
    const char * rowName [2] = { repGames, allGames };
data/scid-4.7.0+dfsg1/src/optable.cpp:2264:13:  [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 (numStr, "%5u", pc);
data/scid-4.7.0+dfsg1/src/pbook.cpp:83: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 cboard[36];
data/scid-4.7.0+dfsg1/src/pbook.cpp:137:13:  [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 (!fp.open(FileName, std::ios::in | std::ios::binary))
data/scid-4.7.0+dfsg1/src/pbook.h:84: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[7] = {0};
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:187: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).
    if(!(f=fopen(tempfile,"wb+"))){
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:275:27:  [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[BookNumber] = fopen(file_name,"rb+");
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:284:30:  [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[BookNumber] = fopen(file_name,"rb");
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:342:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	 memcpy(scid_board[BookNumber], board, sizeof(board_t));
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:368: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.
         char tmp[256] = {' '};
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:370: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 + std::strlen(tmp), " %.0f%%",
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:395:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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[256] = {' '};
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:427:27:  [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[BookNumber] = fopen(file_name,"rb+");
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:538: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/scid-4.7.0+dfsg1/src/polyglot/fen.cpp:246: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/scid-4.7.0+dfsg1/src/polyglot/fen.cpp:264: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/scid-4.7.0+dfsg1/src/polyglot/piece.cpp:25: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:49: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:72: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:74: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:89: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:97: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:106: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:110: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:135: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:156: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:177: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:201: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:211: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:368: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/scid-4.7.0+dfsg1/src/polyglot/util.cpp:149: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/scid-4.7.0+dfsg1/src/position.cpp:2775:34:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        HalfMoveClock = (ushort) atoi(s);
data/scid-4.7.0+dfsg1/src/position.cpp:2782: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).
        int i = atoi(s);
data/scid-4.7.0+dfsg1/src/position.cpp:2852:13:  [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 (str, "%d %d", HalfMoveClock, (PlyCounter / 2) + 1);
data/scid-4.7.0+dfsg1/src/position.cpp:2903: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.
                char temp[40];
data/scid-4.7.0+dfsg1/src/position.cpp:2904:17:  [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 (temp, "width=%u ", width);
data/scid-4.7.0+dfsg1/src/position.cpp:2908: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.
                char temp[40];
data/scid-4.7.0+dfsg1/src/position.cpp:2909:17:  [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 (temp, "height=%u ", height);
data/scid-4.7.0+dfsg1/src/sc_base.cpp:392: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_date[16];
data/scid-4.7.0+dfsg1/src/sc_base.cpp:401: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 deleted[2] = {0};
data/scid-4.7.0+dfsg1/src/sc_base.cpp:404: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 flags[16];
data/scid-4.7.0+dfsg1/src/sc_base.cpp:412: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 startpos[2] = {0};
data/scid-4.7.0+dfsg1/src/sc_base.cpp:415: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_eventdate[16];
data/scid-4.7.0+dfsg1/src/sc_base.cpp:444: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 temp[16];
data/scid-4.7.0+dfsg1/src/sc_base.cpp:804:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf_date[16];
data/scid-4.7.0+dfsg1/src/scidbase.cpp:30: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).
ICodecDatabase::open(Codec codec, fileModeT fMode, const char* filename,
data/scid-4.7.0+dfsg1/src/scidbase.cpp:91:29:  [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).
	auto obj = ICodecDatabase::open(dbtype, fMode, filename, progress, idx, nb_);
data/scid-4.7.0+dfsg1/src/scidbase.cpp:248: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).
	auto res = pgn.open(filename, FMODE_ReadOnly);
data/scid-4.7.0+dfsg1/src/scidbase.cpp:541:53:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	errorT err_Create = tmp.Open(dbtype, FMODE_Create, tmpfile.c_str());
data/scid-4.7.0+dfsg1/src/sortcache.h:56: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 criteria_[32];
data/scid-4.7.0+dfsg1/src/spellchk.cpp:256:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (file.open(filename, std::ios::in | std::ios::binary | std::ios::ate) != 0) {
data/scid-4.7.0+dfsg1/src/spellchk.cpp:417:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 country[4];
data/scid-4.7.0+dfsg1/src/spellchk.h:451:7:  [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).
			f_.open(spellfile + std::string(".validate"));
data/scid-4.7.0+dfsg1/src/textbuf.cpp:203: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 currentWord[1024];  // should be long enough for a word
data/scid-4.7.0+dfsg1/src/textbuf.cpp:234: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 temp[255];
data/scid-4.7.0+dfsg1/src/textbuf.h:41: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.
    const char * Translation [256];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:98: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 * reportTypeName[2] = { "opening", "player" };
data/scid-4.7.0+dfsg1/src/tkscid.cpp:137: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 temp [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:138: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 (temp, "%d", i);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:150: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 temp [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:151: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 (temp, "%u", i);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:163: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 temp [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:164: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 (temp, "%u", i);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:176: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 temp[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:177: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 (temp, "%u", i);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:189: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 temp [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:190: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 (temp, "%0*u", width, i);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:202: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 tempStr [4];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:473:18:  [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).
    exportFile = fopen (exportFileName, (appendToFile ? "r+" : "w"));
data/scid-4.7.0+dfsg1/src/tkscid.cpp:489:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char line [1024];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:1760:32:  [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* exportFile = fopen(argv[5], "wb");
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2073: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 temp[80];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2077: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 (temp, "%7u %7u %7u %7u   %3u%c%u%%",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2182:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[16];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2540: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 stemp[1000];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2791: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.
        char tempStr [80];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2792:9:  [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 (tempStr, "+:%u  =:%u  -:%u  ?:%u",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2841:21:  [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 (tempStr, " +%3d   ", bestScore);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2845:21:  [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 (tempStr, " -%3d   ", -bestScore);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2894:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 * drawlist [MAX_LEGAL_MOVES];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2895:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 * losslist [MAX_LEGAL_MOVES];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2964:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char temp[200];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2997:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 tempStr [80];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3051: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 temp[1024];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3115:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dateStr [12];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3223: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 dateStr[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3235: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.
        char userFlags[16];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3289: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 san [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3290: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 tempTrans[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3319:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 nagstr[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3357:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 nagstr[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3375:9:  [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 (temp, "    <gray>(%u-%u", mWhite, mBlack);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3378:13:  [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 (temp, ":+%u", mWhite - mBlack);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3381:13:  [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 (temp, ":-%u", mBlack - mWhite);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3393:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3398:13:  [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 (temp, "   <run sc_var enter %u; updateBoard -animate>v%u",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3402:17:  [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 (temp, "<darkblue>(empty)</darkblue>");
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3494: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.
        char boardStr [200];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3600:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    typedef char compactBoardStr [36];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3740: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.
        char move [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3744:17:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
                sprintf (move, "%u.", (count / 2) + 1);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4060: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.
        char buf[IndexEntry::IDX_NUM_FLAGS + 1];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4094: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 buf[256];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4212: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.
        char dateStr [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4235:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 boardStr[100];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4241:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 san [20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4244: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.
                char temp[40];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4253:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 nagstr[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4265:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                Tcl_AppendElement (ti, (char *)RESULT_LONGSTR[g->GetResult()]);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4366:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dateStr[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4421:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dateStr[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4520:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 tagStr [1024];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4521:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 valueStr [1024];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4604: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 dateStr1 [16];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4605: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 dateStr2 [16];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:4859:41:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                Tcl_AppendElement (ti, (char *) ratingTypeNames[i]);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5110: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 s[8];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5158: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 s[8], tmp[10];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5160:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 * ptr = (char *) argv[2];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5288: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 boardStr[200];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5510: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 moveStr[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5637: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.
        char temp[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5809: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 str[20];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6032: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 oldName [512];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6033: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 newName [512];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6034: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 birth[128];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6035: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 death[128];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6036: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 line [512];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6310:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char temp[500];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6311:6:  [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(temp, "%4u.%02u", year, (month - 1) * 100 / 12);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6313:6:  [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(temp, "%4u", elo);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6547: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 temp [500];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:6887:17:  [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 (temp, ":%3u (%u%%)", mostPlayed,
data/scid-4.7.0+dfsg1/src/tkscid.cpp:7305: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 tempStr[1024];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8027: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 tempTrans[10];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8273: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 temp [200];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8338:13:  [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 (temp, "  %4u", avgElo);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8344:13:  [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 (temp, "  %4u", perf);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8350:13:  [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 (temp, "  %4u", avgYear);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8354:9:  [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 (temp, "  %3d%%", (pctDraws + 5) / 10);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8419:13:  [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 (temp, "  %4u", avgElo);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8425:13:  [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 (temp, "  %4u", perf);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8431:13:  [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 (temp, "  %4u", static_cast<uint>((yearSum + (yearCount/2)) / yearCount));
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8435:9:  [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 (temp, "  %3d%%", (pctDraws + 5) / 10);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8581: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.
        char cboard [40];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8731: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 temp[200];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8736: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 (temp, "%lu / %lu  (%d%c%02d s)",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:8742: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(temp, "  Skipped %u games.", skipcount);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9065: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 temp [250];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9200: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 (temp, "%lu / %lu  (%d%c%02d s)",
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9206: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(temp, "  Skipped %u games.", skipcount);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9220: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 * titleStr [NUM_TITLES] = {
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9617: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 s[100];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9746: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 moves[200] = "";
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9747: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 boardStr[100];
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9763: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 moves[200] = "";
data/scid-4.7.0+dfsg1/src/tkscid.cpp:9764: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 boardStr[100];
data/scid-4.7.0+dfsg1/src/tree.h:46: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        san[8];
data/scid-4.7.0+dfsg1/src/ui_tcltk.h:47: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 sourceFileName [4096] = {0};
data/scid-4.7.0+dfsg1/src/ui_tcltk.h:60: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 (dirname, "tcl/start.tcl");
data/scid-4.7.0+dfsg1/src/ui_tcltk.h:62: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 (dirname, "../tcl/start.tcl");
data/scid-4.7.0+dfsg1/gtest/test_codec.cpp:107:21:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			EXPECT_TRUE(std::equal(data, data + entry->GetLength(), game.data()));
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:71:22:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
				EXPECT_TRUE(std::equal(v2.begin(), v2.begin() + nRead,
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:82:21:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			EXPECT_TRUE(std::equal(v.begin(), v.end(), v2.begin()));
data/scid-4.7.0+dfsg1/gtest/test_filebuf.cpp:362:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
TEST_P(Test_FilebufGetline, read) {
data/scid-4.7.0+dfsg1/gtest/test_game.cpp:55:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    std::equal(board, board + 66, clone->currentPos()->GetBoard()));
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:147:29:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	template <typename T> bool equal(const T& map, const HFilter& filter) {
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:166:14:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	EXPECT_TRUE(equal(equivMap_, filter));
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:273:16:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			EXPECT_TRUE(equal(mapCopy, filter));
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:310:16:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			EXPECT_TRUE(equal(mapCopy, filter));
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:328:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		EXPECT_TRUE(equal(equivMap_, filter));
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:346:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		EXPECT_TRUE(equal(equivMap_, filter));
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:360:16:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			EXPECT_TRUE(equal(mapCopy, filter));
data/scid-4.7.0+dfsg1/gtest/test_hfilter.cpp:382:16:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			EXPECT_TRUE(equal(mapCopy, filter));
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:41:7:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	bool equal(const Buffer& b, size_t count) {
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:42:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		return std::equal(buf_, buf_ + count, b.buf_);
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:55:57:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint16_t ReadTwoBytes() { return static_cast<uint16_t>(read<2>()); }
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:56:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint32_t ReadThreeBytes() { return read<3>(); }
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:57:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint32_t ReadFourBytes() { return read<4>(); }
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:82:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	template <int nBytes> uint32_t read() {
data/scid-4.7.0+dfsg1/gtest/test_indexentry.cpp:223:22:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		ASSERT_TRUE(ie_buf.equal(ie_buf_v4_6, v4_6::INDEX_ENTRY_SIZE));
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:127: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).
	auto len = std::strlen(pgn);
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:227:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		buf.append(str, str + std::strlen(str));
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:265:50:  [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).
		auto str_view = std::make_pair(str, str + std::strlen(str));
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:268:20:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		EXPECT_TRUE(std::equal(str_view.first, str_view.second, tests[0]));
data/scid-4.7.0+dfsg1/gtest/test_pgnparser.cpp:275:50:  [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).
		date_DecodeToString(date_parsePGNTag(str, std::strlen(str)), buf);
data/scid-4.7.0+dfsg1/gtest/test_position.cpp:116: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).
		auto slen = std::strlen(*it);
data/scid-4.7.0+dfsg1/gtest/test_sortcache.cpp:126:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					if (std::strlen(strA) > 3)
data/scid-4.7.0+dfsg1/gtest/test_sortcache.cpp:127: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).
						strA += std::strlen(strA) - 3;
data/scid-4.7.0+dfsg1/gtest/test_sortcache.cpp:128:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					if (std::strlen(strB) > 3)
data/scid-4.7.0+dfsg1/gtest/test_sortcache.cpp:129: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).
						strB += std::strlen(strB) - 3;
data/scid-4.7.0+dfsg1/gtest/test_sortcache.cpp:143:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    std::equal(buf.begin(), buf.begin() + count, vIndex.begin() + start,
data/scid-4.7.0+dfsg1/gtest/test_str.cpp:77: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).
			auto sz = strlen(e.static_input) + 1;
data/scid-4.7.0+dfsg1/src/codec_pgn.h:189: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).
			            next_move + std::strlen(next_move));
data/scid-4.7.0+dfsg1/src/codec_pgn.h:200:44:  [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).
			dest.insert(dest.end(), tag, tag + std::strlen(tag));
data/scid-4.7.0+dfsg1/src/codec_pgn.h:205:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			dest.insert(dest.end(), value, value + std::strlen(value));
data/scid-4.7.0+dfsg1/src/codec_scid4.cpp:233: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(name) < 256);
data/scid-4.7.0+dfsg1/src/codec_scid4.cpp:234: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).
			byte length = static_cast<byte>(strlen(name));
data/scid-4.7.0+dfsg1/src/fastgame.h:73:15:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		return std::equal(a, a + 16, b_ptr);
data/scid-4.7.0+dfsg1/src/filebuf.h:117:57:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint16_t ReadTwoBytes() { return static_cast<uint16_t>(read<2>()); }
data/scid-4.7.0+dfsg1/src/filebuf.h:123:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint32_t ReadThreeBytes() { return read<3>(); }
data/scid-4.7.0+dfsg1/src/filebuf.h:129:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	uint32_t ReadFourBytes() { return read<4>(); }
data/scid-4.7.0+dfsg1/src/filebuf.h:169:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	template <int nBytes> uint32_t read() {
data/scid-4.7.0+dfsg1/src/game.cpp:659:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tag, tag + 5, "Event"))
data/scid-4.7.0+dfsg1/src/game.cpp:661:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tag, tag + 5, "Round"))
data/scid-4.7.0+dfsg1/src/game.cpp:663:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tag, tag + 5, "White"))
data/scid-4.7.0+dfsg1/src/game.cpp:665:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tag, tag + 5, "Black"))
data/scid-4.7.0+dfsg1/src/game.cpp:668:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tag, tag + 4, "Site"))
data/scid-4.7.0+dfsg1/src/game.cpp:705:34:  [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).
		                  rType + std::strlen(rType));
data/scid-4.7.0+dfsg1/src/game.cpp:2021: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).
        colWidth -= (int) std::strlen(m->san);
data/scid-4.7.0+dfsg1/src/game.cpp:2053:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                colWidth -= (int) std::strlen(temp);
data/scid-4.7.0+dfsg1/src/game.cpp:2518:61:  [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).
            auto it_end = std::copy_n("\"]", 2, temp + std::strlen(temp));
data/scid-4.7.0+dfsg1/src/game.h:248:61:  [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).
    void SetScidFlags(const char* s) { SetScidFlags(s, std::strlen(s)); }
data/scid-4.7.0+dfsg1/src/index.h:168:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(Header.description, str, SCID_DESC_LENGTH);
data/scid-4.7.0+dfsg1/src/index.h:177:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(flagDesc, str, CUSTOM_FLAG_DESC_LENGTH);
data/scid-4.7.0+dfsg1/src/misc.h:429: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).
	size_t iCh = strlen(target);
data/scid-4.7.0+dfsg1/src/namebase.h:90: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).
		const size_t nameLen = strlen(name);
data/scid-4.7.0+dfsg1/src/namebase.h:145: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).
		size_t len = strlen(str);
data/scid-4.7.0+dfsg1/src/namebase.h:149: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(s) < len || !std::equal(str, str + len, s))
data/scid-4.7.0+dfsg1/src/namebase.h:149:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (strlen(s) < len || !std::equal(str, str + len, s))
data/scid-4.7.0+dfsg1/src/optable.cpp:739:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                my_Tcl_Write(fp,buf,strlen(buf));
data/scid-4.7.0+dfsg1/src/optable.cpp:743:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                my_Tcl_Write(fp,buf,strlen(buf));
data/scid-4.7.0+dfsg1/src/optable.cpp:749: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).
            my_Tcl_Write(fp,buf,strlen(buf));
data/scid-4.7.0+dfsg1/src/pbook.cpp:87:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		                 return std::equal(cboard, cboard + 36,
data/scid-4.7.0+dfsg1/src/pgn_lexer.h:130:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tok.first, tok.first + 3, "1-0"))
data/scid-4.7.0+dfsg1/src/pgn_lexer.h:132:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tok.first, tok.first + 3, "0-1"))
data/scid-4.7.0+dfsg1/src/pgn_lexer.h:134:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tok.first, tok.first + 3, "1/2"))
data/scid-4.7.0+dfsg1/src/pgn_lexer.h:136:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tok.first, tok.first + 3, "1:0"))
data/scid-4.7.0+dfsg1/src/pgn_lexer.h:138:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tok.first, tok.first + 3, "0:1"))
data/scid-4.7.0+dfsg1/src/pgn_lexer.h:141:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (std::equal(tok.first, tok.first + 7, "1/2-1/2") ||
data/scid-4.7.0+dfsg1/src/pgn_lexer.h:142:12:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		    std::equal(tok.first, tok.first + 7, "1/2:1/2"))
data/scid-4.7.0+dfsg1/src/pgnparse.h:249:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(str.first, str.first + 3, "1-0")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:253:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(str.first, str.first + 3, "0-1")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:257:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(str.first, str.first + 3, "1/2")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:268:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 3, "ECO")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:273:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 3, "FEN")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:279:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 4, "Date")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:285:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 6, "Result"))
data/scid-4.7.0+dfsg1/src/pgnparse.h:289:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 7, "UTCDate") &&
data/scid-4.7.0+dfsg1/src/pgnparse.h:296:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 9, "EventDate")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:300:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 9, "ScidFlags")) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:311:13:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (std::equal(tag, tag + 5, "White") && game.GetWhiteElo() == 0) {
data/scid-4.7.0+dfsg1/src/pgnparse.h:315:20:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			} else if (std::equal(tag, tag + 5, "Black") &&
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:370: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).
         sprintf(tmp + std::strlen(tmp), " %.0f%%",
data/scid-4.7.0+dfsg1/src/polyglot/book.cpp:744:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      b = fgetc(file);
data/scid-4.7.0+dfsg1/src/polyglot/san.cpp:125: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:144: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:146: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:213: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/scid-4.7.0+dfsg1/src/polyglot/san.cpp:383: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/scid-4.7.0+dfsg1/src/polyglot/util.cpp:304: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/scid-4.7.0+dfsg1/src/position.cpp:2331:30:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		return slen == len && std::equal(str, str + len, const_str);
data/scid-4.7.0+dfsg1/src/position.cpp:2428:27:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	if ((length == 2 && std::equal(str, str + 2, "--")) ||
data/scid-4.7.0+dfsg1/src/position.cpp:2429:27:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	    (length == 2 && std::equal(str, str + 2, "Z0")) ||
data/scid-4.7.0+dfsg1/src/position.cpp:2430:27:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	    (length == 4 && std::equal(str, str + 4, "null"))) {
data/scid-4.7.0+dfsg1/src/scidbase.cpp:429: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).
	switch(strlen(ecoStr)) {
data/scid-4.7.0+dfsg1/src/scidbase.h:120: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).
			auto len = std::strlen(tagname);
data/scid-4.7.0+dfsg1/src/scidbase.h:121:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
			if (len == 5 && std::equal(tagname, tagname + 4, "flag")) {
data/scid-4.7.0+dfsg1/src/sortcache.cpp:418: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).
				size_t slenOne = std::strlen(sOne);
data/scid-4.7.0+dfsg1/src/sortcache.cpp:419: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).
				size_t slenTwo = std::strlen(sTwo);
data/scid-4.7.0+dfsg1/src/sortcache.cpp:517: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 slen = std::strlen(scountry);
data/scid-4.7.0+dfsg1/src/spellchk.cpp:248:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
errorT SpellChecker::read(const char* filename, const Progress& progress)
data/scid-4.7.0+dfsg1/src/spellchk.h:298:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		errorT err = res->read(filename, progress);
data/scid-4.7.0+dfsg1/src/spellchk.h:383:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	errorT read(const char* filename, const Progress& progress);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:2686:34:  [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 (!pgnParseGame(argv[2], std::strlen(argv[2]), *db->game, pgn) &&
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3173: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).
        sprintf(temp + std::strlen(temp), " (%s)", whCountry);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:3189: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).
        sprintf(temp + std::strlen(temp), " (%s)", blCountry);
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5144: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 (!pgnParseGame(argv[i], std::strlen(argv[i]), *db->game, parser))
data/scid-4.7.0+dfsg1/src/tkscid.cpp:5435:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		byte nag = game_parseNag({nagStr, nagStr + std::strlen(nagStr)});
data/scid-4.7.0+dfsg1/src/ui_tcltk.h:42: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).
		if (ext != 0 && strlen(ext) == 4 && std::string(".tcl") != ext) {
data/scid-4.7.0+dfsg1/src/ui_tcltk.h:51:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(sourceFileName, exec_name, 4000);
data/scid-4.7.0+dfsg1/src/ui_tcltk.h:54:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(sourceFileName, Tcl_GetNameOfExecutable(), 4000);

ANALYSIS SUMMARY:

Hits = 546
Lines analyzed = 59132 in approximately 1.99 seconds (29665 lines/second)
Physical Source Lines of Code (SLOC) = 42694
Hits@level = [0]  14 [1] 111 [2] 326 [3]   6 [4] 103 [5]   0
Hits@level+ = [0+] 560 [1+] 546 [2+] 435 [3+] 109 [4+] 103 [5+]   0
Hits/KSLOC@level+ = [0+] 13.1166 [1+] 12.7887 [2+] 10.1888 [3+] 2.55305 [4+] 2.41252 [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.